* Re: [PATCH 00/43] ep93xx device tree conversion
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
@ 2023-04-24 11:31 ` Arnd Bergmann
[not found] ` <20230424152933.48b2ede1@kernel.org>
2023-04-24 12:34 ` [PATCH 24/43] dt-bindings: ata: Add DT bindings ep93xx pata Nikita Shubin
` (6 subsequent siblings)
7 siblings, 1 reply; 26+ messages in thread
From: Arnd Bergmann @ 2023-04-24 11:31 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
David S . Miller, Jonathan Neuschäfer, Russell King,
Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
Alexandre Belloni, Andy Shevchenko, Bartosz Golaszewski,
Brian Norris, Chuanhong Guo, Conor.Dooley, Damien Le Moal,
Daniel Lezcano, Dmitry Torokhov, Emil Renner Berthing,
Eric Dumazet, Florian Fainelli, Guenter Roeck, Hartley Sweeten,
Heiko Stübner, Hitomi Hasegawa, Jakub Kicinski,
Jaroslav Kysela, Jean Delvare, Joel Stanley, Jonathan Cameron,
Krzysztof Kozlowski, Damien Le Moal, Liam Girdwood, Liang Yang,
Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
Masahiro Yamada, Michael Turquette, Miquel Raynal,
Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
linux-arm-kernel, linux-clk, open list:GPIO SUBSYSTEM, linux-ide,
linux-input, linux-kernel, linux-mtd, linux-pm, linux-pwm,
linux-rtc, linux-spi, linux-watchdog, Netdev, soc
On Mon, Apr 24, 2023, at 14:34, Nikita Shubin wrote:
> This series aims to convert ep93xx from platform to full device tree support.
>
> Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
>
> Thank you Linus and Arnd for your support, review and comments, sorry
> if i missed something -
> these series are quite big for me.
>
> Big thanks to Alexander Sverdlin for his testing, support, review,
> fixes and patches.
Thanks a lot for your continued work. I can't merge any of this at
the moment since the upstream merge window just opened, but I'm
happy to take this all through the soc tree for 6.5, provided we
get the sufficient Acks from the subsystem maintainers. Merging
it through each individual tree would take a lot longer, so I
hope we can avoid that.
Arnd
^ permalink raw reply [flat|nested] 26+ messages in thread* [PATCH 24/43] dt-bindings: ata: Add DT bindings ep93xx pata
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
2023-04-24 11:31 ` Arnd Bergmann
@ 2023-04-24 12:34 ` Nikita Shubin
2023-04-24 13:16 ` Damien Le Moal
2023-04-24 12:34 ` [PATCH 25/43] pata: cirrus: add DT support for Cirrus EP93xx Nikita Shubin
` (5 subsequent siblings)
7 siblings, 1 reply; 26+ messages in thread
From: Nikita Shubin @ 2023-04-24 12:34 UTC (permalink / raw)
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, Damien Le Moal,
Rob Herring, Krzysztof Kozlowski, Le Moal, linux-ide, devicetree,
linux-kernel
Add YAML bindings ep93xx SoC.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
.../bindings/ata/cirrus,ep93xx-pata.yaml | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep93xx-pata.yaml
diff --git a/Documentation/devicetree/bindings/ata/cirrus,ep93xx-pata.yaml b/Documentation/devicetree/bindings/ata/cirrus,ep93xx-pata.yaml
new file mode 100644
index 000000000000..24ed64cfa6d1
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/cirrus,ep93xx-pata.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ata/cirrus,ep93xx-pata.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: EP9312 PATA controller driver
+
+maintainers:
+ - Damien Le Moal <damien.lemoal@opensource.wdc.com>
+
+properties:
+ compatible:
+ const: cirrus,ep9312-pata
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ ide: ide@800a0000 {
+ compatible = "cirrus,ep9312-pata";
+ reg = <0x800a0000 0x38>;
+ interrupt-parent = <&vic1>;
+ interrupts = <8>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ide_default_pins>;
+ };
+
+...
--
2.39.2
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH 24/43] dt-bindings: ata: Add DT bindings ep93xx pata
2023-04-24 12:34 ` [PATCH 24/43] dt-bindings: ata: Add DT bindings ep93xx pata Nikita Shubin
@ 2023-04-24 13:16 ` Damien Le Moal
0 siblings, 0 replies; 26+ messages in thread
From: Damien Le Moal @ 2023-04-24 13:16 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, Rob Herring,
Krzysztof Kozlowski, linux-ide, devicetree, linux-kernel
On 4/24/23 21:34, Nikita Shubin wrote:
> Add YAML bindings ep93xx SoC.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
> .../bindings/ata/cirrus,ep93xx-pata.yaml | 40 +++++++++++++++++++
> 1 file changed, 40 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep93xx-pata.yaml
>
> diff --git a/Documentation/devicetree/bindings/ata/cirrus,ep93xx-pata.yaml b/Documentation/devicetree/bindings/ata/cirrus,ep93xx-pata.yaml
> new file mode 100644
> index 000000000000..24ed64cfa6d1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/cirrus,ep93xx-pata.yaml
> @@ -0,0 +1,40 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/ata/cirrus,ep93xx-pata.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: EP9312 PATA controller driver
> +
> +maintainers:
> + - Damien Le Moal <damien.lemoal@opensource.wdc.com>
Wrong email address. Please use dlemoal@kernel.org as mentioned in the
MAINTAINERS file.
(other schema files need to be changed as well. Will send a patch for that)
> +
> +properties:
> + compatible:
> + const: cirrus,ep9312-pata
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + ide: ide@800a0000 {
> + compatible = "cirrus,ep9312-pata";
> + reg = <0x800a0000 0x38>;
> + interrupt-parent = <&vic1>;
> + interrupts = <8>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&ide_default_pins>;
> + };
> +
> +...
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 25/43] pata: cirrus: add DT support for Cirrus EP93xx
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
2023-04-24 11:31 ` Arnd Bergmann
2023-04-24 12:34 ` [PATCH 24/43] dt-bindings: ata: Add DT bindings ep93xx pata Nikita Shubin
@ 2023-04-24 12:34 ` Nikita Shubin
2023-04-26 20:56 ` [PATCH 00/43] ep93xx device tree conversion Linus Walleij
` (4 subsequent siblings)
7 siblings, 0 replies; 26+ messages in thread
From: Nikita Shubin @ 2023-04-24 12:34 UTC (permalink / raw)
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, Sergey Shtylyov,
Damien Le Moal, linux-ide, linux-kernel
- find register range from the device tree
- get interrupts from device tree
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
Arnd Bergmann:
- wildcards ep93xx to something meaningful, i.e. ep9301
- drop wrappers
drivers/ata/pata_ep93xx.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index 47845d920075..09c95758389e 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -40,6 +40,8 @@
#include <linux/ata.h>
#include <linux/libata.h>
#include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
#include <linux/delay.h>
#include <linux/dmaengine.h>
#include <linux/ktime.h>
@@ -1016,9 +1018,16 @@ static int ep93xx_pata_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id ep93xx_pata_of_ids[] = {
+ { .compatible = "cirrus,ep9312-pata" },
+ {},
+};
+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 = ep93xx_pata_remove,
--
2.39.2
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH 00/43] ep93xx device tree conversion
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (2 preceding siblings ...)
2023-04-24 12:34 ` [PATCH 25/43] pata: cirrus: add DT support for Cirrus EP93xx Nikita Shubin
@ 2023-04-26 20:56 ` Linus Walleij
[not found] ` <b5396ef5-3fed-4e98-8f37-a9cd4473bddc@sirena.org.uk>
2023-05-16 3:47 ` Florian Fainelli
` (3 subsequent siblings)
7 siblings, 1 reply; 26+ messages in thread
From: Linus Walleij @ 2023-04-26 20:56 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, David S. Miller,
Jonathan Neuschäfer, Russell King (Oracle),
Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
Emil Renner Berthing, Eric Dumazet, Florian Fainelli,
Guenter Roeck, Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa,
Jakub Kicinski, Jaroslav Kysela, Jean Delvare, Joel Stanley,
Jonathan Cameron, Krzysztof Kozlowski, Le Moal, Liam Girdwood,
Liang Yang, Lukasz Majewski, Lv Ruyi, Mark Brown, Masahiro Yamada,
Michael Turquette, Miquel Raynal, Nathan Chancellor,
Nick Desaulniers, Nicolas Saenz Julienne, Olof Johansson,
Paolo Abeni, Qin Jian, Richard Weinberger, Rob Herring,
Robert Jarzmik, Russell King, Sebastian Reichel, Sergey Shtylyov,
Stephen Boyd, Sumanth Korikkar, Sven Peter, Takashi Iwai,
Thierry Reding, Thomas Gleixner, Ulf Hansson, Vasily Gorbik,
Vignesh Raghavendra, Vinod Koul, Walker Chen, Wim Van Sebroeck,
Yinbo Zhu, alsa-devel, devicetree, dmaengine, linux-arm-kernel,
linux-clk, linux-gpio, linux-ide, linux-input, linux-kernel,
linux-mtd, linux-pm, linux-pwm, linux-rtc, linux-spi,
linux-watchdog, netdev, soc
On Mon, Apr 24, 2023 at 11:35 AM Nikita Shubin
<nikita.shubin@maquefel.me> wrote:
> This series aims to convert ep93xx from platform to full device tree support.
>
> Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
Neat, I'd say let's merge this for 6.5 once the final rough edges are
off. The DT bindings should be easy to fix.
This is a big patch set and the improvement to the ARM kernel it
brings is great, so I am a bit worried about over-review stalling the
merged. If there start to be nitpicky comments I would prefer that
we merge it and let minor comments and "nice-to-haves" be
addressed in-tree during the development cycle.
I encourage you to use b4 to manage the patch series if you
have time to learn it, it could help you:
https://people.kernel.org/monsieuricon/sending-a-kernel-patch-with-b4-part-1
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH 00/43] ep93xx device tree conversion
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (3 preceding siblings ...)
2023-04-26 20:56 ` [PATCH 00/43] ep93xx device tree conversion Linus Walleij
@ 2023-05-16 3:47 ` Florian Fainelli
2023-05-16 10:37 ` Nikita Shubin
2023-06-01 5:45 ` [PATCH v1 25/43] dt-bindings: ata: Add Cirrus EP93xx Nikita Shubin
` (2 subsequent siblings)
7 siblings, 1 reply; 26+ messages in thread
From: Florian Fainelli @ 2023-05-16 3:47 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, David S. Miller,
Jonathan Neuschäfer, Russell King (Oracle),
Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
Emil Renner Berthing, Eric Dumazet, Guenter Roeck,
Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa, Jakub Kicinski,
Jaroslav Kysela, Jean Delvare, Joel Stanley, Jonathan Cameron,
Krzysztof Kozlowski, Le Moal, Liam Girdwood, Liang Yang,
Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
Masahiro Yamada, Michael Turquette, Miquel Raynal,
Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
linux-arm-kernel, linux-clk, linux-gpio, linux-ide, linux-input,
linux-kernel, linux-mtd, linux-pm, linux-pwm, linux-rtc,
linux-spi, linux-watchdog, netdev, soc
On 4/24/2023 5:34 AM, Nikita Shubin wrote:
> This series aims to convert ep93xx from platform to full device tree support.
>
> Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
>
> Thank you Linus and Arnd for your support, review and comments, sorry if i missed something -
> these series are quite big for me.
>
> Big thanks to Alexander Sverdlin for his testing, support, review, fixes and patches.
If anyone is interested I still have a TS-7300 board [1] that is fully
functional and could be sent out to a new home.
https://www.embeddedts.com/products/TS-7300
--
Florian
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH 00/43] ep93xx device tree conversion
2023-05-16 3:47 ` Florian Fainelli
@ 2023-05-16 10:37 ` Nikita Shubin
0 siblings, 0 replies; 26+ messages in thread
From: Nikita Shubin @ 2023-05-16 10:37 UTC (permalink / raw)
To: Florian Fainelli
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, David S. Miller,
Jonathan Neuschäfer, Russell King (Oracle),
Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
Emil Renner Berthing, Eric Dumazet, Guenter Roeck,
Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa, Jakub Kicinski,
Jaroslav Kysela, Jean Delvare, Joel Stanley, Jonathan Cameron,
Krzysztof Kozlowski, Le Moal, Liam Girdwood, Liang Yang,
Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
Masahiro Yamada, Michael Turquette, Miquel Raynal,
Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
linux-arm-kernel, linux-clk, linux-gpio, linux-ide, linux-input,
linux-kernel, linux-mtd, linux-pm, linux-pwm, linux-rtc,
linux-spi, linux-watchdog, netdev, soc
Hello Florian!
On Mon, 2023-05-15 at 20:47 -0700, Florian Fainelli wrote:
>
>
> On 4/24/2023 5:34 AM, Nikita Shubin wrote:
> > This series aims to convert ep93xx from platform to full device
> > tree support.
> >
> > Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
> >
> > Thank you Linus and Arnd for your support, review and comments,
> > sorry if i missed something -
> > these series are quite big for me.
> >
> > Big thanks to Alexander Sverdlin for his testing, support, review,
> > fixes and patches.
>
> If anyone is interested I still have a TS-7300 board [1] that is
> fully
> functional and could be sent out to a new home.
Thank you kindly, i'll keep this in mind !
>
> https://www.embeddedts.com/products/TS-7300
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v1 25/43] dt-bindings: ata: Add Cirrus EP93xx
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (4 preceding siblings ...)
2023-05-16 3:47 ` Florian Fainelli
@ 2023-06-01 5:45 ` Nikita Shubin
2023-06-01 23:57 ` Damien Le Moal
2023-06-01 5:45 ` [PATCH v1 26/43] pata: cirrus: add DT support for " Nikita Shubin
2023-06-01 5:45 ` [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl Nikita Shubin
7 siblings, 1 reply; 26+ messages in thread
From: Nikita Shubin @ 2023-06-01 5:45 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Damien Le Moal,
Rob Herring, Krzysztof Kozlowski
Cc: Nikita Shubin, Michael Peters, Kris Bahnsen, linux-ide,
devicetree, linux-kernel
Add YAML bindings for ep93xx SoC PATA.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
v0 -> v1:
- renamed file to ep9312-pata
- changed email to dlemoal@kernel.org
- dropped label
- fixed ident
.../bindings/ata/cirrus,ep9312-pata.yaml | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
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..3489be55a6fe
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
@@ -0,0 +1,44 @@
+# 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.37.4
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v1 25/43] dt-bindings: ata: Add Cirrus EP93xx
2023-06-01 5:45 ` [PATCH v1 25/43] dt-bindings: ata: Add Cirrus EP93xx Nikita Shubin
@ 2023-06-01 23:57 ` Damien Le Moal
2023-06-04 19:24 ` Nikita Shubin
2023-06-14 19:00 ` Rob Herring
0 siblings, 2 replies; 26+ messages in thread
From: Damien Le Moal @ 2023-06-01 23:57 UTC (permalink / raw)
To: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Rob Herring, Krzysztof Kozlowski
Cc: Michael Peters, Kris Bahnsen, linux-ide, devicetree, linux-kernel
On 6/1/23 14:45, Nikita Shubin wrote:
> Add YAML bindings for ep93xx SoC PATA.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
>
> Notes:
> v0 -> v1:
>
> - renamed file to ep9312-pata
Looks OK to me but given that this is both for the cirrus,ep9315-pata and
cirrus,ep9312-pata, wouldn't it be better to name the file
cirrus,ep931x-pata.yaml ?
> - changed email to dlemoal@kernel.org
> - dropped label
> - fixed ident
>
> .../bindings/ata/cirrus,ep9312-pata.yaml | 44 +++++++++++++++++++
> 1 file changed, 44 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
>
> 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..3489be55a6fe
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
> @@ -0,0 +1,44 @@
> +# 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
I am not a DT specialist, but isn't this line superfluous since it is listed in
the items ?
> + - 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>;
> + };
> +
> +...
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH v1 25/43] dt-bindings: ata: Add Cirrus EP93xx
2023-06-01 23:57 ` Damien Le Moal
@ 2023-06-04 19:24 ` Nikita Shubin
2023-06-14 19:00 ` Rob Herring
1 sibling, 0 replies; 26+ messages in thread
From: Nikita Shubin @ 2023-06-04 19:24 UTC (permalink / raw)
To: Damien Le Moal, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Rob Herring, Krzysztof Kozlowski
Cc: Michael Peters, Kris Bahnsen, linux-ide, devicetree, linux-kernel
Hello Damien!
On Fri, 2023-06-02 at 08:57 +0900, Damien Le Moal wrote:
> On 6/1/23 14:45, Nikita Shubin wrote:
> > Add YAML bindings for ep93xx SoC PATA.
> >
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> > ---
> >
> > Notes:
> > v0 -> v1:
> >
> > - renamed file to ep9312-pata
>
> Looks OK to me but given that this is both for the cirrus,ep9315-pata
> and
> cirrus,ep9312-pata, wouldn't it be better to name the file
> cirrus,ep931x-pata.yaml ?
I was advised against using wildcards by Arnd and Krzysztof.
See
https://lore.kernel.org/all/c981e048-8925-deba-6916-9199844976b9@linaro.org/
As i understood we should have at least one fallback, in out case it's
"cirrus,ep9312-pata" and one for each SoC variant that supports it.
All other comments acknowledged and agreed.
I will also change
```
>> + if (!drv_data)
>> + return -ENXIO;
```
To ENOMEM, as a part of dt conversion patch in v2.
>
>
> > - changed email to dlemoal@kernel.org
> > - dropped label
> > - fixed ident
> >
> > .../bindings/ata/cirrus,ep9312-pata.yaml | 44
> > +++++++++++++++++++
> > 1 file changed, 44 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
> >
> > 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..3489be55a6fe
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
> > @@ -0,0 +1,44 @@
> > +# 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
>
> I am not a DT specialist, but isn't this line superfluous since it is
> listed in
> the items ?
>
> > + - 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>;
> > + };
> > +
> > +...
>
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH v1 25/43] dt-bindings: ata: Add Cirrus EP93xx
2023-06-01 23:57 ` Damien Le Moal
2023-06-04 19:24 ` Nikita Shubin
@ 2023-06-14 19:00 ` Rob Herring
2023-06-15 0:49 ` Damien Le Moal
1 sibling, 1 reply; 26+ messages in thread
From: Rob Herring @ 2023-06-14 19:00 UTC (permalink / raw)
To: Damien Le Moal
Cc: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Krzysztof Kozlowski, Michael Peters, Kris Bahnsen, linux-ide,
devicetree, linux-kernel
On Fri, Jun 02, 2023 at 08:57:37AM +0900, Damien Le Moal wrote:
> On 6/1/23 14:45, Nikita Shubin wrote:
> > Add YAML bindings for ep93xx SoC PATA.
> >
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> > ---
> >
> > Notes:
> > v0 -> v1:
> >
> > - renamed file to ep9312-pata
>
> Looks OK to me but given that this is both for the cirrus,ep9315-pata and
> cirrus,ep9312-pata, wouldn't it be better to name the file
> cirrus,ep931x-pata.yaml ?
cirrus,ep9312-pata makes sense given that is the common fallback.
Wildcards are okay in filenames (only) when there's not a common
fallback.
> > - changed email to dlemoal@kernel.org
> > - dropped label
> > - fixed ident
> >
> > .../bindings/ata/cirrus,ep9312-pata.yaml | 44 +++++++++++++++++++
> > 1 file changed, 44 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
> >
> > 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..3489be55a6fe
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
> > @@ -0,0 +1,44 @@
> > +# 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
>
> I am not a DT specialist, but isn't this line superfluous since it is listed in
> the items ?
No, this entry is for ep9312. The next entry is for ep9315 which is
compatible with ep9312 version. The cirrus,ep9315-pata is there in case
a distinction (e.g. quirk/errata) needs to be made by the driver
without having to change the DT.
Rob
>
> > + - items:
> > + - const: cirrus,ep9315-pata
> > + - const: cirrus,ep9312-pata
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 25/43] dt-bindings: ata: Add Cirrus EP93xx
2023-06-14 19:00 ` Rob Herring
@ 2023-06-15 0:49 ` Damien Le Moal
0 siblings, 0 replies; 26+ messages in thread
From: Damien Le Moal @ 2023-06-15 0:49 UTC (permalink / raw)
To: Rob Herring
Cc: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Krzysztof Kozlowski, Michael Peters, Kris Bahnsen, linux-ide,
devicetree, linux-kernel
On 6/15/23 04:00, Rob Herring wrote:
> On Fri, Jun 02, 2023 at 08:57:37AM +0900, Damien Le Moal wrote:
>> On 6/1/23 14:45, Nikita Shubin wrote:
>>> Add YAML bindings for ep93xx SoC PATA.
>>>
>>> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
>>> ---
>>>
>>> Notes:
>>> v0 -> v1:
>>>
>>> - renamed file to ep9312-pata
>>
>> Looks OK to me but given that this is both for the cirrus,ep9315-pata and
>> cirrus,ep9312-pata, wouldn't it be better to name the file
>> cirrus,ep931x-pata.yaml ?
>
> cirrus,ep9312-pata makes sense given that is the common fallback.
>
> Wildcards are okay in filenames (only) when there's not a common
> fallback.
Got it.
>
>>> - changed email to dlemoal@kernel.org
>>> - dropped label
>>> - fixed ident
>>>
>>> .../bindings/ata/cirrus,ep9312-pata.yaml | 44 +++++++++++++++++++
>>> 1 file changed, 44 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
>>>
>>> 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..3489be55a6fe
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
>>> @@ -0,0 +1,44 @@
>>> +# 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
>>
>> I am not a DT specialist, but isn't this line superfluous since it is listed in
>> the items ?
>
> No, this entry is for ep9312. The next entry is for ep9315 which is
> compatible with ep9312 version. The cirrus,ep9315-pata is there in case
> a distinction (e.g. quirk/errata) needs to be made by the driver
> without having to change the DT.
Thanks for all the clarification.
Looks good then.
Acked-by: Damien Le Moal <dlemoal@kernel.org>
I can take this patch through the ata tree, but it may be better to have it with
the entire series (arm tree ?)
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v1 26/43] pata: cirrus: add DT support for Cirrus EP93xx
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (5 preceding siblings ...)
2023-06-01 5:45 ` [PATCH v1 25/43] dt-bindings: ata: Add Cirrus EP93xx Nikita Shubin
@ 2023-06-01 5:45 ` Nikita Shubin
2023-06-01 23:47 ` Damien Le Moal
` (2 more replies)
2023-06-01 5:45 ` [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl Nikita Shubin
7 siblings, 3 replies; 26+ messages in thread
From: Nikita Shubin @ 2023-06-01 5:45 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Sergey Shtylyov,
Damien Le Moal
Cc: Nikita Shubin, Michael Peters, Kris Bahnsen, linux-ide,
linux-kernel
- find register range from the device tree
- get interrupts from device tree
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
v0 -> v1:
- fixed headers
- dropped coma in id table
drivers/ata/pata_ep93xx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index c6e043e05d43..8d363bc71342 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -40,6 +40,7 @@
#include <linux/ata.h>
#include <linux/libata.h>
#include <linux/platform_device.h>
+#include <linux/mod_devicetable.h>
#include <linux/delay.h>
#include <linux/dmaengine.h>
#include <linux/ktime.h>
@@ -1016,9 +1017,16 @@ static int ep93xx_pata_remove(struct platform_device *pdev)
return 0;
}
+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 = ep93xx_pata_remove,
--
2.37.4
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v1 26/43] pata: cirrus: add DT support for Cirrus EP93xx
2023-06-01 5:45 ` [PATCH v1 26/43] pata: cirrus: add DT support for " Nikita Shubin
@ 2023-06-01 23:47 ` Damien Le Moal
2023-06-02 1:54 ` andy.shevchenko
2023-06-02 20:03 ` Sergey Shtylyov
2 siblings, 0 replies; 26+ messages in thread
From: Damien Le Moal @ 2023-06-01 23:47 UTC (permalink / raw)
To: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Sergey Shtylyov
Cc: Michael Peters, Kris Bahnsen, linux-ide, linux-kernel
On 6/1/23 14:45, Nikita Shubin wrote:
> - find register range from the device tree
> - get interrupts from device tree
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Please change the commit title to:
ata: pata_ep93xx: add device tree support
> ---
>
> Notes:
> v0 -> v1:
>
> - fixed headers
> - dropped coma in id table
>
> drivers/ata/pata_ep93xx.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
> index c6e043e05d43..8d363bc71342 100644
> --- a/drivers/ata/pata_ep93xx.c
> +++ b/drivers/ata/pata_ep93xx.c
> @@ -40,6 +40,7 @@
> #include <linux/ata.h>
> #include <linux/libata.h>
> #include <linux/platform_device.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/delay.h>
> #include <linux/dmaengine.h>
> #include <linux/ktime.h>
> @@ -1016,9 +1017,16 @@ static int ep93xx_pata_remove(struct platform_device *pdev)
> return 0;
> }
>
> +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 = ep93xx_pata_remove,
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH v1 26/43] pata: cirrus: add DT support for Cirrus EP93xx
2023-06-01 5:45 ` [PATCH v1 26/43] pata: cirrus: add DT support for " Nikita Shubin
2023-06-01 23:47 ` Damien Le Moal
@ 2023-06-02 1:54 ` andy.shevchenko
2023-06-02 20:03 ` Sergey Shtylyov
2 siblings, 0 replies; 26+ messages in thread
From: andy.shevchenko @ 2023-06-02 1:54 UTC (permalink / raw)
To: Nikita Shubin
Cc: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Sergey Shtylyov,
Damien Le Moal, Michael Peters, Kris Bahnsen, linux-ide,
linux-kernel
Thu, Jun 01, 2023 at 08:45:31AM +0300, Nikita Shubin kirjoitti:
> - find register range from the device tree
> - get interrupts from device tree
...
> #include <linux/ata.h>
> #include <linux/libata.h>
> #include <linux/platform_device.h>
> +#include <linux/mod_devicetable.h>
In all patches, can you try to put a new header inclusions to be ordered (to
some extent)?
> #include <linux/delay.h>
> #include <linux/dmaengine.h>
> #include <linux/ktime.h>
With the context above a new one is logically suits this location.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 26/43] pata: cirrus: add DT support for Cirrus EP93xx
2023-06-01 5:45 ` [PATCH v1 26/43] pata: cirrus: add DT support for " Nikita Shubin
2023-06-01 23:47 ` Damien Le Moal
2023-06-02 1:54 ` andy.shevchenko
@ 2023-06-02 20:03 ` Sergey Shtylyov
2023-06-04 19:29 ` Nikita Shubin
2 siblings, 1 reply; 26+ messages in thread
From: Sergey Shtylyov @ 2023-06-02 20:03 UTC (permalink / raw)
To: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Damien Le Moal
Cc: Michael Peters, Kris Bahnsen, linux-ide, linux-kernel
Hello!
On 6/1/23 8:45 AM, Nikita Shubin wrote:
> - find register range from the device tree
> - get interrupts from device tree
Hm... I'm not seeing such changes in your patch?
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
>
> Notes:
> v0 -> v1:
>
> - fixed headers
> - dropped coma in id table
>
> drivers/ata/pata_ep93xx.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
> index c6e043e05d43..8d363bc71342 100644
> --- a/drivers/ata/pata_ep93xx.c
> +++ b/drivers/ata/pata_ep93xx.c
> @@ -40,6 +40,7 @@
> #include <linux/ata.h>
> #include <linux/libata.h>
> #include <linux/platform_device.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/delay.h>
> #include <linux/dmaengine.h>
> #include <linux/ktime.h>
> @@ -1016,9 +1017,16 @@ static int ep93xx_pata_remove(struct platform_device *pdev)
> return 0;
> }
>
> +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 = ep93xx_pata_remove,
MBR, Sergey
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH v1 26/43] pata: cirrus: add DT support for Cirrus EP93xx
2023-06-02 20:03 ` Sergey Shtylyov
@ 2023-06-04 19:29 ` Nikita Shubin
0 siblings, 0 replies; 26+ messages in thread
From: Nikita Shubin @ 2023-06-04 19:29 UTC (permalink / raw)
To: Sergey Shtylyov, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Damien Le Moal
Cc: Michael Peters, Kris Bahnsen, linux-ide, linux-kernel
Hello Sergey!
On Fri, 2023-06-02 at 23:03 +0300, Sergey Shtylyov wrote:
> Hello!
>
> On 6/1/23 8:45 AM, Nikita Shubin wrote:
>
> > - find register range from the device tree
> > - get interrupts from device tree
>
> Hm... I'm not seeing such changes in your patch?
I meant that from now on it will take irq's and register from device
tree:
https://elixir.bootlin.com/linux/v6.4-rc4/source/drivers/ata/pata_ep93xx.c#L928
If CONFIG_OF_IRQ is enabled.
You are right
> > get interrupts from device tree
Is confusing.
>
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> > ---
> >
> > Notes:
> > v0 -> v1:
> >
> > - fixed headers
> > - dropped coma in id table
> >
> > drivers/ata/pata_ep93xx.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
> > index c6e043e05d43..8d363bc71342 100644
> > --- a/drivers/ata/pata_ep93xx.c
> > +++ b/drivers/ata/pata_ep93xx.c
> > @@ -40,6 +40,7 @@
> > #include <linux/ata.h>
> > #include <linux/libata.h>
> > #include <linux/platform_device.h>
> > +#include <linux/mod_devicetable.h>
> > #include <linux/delay.h>
> > #include <linux/dmaengine.h>
> > #include <linux/ktime.h>
> > @@ -1016,9 +1017,16 @@ static int ep93xx_pata_remove(struct
> > platform_device *pdev)
> > return 0;
> > }
> >
> > +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 = ep93xx_pata_remove,
>
> MBR, Sergey
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (6 preceding siblings ...)
2023-06-01 5:45 ` [PATCH v1 26/43] pata: cirrus: add DT support for " Nikita Shubin
@ 2023-06-01 5:45 ` Nikita Shubin
2023-06-01 23:50 ` Damien Le Moal
` (2 more replies)
7 siblings, 3 replies; 26+ messages in thread
From: Nikita Shubin @ 2023-06-01 5:45 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Sergey Shtylyov,
Damien Le Moal
Cc: Nikita Shubin, Michael Peters, Kris Bahnsen, linux-ide,
linux-kernel
Drop legacy acquire/release since we are using
pinctrl for this now.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
drivers/ata/pata_ep93xx.c | 25 ++++++-------------------
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index 8d363bc71342..88cf31000000 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -921,28 +921,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 = -ENXIO;
- goto err_rel_gpio;
- }
+ if (!drv_data)
+ return -ENXIO;
drv_data->pdev = pdev;
drv_data->ide_base = ide_base;
@@ -1000,8 +990,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;
}
@@ -1013,7 +1001,6 @@ static int 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);
return 0;
}
--
2.37.4
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl
2023-06-01 5:45 ` [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl Nikita Shubin
@ 2023-06-01 23:50 ` Damien Le Moal
2023-06-02 1:52 ` andy.shevchenko
2023-06-02 20:40 ` Sergey Shtylyov
2 siblings, 0 replies; 26+ messages in thread
From: Damien Le Moal @ 2023-06-01 23:50 UTC (permalink / raw)
To: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Sergey Shtylyov
Cc: Michael Peters, Kris Bahnsen, linux-ide, linux-kernel
On 6/1/23 14:45, Nikita Shubin wrote:
> Drop legacy acquire/release since we are using
> pinctrl for this now.
Please use full 72 chars lines.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Please change the commit title to:
ata: pata_ep93xx: remove legacy pinctrl use
Also, are the functions ep93xx_ide_acquire_gpio() & ep93xx_ide_release_gpio()
used somewhere else ? If not, this patch should remove these functions as well.
> ---
> drivers/ata/pata_ep93xx.c | 25 ++++++-------------------
> 1 file changed, 6 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
> index 8d363bc71342..88cf31000000 100644
> --- a/drivers/ata/pata_ep93xx.c
> +++ b/drivers/ata/pata_ep93xx.c
> @@ -921,28 +921,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 = -ENXIO;
> - goto err_rel_gpio;
> - }
> + if (!drv_data)
> + return -ENXIO;
>
> drv_data->pdev = pdev;
> drv_data->ide_base = ide_base;
> @@ -1000,8 +990,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;
> }
>
> @@ -1013,7 +1001,6 @@ static int 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);
> return 0;
> }
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl
2023-06-01 5:45 ` [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl Nikita Shubin
2023-06-01 23:50 ` Damien Le Moal
@ 2023-06-02 1:52 ` andy.shevchenko
2023-06-02 5:04 ` Damien Le Moal
2023-06-02 20:40 ` Sergey Shtylyov
2 siblings, 1 reply; 26+ messages in thread
From: andy.shevchenko @ 2023-06-02 1:52 UTC (permalink / raw)
To: Nikita Shubin
Cc: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Sergey Shtylyov,
Damien Le Moal, Michael Peters, Kris Bahnsen, linux-ide,
linux-kernel
Thu, Jun 01, 2023 at 08:45:43AM +0300, Nikita Shubin kirjoitti:
> Drop legacy acquire/release since we are using
> pinctrl for this now.
...
> drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL);
> - if (!drv_data) {
> - err = -ENXIO;
Wondering why it's not ENOMEM even in the original code?
> - goto err_rel_gpio;
> - }
> + if (!drv_data)
> + return -ENXIO;
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl
2023-06-02 1:52 ` andy.shevchenko
@ 2023-06-02 5:04 ` Damien Le Moal
0 siblings, 0 replies; 26+ messages in thread
From: Damien Le Moal @ 2023-06-02 5:04 UTC (permalink / raw)
To: andy.shevchenko, Nikita Shubin
Cc: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Sergey Shtylyov,
Michael Peters, Kris Bahnsen, linux-ide, linux-kernel
On 6/2/23 10:52, andy.shevchenko@gmail.com wrote:
> Thu, Jun 01, 2023 at 08:45:43AM +0300, Nikita Shubin kirjoitti:
>> Drop legacy acquire/release since we are using
>> pinctrl for this now.
>
> ...
>
>> drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL);
>> - if (!drv_data) {
>> - err = -ENXIO;
>
> Wondering why it's not ENOMEM even in the original code?
Indeed...
>
>> - goto err_rel_gpio;
>> - }
>> + if (!drv_data)
>> + return -ENXIO;
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl
2023-06-01 5:45 ` [PATCH v1 38/43] pata: cirrus: drop legacy pinctrl Nikita Shubin
2023-06-01 23:50 ` Damien Le Moal
2023-06-02 1:52 ` andy.shevchenko
@ 2023-06-02 20:40 ` Sergey Shtylyov
2 siblings, 0 replies; 26+ messages in thread
From: Sergey Shtylyov @ 2023-06-02 20:40 UTC (permalink / raw)
To: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Damien Le Moal
Cc: Michael Peters, Kris Bahnsen, linux-ide, linux-kernel
On 6/1/23 8:45 AM, Nikita Shubin wrote:
> Drop legacy acquire/release since we are using
> pinctrl for this now.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]
MBR, Sergey
^ permalink raw reply [flat|nested] 26+ messages in thread