* [PATCH v6 00/40] ep93xx device tree conversion
@ 2023-12-12 8:20 Nikita Shubin via B4 Relay
2023-12-12 8:20 ` [PATCH v6 21/40] dt-bindings: ata: Add Cirrus EP93xx Nikita Shubin via B4 Relay
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Nikita Shubin via B4 Relay @ 2023-12-12 8:20 UTC (permalink / raw)
To: Hartley Sweeten, Alexander Sverdlin, Russell King,
Lukasz Majewski, Linus Walleij, Bartosz Golaszewski,
Andy Shevchenko, Michael Turquette, Stephen Boyd,
Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Nikita Shubin, Vinod Koul, Wim Van Sebroeck, Guenter Roeck,
Thierry Reding, Uwe Kleine-König, Mark Brown,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Damien Le Moal, Sergey Shtylyov, Dmitry Torokhov, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai
Cc: linux-arm-kernel, linux-kernel, linux-gpio, linux-clk, linux-pm,
devicetree, dmaengine, linux-watchdog, linux-pwm, linux-spi,
netdev, linux-mtd, linux-ide, linux-input, linux-sound,
Arnd Bergmann, Bartosz Golaszewski, Krzysztof Kozlowski,
Andrew Lunn, Andy Shevchenko, Andy Shevchenko
No major changes since last version all changes are cometic.
Following patches require attention from Stephen Boyd, as they were converted to aux_dev as suggested:
- ARM: ep93xx: add regmap aux_dev
- clk: ep93xx: add DT support for Cirrus EP93xx
DMA related patches still require Acked or Reviewed tags.
got approval LGTM from Miquel:
- mtd: rawnand: add support for ts72xx
Link: https://lore.kernel.org/lkml/20231004103911.2aa65354@xps-13/
new patches:
ARM: ep93xx: Add terminator to gpiod_lookup_table
- fixed terminator in gpiod_lockup_table
So mostly all patches got approval.
Patches should be now formated with '--histogram'
---
Changes in v6:
- clk: ep93xx: add DT support for Cirrus EP93xx
- s/spin_lock_irqsave()/guard()/
- refactor index check in ep93xx_mux_set_parent_lock() to something more readable
- use in_range in ep93xx_mux_set_parent_lock()/ep93xx_ddiv_set_rate()
- use GENMASK() in ep93xx_ddiv_recalc_rate()
- comment reserved bit in ep93xx_ddiv_set_rate()
- move out from loop ClkDiv value assigment
- some style fixes
Andy, i was i asked to set index of XTALI explicitly, i am not setting ddiv_pdata
there becouse only XTALI is jnown in advance, and i think setting them in one place is more convenient.
- pinctrl: add a Cirrus ep93xx SoC pin controller
- drop OF from Kconfig
- droped linux/of.h include
- add space to */ where it is applicable
- add coma in multiline assigment
- "return NULL" as default case in ep93xx_get_group_name()
- fixed casting id->driver_data
- use device_set_of_node_from_dev()
- use dev_err_probe()
- power: reset: Add a driver for the ep93xx reset
- drop linux/of.h include
- soc: Add SoC driver for Cirrus ep93xx
- s/GPL-2.0/GPL-2.0-only/
- drop linux/kernel.h include
- + blank line before linux/soc/cirrus/ep93xx.h
- + blank line after ep93xx_get_soc_rev()
- + coma for pinctrl_names
- valid casting to int for of_device_get_match_data() return value
- mtd: rawnand: add support for ts72xx
- return as part of switch case
- s/iowrite8/iowrite8_rep/
- net: cirrus: add DT support for Cirrus EP93xx
- fix header sorting
- dma: cirrus: Convert to DT for Cirrus EP93xx
- use devm_clk_get
- use is_slave_direction
Changes in v5:
- gpio: ep93xx: split device in multiple
- ordered headers
- use irqd_to_hwirq()
- s/platform_get_irq()/platform_get_irq_optional()/
- [PATCH v4 02/42] ARM: ep93xx: add swlocked prototypes
- replaced with ARM: ep93xx: add regmap aux_dev
- [PATCH v4 03/42] dt-bindings: clock: Add Cirrus EP93xx
- fixed identation
- removed EP93XX_CLK_END
- and dropped it
- clock bindings moved to syscon with renaming to cirrus,ep9301-syscon.h
- clk: ep93xx: add DT support for Cirrus EP93xx
- convert to auxiliary and use parent device tree node
- moved all clocks except XTALI here
- used devm version everywhere and *_parent_hw() instead of passing name where it's possible
- unfortunately devm_clk_hw_register_fixed_rate doesn't have a parent index version
- [PATCH v4 05/42] dt-bindings: pinctrl: Add Cirrus EP93xx
- "unevaluatedProperties: false" for pins
- returned "additionalProperties: false" where it was
- and dropped it
- pinctrl: add a Cirrus ep93xx SoC pin controller
- sorted includes
- convert to auxiliary and use parent device tree node
- power: reset: Add a driver for the ep93xx reset
- convert to auxiliary device
- dt-bindings: soc: Add Cirrus EP93xx
- dropped all ref to reboot, clk, pinctrl subnodes
- added pins, as it's now used for pinctrl
- added #clock-cells, as it's now used for clk
- dt-bindings: pwm: Add Cirrus EP93xx
- $ref to pwm.yaml
- fixed 'pwm-cells'
- s/additionalProperties/unevaluatedProperties/
- soc: Add SoC driver for Cirrus ep93xx
- removed clocks, they are moved to clk auxiliary driver, as we dropped the clk dt node
- removed all swlocked exported functions
- dropped static spinlock
- added instantiating auxiliary reboot, clk, pinctrl
- dt-bindings: spi: Add Cirrus EP93xx
- Document DMA support
- spi: ep93xx: add DT support for Cirrus EP93xx
- dropped CONFIG_OF and SPI/DMA platform data entirely
- s/master/host/
- reworked DMA setup so we can use probe defer
- dt-bindings: dma: Add Cirrus EP93xx
- dropped bindings header (moved ports description to YAML)
- changed '#dma-cells' to 2, we use port, direction in cells so we can drop platform code completely
- dma: cirrus: add DT support for Cirrus EP93xx
- dropped platform probing completely
- dropped struct ep93xx_dma_data replaced with internal struct ep93xx_dma_chan_cfg with port/direction
- added xlate functions for m2m/m2p
- we require filters to set dma_cfg before hw_setup
- dt-bindings: ata: Add Cirrus EP93xx
- Document DMA support
- ata: pata_ep93xx: add device tree support
- drop DMA platform header with data
- use DMA OF so we can defer probing until DMA is up
- ARM: dts: add Cirrus EP93XX SoC .dtsi
- ARM: dts: ep93xx: add ts7250 board
- ARM: dts: ep93xx: Add EDB9302 DT
- replaced "eclk: clock-controller" to syscon reference
- replaced "pinctrl: pinctrl" to syscon reference
- gpios are now "enabled" by default
- reworked i2s node
- change all dma nodes and refs
- new additions to I2S
- Document DMA
- Document Audio Port usage
- drop legacy DMA support
- Link to v4: https://lore.kernel.org/r/20230915-ep93xx-v4-0-a1d779dcec10@maquefel.me
Changes in v4:
- gpio: ep93xx: split device in multiple
- s/generic_handle_irq/generic_handle_domain_irq/
- s/int offset/irq_hw_number_t offset/ though now it looks a bit odd to me
- drop i = 0
- drop 'error'
- use dev_err_probe withour printing devname once again
dt-bindings: clock: Add Cirrus EP93xx
- renamed cirrus,ep93xx-clock.h -> cirrus,ep9301-clk.h
clk: ep93xx: add DT support for Cirrus EP93xx
- drop unused includes
- use .name only for xtali, pll1, pll2 parents
- convert // to /*
- pass clk_parent_data instead of char* clock name
dt-bindings: pinctrl: Add Cirrus EP93xx
- s/additionalProperties/unevaluatedProperties/
dt-bindings: soc: Add Cirrus EP93xx
- move syscon to soc directory
- add vendor prefix
- make reboot same style as pinctrl, clk
- use absolute path for ref
- expand example
soc: Add SoC driver for Cirrus ep93xx
- s/0xf0000000/GENMASK(31, 28)/
- s/ret/ep93xx_chip_revision(map)/
- drop symbol exports
- convert to platform driver
dt-bindings: rtc: Add Cirrus EP93xx
- allOf: with $ref to rtc.yaml
- s/additionalProperties/unevaluatedProperties/
dt-bindings: watchdog: Add Cirrus EP93x
- drop description
- reword
power: reset: Add a driver for the ep93xx reset
- lets use 'GPL-2.0+' instead of '(GPL-2.0)'
- s/of_device/of/
- drop mdelay with warning
- return 0 at the end
net: cirrus: add DT support for Cirrus EP93xx
- fix leaking np
mtd: nand: add support for ts72xx
- +bits.h
- drop comment
- ok to fwnode_get_next_child_node
- use goto to put handle and nand and report error
ARM: dts: add Cirrus EP93XX SoC .dtsi
- add simple-bus for ebi, as we don't require to setup anything
- add arm,pl011 compatible to uart nodes
- drop i2c-gpio, as it's isn't used anywhere
ARM: dts: ep93xx: add ts7250 board
- generic node name for temperature-sensor
- drop i2c
- move nand, rtc, watchdog to ebi node
- Link to v3: https://lore.kernel.org/r/20230605-ep93xx-v3-0-3d63a5f1103e@maquefel.me
---
Alexander Sverdlin (3):
ASoC: ep93xx: Drop legacy DMA support
ARM: dts: ep93xx: Add EDB9302 DT
ASoC: cirrus: edb93xx: Delete driver
Nikita Shubin (37):
ARM: ep93xx: Add terminator to gpiod_lookup_table
gpio: ep93xx: split device in multiple
ARM: ep93xx: add regmap aux_dev
clk: ep93xx: add DT support for Cirrus EP93xx
pinctrl: add a Cirrus ep93xx SoC pin controller
power: reset: Add a driver for the ep93xx reset
dt-bindings: soc: Add Cirrus EP93xx
soc: Add SoC driver for Cirrus ep93xx
dt-bindings: dma: Add Cirrus EP93xx
dma: cirrus: Convert to DT for Cirrus EP93xx
dt-bindings: watchdog: Add Cirrus EP93x
watchdog: ep93xx: add DT support for Cirrus EP93xx
dt-bindings: pwm: Add Cirrus EP93xx
pwm: ep93xx: add DT support for Cirrus EP93xx
dt-bindings: spi: Add Cirrus EP93xx
spi: ep93xx: add DT support for Cirrus EP93xx
dt-bindings: net: Add Cirrus EP93xx
net: cirrus: add DT support for Cirrus EP93xx
dt-bindings: mtd: Add ts7200 nand-controller
mtd: rawnand: add support for ts72xx
dt-bindings: ata: Add Cirrus EP93xx
ata: pata_ep93xx: add device tree support
dt-bindings: input: Add Cirrus EP93xx keypad
input: keypad: ep93xx: add DT support for Cirrus EP93xx
dt-bindings: wdt: Add ts72xx
wdt: ts72xx: add DT support for ts72xx
gpio: ep93xx: add DT support for gpio-ep93xx
ASoC: dt-bindings: ep93xx: Document DMA support
ASoC: dt-bindings: ep93xx: Document Audio Port support
ARM: dts: add Cirrus EP93XX SoC .dtsi
ARM: dts: ep93xx: add ts7250 board
ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms
pwm: ep93xx: drop legacy pinctrl
ata: pata_ep93xx: remove legacy pinctrl use
ARM: ep93xx: delete all boardfiles
ARM: ep93xx: soc: drop defines
dma: cirrus: remove platform code
.../bindings/arm/cirrus/cirrus,ep9301.yaml | 38 +
.../bindings/ata/cirrus,ep9312-pata.yaml | 42 +
.../bindings/dma/cirrus,ep9301-dma-m2m.yaml | 84 ++
.../bindings/dma/cirrus,ep9301-dma-m2p.yaml | 144 ++
.../bindings/input/cirrus,ep9307-keypad.yaml | 87 ++
.../devicetree/bindings/mtd/technologic,nand.yaml | 45 +
.../devicetree/bindings/net/cirrus,ep9301-eth.yaml | 59 +
.../devicetree/bindings/pwm/cirrus,ep9301-pwm.yaml | 53 +
.../bindings/soc/cirrus/cirrus,ep9301-syscon.yaml | 94 ++
.../bindings/sound/cirrus,ep9301-i2s.yaml | 16 +
.../devicetree/bindings/spi/cirrus,ep9301-spi.yaml | 70 +
.../bindings/watchdog/cirrus,ep9301-wdt.yaml | 42 +
.../bindings/watchdog/technologic,ts7200-wdt.yaml | 45 +
arch/arm/Makefile | 1 -
arch/arm/boot/dts/cirrus/Makefile | 4 +
arch/arm/boot/dts/cirrus/ep93xx-bk3.dts | 126 ++
arch/arm/boot/dts/cirrus/ep93xx-edb9302.dts | 182 +++
arch/arm/boot/dts/cirrus/ep93xx-ts7250.dts | 145 ++
arch/arm/boot/dts/cirrus/ep93xx.dtsi | 441 ++++++
arch/arm/mach-ep93xx/Kconfig | 20 +-
arch/arm/mach-ep93xx/Makefile | 11 -
arch/arm/mach-ep93xx/clock.c | 733 ----------
arch/arm/mach-ep93xx/core.c | 1017 --------------
arch/arm/mach-ep93xx/dma.c | 114 --
arch/arm/mach-ep93xx/edb93xx.c | 344 -----
arch/arm/mach-ep93xx/ep93xx-regs.h | 38 -
arch/arm/mach-ep93xx/gpio-ep93xx.h | 111 --
arch/arm/mach-ep93xx/hardware.h | 25 -
arch/arm/mach-ep93xx/irqs.h | 76 --
arch/arm/mach-ep93xx/platform.h | 42 -
arch/arm/mach-ep93xx/soc.h | 212 ---
arch/arm/mach-ep93xx/timer-ep93xx.c | 143 --
arch/arm/mach-ep93xx/ts72xx.c | 422 ------
arch/arm/mach-ep93xx/ts72xx.h | 94 --
arch/arm/mach-ep93xx/vision_ep9307.c | 311 -----
drivers/ata/pata_ep93xx.c | 106 +-
drivers/clk/Kconfig | 8 +
drivers/clk/Makefile | 1 +
drivers/clk/clk-ep93xx.c | 849 ++++++++++++
drivers/dma/ep93xx_dma.c | 286 +++-
drivers/gpio/gpio-ep93xx.c | 345 ++---
drivers/input/keyboard/ep93xx_keypad.c | 74 +-
drivers/mtd/nand/raw/Kconfig | 7 +
drivers/mtd/nand/raw/Makefile | 1 +
drivers/mtd/nand/raw/technologic-nand-controller.c | 220 +++
drivers/net/ethernet/cirrus/ep93xx_eth.c | 63 +-
drivers/pinctrl/Kconfig | 7 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/pinctrl-ep93xx.c | 1430 ++++++++++++++++++++
drivers/power/reset/Kconfig | 10 +
drivers/power/reset/Makefile | 1 +
drivers/power/reset/ep93xx-restart.c | 80 ++
drivers/pwm/pwm-ep93xx.c | 26 +-
drivers/soc/Kconfig | 1 +
drivers/soc/Makefile | 1 +
drivers/soc/cirrus/Kconfig | 13 +
drivers/soc/cirrus/Makefile | 2 +
drivers/soc/cirrus/soc-ep93xx.c | 247 ++++
drivers/spi/spi-ep93xx.c | 68 +-
drivers/watchdog/ep93xx_wdt.c | 8 +
drivers/watchdog/ts72xx_wdt.c | 8 +
include/dt-bindings/clock/cirrus,ep9301-syscon.h | 46 +
include/linux/platform_data/dma-ep93xx.h | 94 --
include/linux/platform_data/eth-ep93xx.h | 10 -
include/linux/platform_data/keypad-ep93xx.h | 32 -
include/linux/platform_data/spi-ep93xx.h | 15 -
include/linux/soc/cirrus/ep93xx.h | 47 +-
sound/soc/cirrus/Kconfig | 9 -
sound/soc/cirrus/Makefile | 4 -
sound/soc/cirrus/edb93xx.c | 117 --
sound/soc/cirrus/ep93xx-i2s.c | 19 -
sound/soc/cirrus/ep93xx-pcm.c | 19 +-
72 files changed, 5192 insertions(+), 4514 deletions(-)
---
base-commit: 26aff849438cebcd05f1a647390c4aa700d5c0f1
change-id: 20230605-ep93xx-01c76317e2d2
Best regards,
--
Nikita Shubin <nikita.shubin@maquefel.me>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v6 21/40] dt-bindings: ata: Add Cirrus EP93xx
2023-12-12 8:20 [PATCH v6 00/40] ep93xx device tree conversion Nikita Shubin via B4 Relay
@ 2023-12-12 8:20 ` Nikita Shubin via B4 Relay
2023-12-12 8:20 ` [PATCH v6 22/40] ata: pata_ep93xx: add device tree support Nikita Shubin via B4 Relay
` (3 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Nikita Shubin via B4 Relay @ 2023-12-12 8:20 UTC (permalink / raw)
To: Damien Le Moal, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-ide, devicetree, linux-kernel, Arnd Bergmann,
Krzysztof Kozlowski
From: Nikita Shubin <nikita.shubin@maquefel.me>
Add YAML bindings for ep93xx SoC PATA.
Acked-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
.../bindings/ata/cirrus,ep9312-pata.yaml | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
new file mode 100644
index 000000000000..8130923fdc72
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ata/cirrus,ep9312-pata.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic EP9312 PATA controller
+
+maintainers:
+ - Damien Le Moal <dlemoal@kernel.org>
+
+properties:
+ compatible:
+ oneOf:
+ - const: cirrus,ep9312-pata
+ - items:
+ - const: cirrus,ep9315-pata
+ - const: cirrus,ep9312-pata
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ ide@800a0000 {
+ compatible = "cirrus,ep9312-pata";
+ reg = <0x800a0000 0x38>;
+ interrupt-parent = <&vic1>;
+ interrupts = <8>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ide_default_pins>;
+ };
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v6 22/40] ata: pata_ep93xx: add device tree support
2023-12-12 8:20 [PATCH v6 00/40] ep93xx device tree conversion Nikita Shubin via B4 Relay
2023-12-12 8:20 ` [PATCH v6 21/40] dt-bindings: ata: Add Cirrus EP93xx Nikita Shubin via B4 Relay
@ 2023-12-12 8:20 ` Nikita Shubin via B4 Relay
2023-12-13 18:19 ` Andy Shevchenko
2023-12-12 8:20 ` [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use Nikita Shubin via B4 Relay
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Nikita Shubin via B4 Relay @ 2023-12-12 8:20 UTC (permalink / raw)
To: Sergey Shtylyov, Damien Le Moal; +Cc: linux-ide, linux-kernel, Arnd Bergmann
From: Nikita Shubin <nikita.shubin@maquefel.me>
- add OF ID match table
- drop platform DMA and filters
- change DMA setup to OF, so we can defer probe
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Acked-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
drivers/ata/pata_ep93xx.c | 81 +++++++++++++++++++++++++----------------------
1 file changed, 43 insertions(+), 38 deletions(-)
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index c84a20892f1b..3f33916c2d23 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -44,8 +44,8 @@
#include <linux/delay.h>
#include <linux/dmaengine.h>
#include <linux/ktime.h>
+#include <linux/mod_devicetable.h>
-#include <linux/platform_data/dma-ep93xx.h>
#include <linux/soc/cirrus/ep93xx.h>
#define DRV_NAME "ep93xx-ide"
@@ -126,7 +126,7 @@ enum {
};
struct ep93xx_pata_data {
- const struct platform_device *pdev;
+ struct platform_device *pdev;
void __iomem *ide_base;
struct ata_timing t;
bool iordy;
@@ -135,9 +135,7 @@ struct ep93xx_pata_data {
unsigned long udma_out_phys;
struct dma_chan *dma_rx_channel;
- struct ep93xx_dma_data dma_rx_data;
struct dma_chan *dma_tx_channel;
- struct ep93xx_dma_data dma_tx_data;
};
static void ep93xx_pata_clear_regs(void __iomem *base)
@@ -637,20 +635,13 @@ static void ep93xx_pata_release_dma(struct ep93xx_pata_data *drv_data)
}
}
-static bool ep93xx_pata_dma_filter(struct dma_chan *chan, void *filter_param)
+static int ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
{
- if (ep93xx_dma_chan_is_m2p(chan))
- return false;
-
- chan->private = filter_param;
- return true;
-}
-
-static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
-{
- const struct platform_device *pdev = drv_data->pdev;
+ struct platform_device *pdev = drv_data->pdev;
+ struct device *dev = &pdev->dev;
dma_cap_mask_t mask;
struct dma_slave_config conf;
+ int ret;
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
@@ -660,22 +651,17 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
* to request only one channel, and reprogram it's direction at
* start of new transfer.
*/
- drv_data->dma_rx_data.port = EP93XX_DMA_IDE;
- drv_data->dma_rx_data.direction = DMA_DEV_TO_MEM;
- drv_data->dma_rx_data.name = "ep93xx-pata-rx";
- drv_data->dma_rx_channel = dma_request_channel(mask,
- ep93xx_pata_dma_filter, &drv_data->dma_rx_data);
- if (!drv_data->dma_rx_channel)
- return;
+ drv_data->dma_rx_channel = dma_request_chan(dev, "rx");
+ if (IS_ERR(drv_data->dma_rx_channel)) {
+ ret = PTR_ERR(drv_data->dma_rx_channel);
+ return dev_err_probe(dev, ret, "rx DMA setup failed");
+ }
- drv_data->dma_tx_data.port = EP93XX_DMA_IDE;
- drv_data->dma_tx_data.direction = DMA_MEM_TO_DEV;
- drv_data->dma_tx_data.name = "ep93xx-pata-tx";
- drv_data->dma_tx_channel = dma_request_channel(mask,
- ep93xx_pata_dma_filter, &drv_data->dma_tx_data);
- if (!drv_data->dma_tx_channel) {
- dma_release_channel(drv_data->dma_rx_channel);
- return;
+ drv_data->dma_tx_channel = dma_request_chan(&pdev->dev, "tx");
+ if (IS_ERR(drv_data->dma_tx_channel)) {
+ ret = PTR_ERR(drv_data->dma_tx_channel);
+ dev_err_probe(dev, ret, "tx DMA setup failed");
+ goto fail_release_rx;
}
/* Configure receive channel direction and source address */
@@ -683,10 +669,10 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
conf.direction = DMA_DEV_TO_MEM;
conf.src_addr = drv_data->udma_in_phys;
conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
- if (dmaengine_slave_config(drv_data->dma_rx_channel, &conf)) {
- dev_err(&pdev->dev, "failed to configure rx dma channel\n");
- ep93xx_pata_release_dma(drv_data);
- return;
+ ret = dmaengine_slave_config(drv_data->dma_rx_channel, &conf);
+ if (ret) {
+ dev_err_probe(dev, ret, "failed to configure rx dma channel");
+ goto fail_release_dma;
}
/* Configure transmit channel direction and destination address */
@@ -694,10 +680,20 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
conf.direction = DMA_MEM_TO_DEV;
conf.dst_addr = drv_data->udma_out_phys;
conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
- if (dmaengine_slave_config(drv_data->dma_tx_channel, &conf)) {
- dev_err(&pdev->dev, "failed to configure tx dma channel\n");
- ep93xx_pata_release_dma(drv_data);
+ ret = dmaengine_slave_config(drv_data->dma_tx_channel, &conf);
+ if (ret) {
+ dev_err_probe(dev, ret, "failed to configure tx dma channel");
+ goto fail_release_dma;
}
+
+ return 0;
+
+fail_release_rx:
+ dma_release_channel(drv_data->dma_rx_channel);
+fail_release_dma:
+ ep93xx_pata_release_dma(drv_data);
+
+ return ret;
}
static void ep93xx_pata_dma_start(struct ata_queued_cmd *qc)
@@ -954,7 +950,9 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
drv_data->ide_base = ide_base;
drv_data->udma_in_phys = mem_res->start + IDEUDMADATAIN;
drv_data->udma_out_phys = mem_res->start + IDEUDMADATAOUT;
- ep93xx_pata_dma_init(drv_data);
+ err = ep93xx_pata_dma_init(drv_data);
+ if (err)
+ return err;
/* allocate host */
host = ata_host_alloc(&pdev->dev, 1);
@@ -1021,9 +1019,16 @@ static void ep93xx_pata_remove(struct platform_device *pdev)
ep93xx_ide_release_gpio(pdev);
}
+static const struct of_device_id ep93xx_pata_of_ids[] = {
+ { .compatible = "cirrus,ep9312-pata" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, ep93xx_pata_of_ids);
+
static struct platform_driver ep93xx_pata_platform_driver = {
.driver = {
.name = DRV_NAME,
+ .of_match_table = ep93xx_pata_of_ids,
},
.probe = ep93xx_pata_probe,
.remove_new = ep93xx_pata_remove,
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use
2023-12-12 8:20 [PATCH v6 00/40] ep93xx device tree conversion Nikita Shubin via B4 Relay
2023-12-12 8:20 ` [PATCH v6 21/40] dt-bindings: ata: Add Cirrus EP93xx Nikita Shubin via B4 Relay
2023-12-12 8:20 ` [PATCH v6 22/40] ata: pata_ep93xx: add device tree support Nikita Shubin via B4 Relay
@ 2023-12-12 8:20 ` Nikita Shubin via B4 Relay
2023-12-13 18:16 ` Andy Shevchenko
2023-12-12 11:53 ` [PATCH v6 00/40] ep93xx device tree conversion Uwe Kleine-König
2023-12-13 17:59 ` Andy Shevchenko
4 siblings, 1 reply; 13+ messages in thread
From: Nikita Shubin via B4 Relay @ 2023-12-12 8:20 UTC (permalink / raw)
To: Hartley Sweeten, Alexander Sverdlin, Russell King,
Sergey Shtylyov, Damien Le Moal, Nikita Shubin, Linus Walleij,
Andy Shevchenko, Dmitry Torokhov
Cc: Uwe Kleine-König, linux-arm-kernel, linux-kernel, linux-ide,
Arnd Bergmann
From: Nikita Shubin <nikita.shubin@maquefel.me>
Drop legacy acquire/release since we are using pinctrl for this now.
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Acked-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
arch/arm/mach-ep93xx/core.c | 72 ---------------------------------------
drivers/ata/pata_ep93xx.c | 29 +++++-----------
include/linux/soc/cirrus/ep93xx.h | 4 ---
3 files changed, 8 insertions(+), 97 deletions(-)
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 4ddf1a4cba33..9c6154bb37b5 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -779,78 +779,6 @@ void __init ep93xx_register_ide(void)
platform_device_register(&ep93xx_ide_device);
}
-int ep93xx_ide_acquire_gpio(struct platform_device *pdev)
-{
- int err;
- int i;
-
- err = gpio_request(EP93XX_GPIO_LINE_EGPIO2, dev_name(&pdev->dev));
- if (err)
- return err;
- err = gpio_request(EP93XX_GPIO_LINE_EGPIO15, dev_name(&pdev->dev));
- if (err)
- goto fail_egpio15;
- for (i = 2; i < 8; i++) {
- err = gpio_request(EP93XX_GPIO_LINE_E(i), dev_name(&pdev->dev));
- if (err)
- goto fail_gpio_e;
- }
- for (i = 4; i < 8; i++) {
- err = gpio_request(EP93XX_GPIO_LINE_G(i), dev_name(&pdev->dev));
- if (err)
- goto fail_gpio_g;
- }
- for (i = 0; i < 8; i++) {
- err = gpio_request(EP93XX_GPIO_LINE_H(i), dev_name(&pdev->dev));
- if (err)
- goto fail_gpio_h;
- }
-
- /* GPIO ports E[7:2], G[7:4] and H used by IDE */
- ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_EONIDE |
- EP93XX_SYSCON_DEVCFG_GONIDE |
- EP93XX_SYSCON_DEVCFG_HONIDE);
- return 0;
-
-fail_gpio_h:
- for (--i; i >= 0; --i)
- gpio_free(EP93XX_GPIO_LINE_H(i));
- i = 8;
-fail_gpio_g:
- for (--i; i >= 4; --i)
- gpio_free(EP93XX_GPIO_LINE_G(i));
- i = 8;
-fail_gpio_e:
- for (--i; i >= 2; --i)
- gpio_free(EP93XX_GPIO_LINE_E(i));
- gpio_free(EP93XX_GPIO_LINE_EGPIO15);
-fail_egpio15:
- gpio_free(EP93XX_GPIO_LINE_EGPIO2);
- return err;
-}
-EXPORT_SYMBOL(ep93xx_ide_acquire_gpio);
-
-void ep93xx_ide_release_gpio(struct platform_device *pdev)
-{
- int i;
-
- for (i = 2; i < 8; i++)
- gpio_free(EP93XX_GPIO_LINE_E(i));
- for (i = 4; i < 8; i++)
- gpio_free(EP93XX_GPIO_LINE_G(i));
- for (i = 0; i < 8; i++)
- gpio_free(EP93XX_GPIO_LINE_H(i));
- gpio_free(EP93XX_GPIO_LINE_EGPIO15);
- gpio_free(EP93XX_GPIO_LINE_EGPIO2);
-
-
- /* GPIO ports E[7:2], G[7:4] and H used by GPIO */
- ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_EONIDE |
- EP93XX_SYSCON_DEVCFG_GONIDE |
- EP93XX_SYSCON_DEVCFG_HONIDE);
-}
-EXPORT_SYMBOL(ep93xx_ide_release_gpio);
-
/*************************************************************************
* EP93xx ADC
*************************************************************************/
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index 3f33916c2d23..83c2a0162cb0 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -652,13 +652,13 @@ static int ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
* start of new transfer.
*/
drv_data->dma_rx_channel = dma_request_chan(dev, "rx");
- if (IS_ERR(drv_data->dma_rx_channel)) {
+ if (PTR_ERR_OR_ZERO(drv_data->dma_rx_channel)) {
ret = PTR_ERR(drv_data->dma_rx_channel);
return dev_err_probe(dev, ret, "rx DMA setup failed");
}
drv_data->dma_tx_channel = dma_request_chan(&pdev->dev, "tx");
- if (IS_ERR(drv_data->dma_tx_channel)) {
+ if (PTR_ERR_OR_ZERO(drv_data->dma_tx_channel)) {
ret = PTR_ERR(drv_data->dma_tx_channel);
dev_err_probe(dev, ret, "tx DMA setup failed");
goto fail_release_rx;
@@ -923,28 +923,18 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
void __iomem *ide_base;
int err;
- err = ep93xx_ide_acquire_gpio(pdev);
- if (err)
- return err;
-
/* INT[3] (IRQ_EP93XX_EXT3) line connected as pull down */
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- err = irq;
- goto err_rel_gpio;
- }
+ if (irq < 0)
+ return irq;
ide_base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
- if (IS_ERR(ide_base)) {
- err = PTR_ERR(ide_base);
- goto err_rel_gpio;
- }
+ if (IS_ERR(ide_base))
+ return PTR_ERR(ide_base);
drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL);
- if (!drv_data) {
- err = -ENOMEM;
- goto err_rel_gpio;
- }
+ if (!drv_data)
+ return -ENOMEM;
drv_data->pdev = pdev;
drv_data->ide_base = ide_base;
@@ -1003,8 +993,6 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
err_rel_dma:
ep93xx_pata_release_dma(drv_data);
-err_rel_gpio:
- ep93xx_ide_release_gpio(pdev);
return err;
}
@@ -1016,7 +1004,6 @@ static void ep93xx_pata_remove(struct platform_device *pdev)
ata_host_detach(host);
ep93xx_pata_release_dma(drv_data);
ep93xx_pata_clear_regs(drv_data->ide_base);
- ep93xx_ide_release_gpio(pdev);
}
static const struct of_device_id ep93xx_pata_of_ids[] = {
diff --git a/include/linux/soc/cirrus/ep93xx.h b/include/linux/soc/cirrus/ep93xx.h
index fc4a2f9d4729..da8bdfc36526 100644
--- a/include/linux/soc/cirrus/ep93xx.h
+++ b/include/linux/soc/cirrus/ep93xx.h
@@ -37,15 +37,11 @@ struct ep93xx_regmap_adev {
container_of((_adev), struct ep93xx_regmap_adev, adev)
#ifdef CONFIG_ARCH_EP93XX
-int ep93xx_ide_acquire_gpio(struct platform_device *pdev);
-void ep93xx_ide_release_gpio(struct platform_device *pdev);
int ep93xx_i2s_acquire(void);
void ep93xx_i2s_release(void);
unsigned int ep93xx_chip_revision(void);
#else
-static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; }
-static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {}
static inline int ep93xx_i2s_acquire(void) { return 0; }
static inline void ep93xx_i2s_release(void) {}
static inline unsigned int ep93xx_chip_revision(void) { return 0; }
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v6 00/40] ep93xx device tree conversion
2023-12-12 8:20 [PATCH v6 00/40] ep93xx device tree conversion Nikita Shubin via B4 Relay
` (2 preceding siblings ...)
2023-12-12 8:20 ` [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use Nikita Shubin via B4 Relay
@ 2023-12-12 11:53 ` Uwe Kleine-König
2023-12-13 17:59 ` Andy Shevchenko
4 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-12-12 11:53 UTC (permalink / raw)
To: nikita.shubin
Cc: Hartley Sweeten, Alexander Sverdlin, Russell King,
Lukasz Majewski, Linus Walleij, Bartosz Golaszewski,
Andy Shevchenko, Michael Turquette, Stephen Boyd,
Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vinod Koul, Wim Van Sebroeck, Guenter Roeck, Thierry Reding,
Mark Brown, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Damien Le Moal, Sergey Shtylyov,
Dmitry Torokhov, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
linux-arm-kernel, linux-kernel, linux-gpio, linux-clk, linux-pm,
devicetree, dmaengine, linux-watchdog, linux-pwm, linux-spi,
netdev, linux-mtd, linux-ide, linux-input, linux-sound,
Arnd Bergmann, Bartosz Golaszewski, Krzysztof Kozlowski,
Andrew Lunn, Andy Shevchenko, Andy Shevchenko
[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]
Hello,
On Tue, Dec 12, 2023 at 11:20:17AM +0300, Nikita Shubin via B4 Relay wrote:
> No major changes since last version all changes are cometic.
>
> Following patches require attention from Stephen Boyd, as they were converted to aux_dev as suggested:
>
> - ARM: ep93xx: add regmap aux_dev
> - clk: ep93xx: add DT support for Cirrus EP93xx
>
> DMA related patches still require Acked or Reviewed tags.
>
> got approval LGTM from Miquel:
> - mtd: rawnand: add support for ts72xx
> Link: https://lore.kernel.org/lkml/20231004103911.2aa65354@xps-13/
>
> new patches:
>
> ARM: ep93xx: Add terminator to gpiod_lookup_table
> - fixed terminator in gpiod_lockup_table
>
> So mostly all patches got approval.
>
> Patches should be now formated with '--histogram'
You didn't mention how this should be merged. IIRC for the earlier
rounds the idea was to merge it all together via arm-soc when all
necessary agreement is reached. I assume that's still the case here?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v6 00/40] ep93xx device tree conversion
2023-12-12 8:20 [PATCH v6 00/40] ep93xx device tree conversion Nikita Shubin via B4 Relay
` (3 preceding siblings ...)
2023-12-12 11:53 ` [PATCH v6 00/40] ep93xx device tree conversion Uwe Kleine-König
@ 2023-12-13 17:59 ` Andy Shevchenko
2023-12-23 9:12 ` Nikita Shubin
4 siblings, 1 reply; 13+ messages in thread
From: Andy Shevchenko @ 2023-12-13 17:59 UTC (permalink / raw)
To: Nikita Shubin
Cc: Hartley Sweeten, Alexander Sverdlin, Russell King,
Lukasz Majewski, Linus Walleij, Bartosz Golaszewski,
Michael Turquette, Stephen Boyd, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul, Wim Van Sebroeck,
Guenter Roeck, Thierry Reding, Uwe Kleine-König, Mark Brown,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Damien Le Moal, Sergey Shtylyov, Dmitry Torokhov, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, linux-arm-kernel, linux-kernel,
linux-gpio, linux-clk, linux-pm, devicetree, dmaengine,
linux-watchdog, linux-pwm, linux-spi, netdev, linux-mtd,
linux-ide, linux-input, linux-sound, Arnd Bergmann,
Bartosz Golaszewski, Krzysztof Kozlowski, Andrew Lunn
On Tue, Dec 12, 2023 at 11:20:17AM +0300, Nikita Shubin wrote:
> No major changes since last version all changes are cometic.
>
> Following patches require attention from Stephen Boyd, as they were converted to aux_dev as suggested:
>
> - ARM: ep93xx: add regmap aux_dev
> - clk: ep93xx: add DT support for Cirrus EP93xx
>
> DMA related patches still require Acked or Reviewed tags.
>
> got approval LGTM from Miquel:
> - mtd: rawnand: add support for ts72xx
> Link: https://lore.kernel.org/lkml/20231004103911.2aa65354@xps-13/
>
> new patches:
>
> ARM: ep93xx: Add terminator to gpiod_lookup_table
> - fixed terminator in gpiod_lockup_table
>
> So mostly all patches got approval.
>
> Patches should be now formated with '--histogram'
It _feels_ like some tags might be missing.
In any case I suggest to use `b4` tool to retrieve tags when preparing
the next version:
git checkout -b vXX v6.7-rcX
b4 am -slt $MSG_ID_OF_v(XX-1)
git am ...
git rebase --interactive ... # to address comments
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use
2023-12-12 8:20 ` [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use Nikita Shubin via B4 Relay
@ 2023-12-13 18:16 ` Andy Shevchenko
2023-12-13 18:33 ` Uwe Kleine-König
0 siblings, 1 reply; 13+ messages in thread
From: Andy Shevchenko @ 2023-12-13 18:16 UTC (permalink / raw)
To: Nikita Shubin
Cc: Hartley Sweeten, Alexander Sverdlin, Russell King,
Sergey Shtylyov, Damien Le Moal, Linus Walleij, Dmitry Torokhov,
Uwe Kleine-König, linux-arm-kernel, linux-kernel, linux-ide,
Arnd Bergmann
On Tue, Dec 12, 2023 at 11:20:53AM +0300, Nikita Shubin wrote:
> Drop legacy acquire/release since we are using pinctrl for this now.
...
> - if (IS_ERR(drv_data->dma_rx_channel)) {
> + if (PTR_ERR_OR_ZERO(drv_data->dma_rx_channel)) {
This seems incorrect.
> ret = PTR_ERR(drv_data->dma_rx_channel);
> return dev_err_probe(dev, ret, "rx DMA setup failed");
return dev_err_probe(...);
> }
I think you wanted
ret = PTR_ERR_OR_ZERO(drv_data->dma_rx_channel);
if (ret)
return dev_err_probe(dev, ret, "rx DMA setup failed");
...
> drv_data->dma_tx_channel = dma_request_chan(&pdev->dev, "tx");
> - if (IS_ERR(drv_data->dma_tx_channel)) {
> + if (PTR_ERR_OR_ZERO(drv_data->dma_tx_channel)) {
> ret = PTR_ERR(drv_data->dma_tx_channel);
> dev_err_probe(dev, ret, "tx DMA setup failed");
> goto fail_release_rx;
Ditto.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v6 22/40] ata: pata_ep93xx: add device tree support
2023-12-12 8:20 ` [PATCH v6 22/40] ata: pata_ep93xx: add device tree support Nikita Shubin via B4 Relay
@ 2023-12-13 18:19 ` Andy Shevchenko
0 siblings, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2023-12-13 18:19 UTC (permalink / raw)
To: Nikita Shubin
Cc: Sergey Shtylyov, Damien Le Moal, linux-ide, linux-kernel,
Arnd Bergmann
On Tue, Dec 12, 2023 at 11:20:39AM +0300, Nikita Shubin wrote:
> - add OF ID match table
> - drop platform DMA and filters
> - change DMA setup to OF, so we can defer probe
...
> + drv_data->dma_rx_channel = dma_request_chan(dev, "rx");
> + if (IS_ERR(drv_data->dma_rx_channel)) {
> + ret = PTR_ERR(drv_data->dma_rx_channel);
> + return dev_err_probe(dev, ret, "rx DMA setup failed");
> + }
See the comments to other patches about PTR_ERR_OR_ZERO() use and
returning dev_err_probe().
...
> + drv_data->dma_tx_channel = dma_request_chan(&pdev->dev, "tx");
> + if (IS_ERR(drv_data->dma_tx_channel)) {
> + ret = PTR_ERR(drv_data->dma_tx_channel);
> + dev_err_probe(dev, ret, "tx DMA setup failed");
> + goto fail_release_rx;
> }
Ditto.
...
Seems like broken rebase or so as some of the latter changes in this file
should be done here.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use
2023-12-13 18:16 ` Andy Shevchenko
@ 2023-12-13 18:33 ` Uwe Kleine-König
2023-12-13 18:48 ` Andy Shevchenko
0 siblings, 1 reply; 13+ messages in thread
From: Uwe Kleine-König @ 2023-12-13 18:33 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Nikita Shubin, Hartley Sweeten, Alexander Sverdlin, Russell King,
Sergey Shtylyov, Damien Le Moal, Linus Walleij, Dmitry Torokhov,
linux-arm-kernel, linux-kernel, linux-ide, Arnd Bergmann
[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]
On Wed, Dec 13, 2023 at 08:16:26PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 12, 2023 at 11:20:53AM +0300, Nikita Shubin wrote:
> > Drop legacy acquire/release since we are using pinctrl for this now.
>
> ...
>
> > - if (IS_ERR(drv_data->dma_rx_channel)) {
> > + if (PTR_ERR_OR_ZERO(drv_data->dma_rx_channel)) {
>
> This seems incorrect.
>
> > ret = PTR_ERR(drv_data->dma_rx_channel);
> > return dev_err_probe(dev, ret, "rx DMA setup failed");
>
> return dev_err_probe(...);
>
> > }
>
> I think you wanted
>
> ret = PTR_ERR_OR_ZERO(drv_data->dma_rx_channel);
> if (ret)
> return dev_err_probe(dev, ret, "rx DMA setup failed");
How is that different from
if (IS_ERR(drv_data->dma_rx_channel))
return dev_err_probe(dev, PTR_ERR(drv_data->dma_rx_channel), "....");
(which seems to be more idiomatic to me)? While I was involved in
creating PTR_ERR_OR_ZERO, I don't particularily like it (today).
Also note that you want a \n at the end of error messages.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use
2023-12-13 18:33 ` Uwe Kleine-König
@ 2023-12-13 18:48 ` Andy Shevchenko
2023-12-14 10:26 ` Uwe Kleine-König
0 siblings, 1 reply; 13+ messages in thread
From: Andy Shevchenko @ 2023-12-13 18:48 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Nikita Shubin, Hartley Sweeten, Alexander Sverdlin, Russell King,
Sergey Shtylyov, Damien Le Moal, Linus Walleij, Dmitry Torokhov,
linux-arm-kernel, linux-kernel, linux-ide, Arnd Bergmann
On Wed, Dec 13, 2023 at 07:33:49PM +0100, Uwe Kleine-König wrote:
> On Wed, Dec 13, 2023 at 08:16:26PM +0200, Andy Shevchenko wrote:
> > On Tue, Dec 12, 2023 at 11:20:53AM +0300, Nikita Shubin wrote:
> > > Drop legacy acquire/release since we are using pinctrl for this now.
...
> > > - if (IS_ERR(drv_data->dma_rx_channel)) {
> > > + if (PTR_ERR_OR_ZERO(drv_data->dma_rx_channel)) {
> >
> > This seems incorrect.
> >
> > > ret = PTR_ERR(drv_data->dma_rx_channel);
> > > return dev_err_probe(dev, ret, "rx DMA setup failed");
> >
> > return dev_err_probe(...);
> >
> > > }
> >
> > I think you wanted
> >
> > ret = PTR_ERR_OR_ZERO(drv_data->dma_rx_channel);
> > if (ret)
> > return dev_err_probe(dev, ret, "rx DMA setup failed");
>
> How is that different from
>
> if (IS_ERR(drv_data->dma_rx_channel))
> return dev_err_probe(dev, PTR_ERR(drv_data->dma_rx_channel), "....");
>
> (which seems to be more idiomatic to me)? While I was involved in
> creating PTR_ERR_OR_ZERO, I don't particularily like it (today).
Makes lines shorter, either works for me.
> Also note that you want a \n at the end of error messages.
Indeed.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use
2023-12-13 18:48 ` Andy Shevchenko
@ 2023-12-14 10:26 ` Uwe Kleine-König
0 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-12-14 10:26 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Nikita Shubin, Hartley Sweeten, Alexander Sverdlin, Russell King,
Sergey Shtylyov, Damien Le Moal, Linus Walleij, Dmitry Torokhov,
linux-arm-kernel, linux-kernel, linux-ide, Arnd Bergmann
[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]
On Wed, Dec 13, 2023 at 08:48:55PM +0200, Andy Shevchenko wrote:
> On Wed, Dec 13, 2023 at 07:33:49PM +0100, Uwe Kleine-König wrote:
> > On Wed, Dec 13, 2023 at 08:16:26PM +0200, Andy Shevchenko wrote:
> > > On Tue, Dec 12, 2023 at 11:20:53AM +0300, Nikita Shubin wrote:
> > > > Drop legacy acquire/release since we are using pinctrl for this now.
>
> ...
>
> > > I think you wanted
> > >
> > > ret = PTR_ERR_OR_ZERO(drv_data->dma_rx_channel);
> > > if (ret)
> > > return dev_err_probe(dev, ret, "rx DMA setup failed");
> >
> > How is that different from
> >
> > if (IS_ERR(drv_data->dma_rx_channel))
> > return dev_err_probe(dev, PTR_ERR(drv_data->dma_rx_channel), "....");
> >
> > (which seems to be more idiomatic to me)? While I was involved in
> > creating PTR_ERR_OR_ZERO, I don't particularily like it (today).
>
> Makes lines shorter, either works for me.
If you want shorter lines, I'd prefer
if (IS_ERR(drv_data->dma_rx_channel)) {
ret = PTR_ERR(drv_data->dma_rx_channel);
return dev_err_probe(dev, ret, "...\n");
}
over
ret = PTR_ERR_OR_ZERO(drv_data->dma_rx_channel);
if (ret)
return dev_err_probe(dev, ret, "\n");
even though it's one line longer because the if body needs curly braces.
I think it's easier to parse for a human which IMHO matters more than
the additional line. But I'm aware that might be subjective.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v6 00/40] ep93xx device tree conversion
2023-12-13 17:59 ` Andy Shevchenko
@ 2023-12-23 9:12 ` Nikita Shubin
2023-12-25 19:55 ` Andy Shevchenko
0 siblings, 1 reply; 13+ messages in thread
From: Nikita Shubin @ 2023-12-23 9:12 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Hartley Sweeten, Alexander Sverdlin, Russell King,
Lukasz Majewski, Linus Walleij, Bartosz Golaszewski,
Michael Turquette, Stephen Boyd, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul, Wim Van Sebroeck,
Guenter Roeck, Thierry Reding, Uwe Kleine-König, Mark Brown,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Damien Le Moal, Sergey Shtylyov, Dmitry Torokhov, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, linux-arm-kernel, linux-kernel,
linux-gpio, linux-clk, linux-pm, devicetree, dmaengine,
linux-watchdog, linux-pwm, linux-spi, netdev, linux-mtd,
linux-ide, linux-input, linux-sound, Arnd Bergmann,
Bartosz Golaszewski, Krzysztof Kozlowski, Andrew Lunn
Hello Andy!
On Wed, 2023-12-13 at 19:59 +0200, Andy Shevchenko wrote:
> On Tue, Dec 12, 2023 at 11:20:17AM +0300, Nikita Shubin wrote:
> > No major changes since last version all changes are cometic.
> >
> > Following patches require attention from Stephen Boyd, as they were
> > converted to aux_dev as suggested:
> >
> > - ARM: ep93xx: add regmap aux_dev
> > - clk: ep93xx: add DT support for Cirrus EP93xx
> >
> > DMA related patches still require Acked or Reviewed tags.
> >
> > got approval LGTM from Miquel:
> > - mtd: rawnand: add support for ts72xx
> > Link: https://lore.kernel.org/lkml/20231004103911.2aa65354@xps-13/
> >
> > new patches:
> >
> > ARM: ep93xx: Add terminator to gpiod_lookup_table
> > - fixed terminator in gpiod_lockup_table
> >
> > So mostly all patches got approval.
> >
> > Patches should be now formated with '--histogram'
>
> It _feels_ like some tags might be missing.
> In any case I suggest to use `b4` tool to retrieve tags when
> preparing
> the next version:
>
> git checkout -b vXX v6.7-rcX
> b4 am -slt $MSG_ID_OF_v(XX-1)
> git am ...
> git rebase --interactive ... # to address comments
>
I moved to b4 a few iterations ago:
```
Calculating patch-ids from commits, this may take a moment...
Checking change-id "20230605-ep93xx-01c76317e2d2"
Grabbing search results from lore.kernel.org
Grabbing thread from lore.kernel.org/all/20230424123522.18302-1-
nikita.shubin%40maquefel.me/t.mbox.gz
---
NOTE: some trailers ignored due to from/email mismatches:
! Trailer: Tested-by: Michael Peters <mpeters@embeddedTS.com>
Msg From: Kris Bahnsen <kris@embeddedTS.com>
NOTE: Rerun with -S to apply them anyway
No trailer updates found.
```
I haven't found any missing tags, that b4 didn't apply, the ones above
refer to a very old iteration and were given to cover letter and i
don't feel like they need to be included.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v6 00/40] ep93xx device tree conversion
2023-12-23 9:12 ` Nikita Shubin
@ 2023-12-25 19:55 ` Andy Shevchenko
0 siblings, 0 replies; 13+ messages in thread
From: Andy Shevchenko @ 2023-12-25 19:55 UTC (permalink / raw)
To: Nikita Shubin
Cc: Andy Shevchenko, Hartley Sweeten, Alexander Sverdlin,
Russell King, Lukasz Majewski, Linus Walleij, Bartosz Golaszewski,
Michael Turquette, Stephen Boyd, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul, Wim Van Sebroeck,
Guenter Roeck, Thierry Reding, Uwe Kleine-König, Mark Brown,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Damien Le Moal, Sergey Shtylyov, Dmitry Torokhov, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, linux-arm-kernel, linux-kernel,
linux-gpio, linux-clk, linux-pm, devicetree, dmaengine,
linux-watchdog, linux-pwm, linux-spi, netdev, linux-mtd,
linux-ide, linux-input, linux-sound, Arnd Bergmann,
Bartosz Golaszewski, Krzysztof Kozlowski, Andrew Lunn
On Sat, Dec 23, 2023 at 11:13 AM Nikita Shubin
<nikita.shubin@maquefel.me> wrote:
> On Wed, 2023-12-13 at 19:59 +0200, Andy Shevchenko wrote:
...
> I haven't found any missing tags, that b4 didn't apply, the ones above
> refer to a very old iteration and were given to cover letter and i
> don't feel like they need to be included.
When somebody gives you a tag against a cover letter, it means the
entire series (if not spelled differently). `b4` even has a parameter
-t for that IIRC.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-12-25 19:55 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-12 8:20 [PATCH v6 00/40] ep93xx device tree conversion Nikita Shubin via B4 Relay
2023-12-12 8:20 ` [PATCH v6 21/40] dt-bindings: ata: Add Cirrus EP93xx Nikita Shubin via B4 Relay
2023-12-12 8:20 ` [PATCH v6 22/40] ata: pata_ep93xx: add device tree support Nikita Shubin via B4 Relay
2023-12-13 18:19 ` Andy Shevchenko
2023-12-12 8:20 ` [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use Nikita Shubin via B4 Relay
2023-12-13 18:16 ` Andy Shevchenko
2023-12-13 18:33 ` Uwe Kleine-König
2023-12-13 18:48 ` Andy Shevchenko
2023-12-14 10:26 ` Uwe Kleine-König
2023-12-12 11:53 ` [PATCH v6 00/40] ep93xx device tree conversion Uwe Kleine-König
2023-12-13 17:59 ` Andy Shevchenko
2023-12-23 9:12 ` Nikita Shubin
2023-12-25 19:55 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).