diff mbox series

[1/1] Migration: set deadline for move to DM_GPIO

Message ID 20220803143952.282658-1-heinrich.schuchardt@canonical.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series [1/1] Migration: set deadline for move to DM_GPIO | expand

Commit Message

Heinrich Schuchardt Aug. 3, 2022, 2:39 p.m. UTC
Only five boards are left that need to be migrated to DM_GPIO. Set a
2023.04 deadline.

* edminiv2_defconfig
* mx28evk_auart_console_defconfig
* mx28evk_nand_defconfig
* mx28evk_spi_defconfig
* warp_defconfig

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 Makefile                               | 1 +
 doc/develop/driver-model/migration.rst | 8 ++++++++
 2 files changed, 9 insertions(+)

Comments

Tom Rini Aug. 3, 2022, 4:08 p.m. UTC | #1
On Wed, Aug 03, 2022 at 04:39:52PM +0200, Heinrich Schuchardt wrote:

> Only five boards are left that need to be migrated to DM_GPIO. Set a
> 2023.04 deadline.
> 
> * edminiv2_defconfig
> * mx28evk_auart_console_defconfig
> * mx28evk_nand_defconfig
> * mx28evk_spi_defconfig
> * warp_defconfig
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

I see you've now ack'd Fabio's patch to remove those mx28 configs.
Here's my patch to remove edminiv2:
https://patchwork.ozlabs.org/project/uboot/patch/20220802113424.2988464-6-trini@konsulko.com/

That leaves just "warp", which is missing a ton of conversions, so let
me just post a removal patch instead and see where it goes.
Quentin Schulz Aug. 3, 2022, 4:26 p.m. UTC | #2
Hi Tom,

On 8/3/22 18:08, Tom Rini wrote:
> On Wed, Aug 03, 2022 at 04:39:52PM +0200, Heinrich Schuchardt wrote:
> 
>> Only five boards are left that need to be migrated to DM_GPIO. Set a
>> 2023.04 deadline.
>>
>> * edminiv2_defconfig
>> * mx28evk_auart_console_defconfig
>> * mx28evk_nand_defconfig
>> * mx28evk_spi_defconfig
>> * warp_defconfig
>>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> 
> I see you've now ack'd Fabio's patch to remove those mx28 configs.
> Here's my patch to remove edminiv2:
> https://patchwork.ozlabs.org/project/uboot/patch/20220802113424.2988464-6-trini@konsulko.com/
> 
> That leaves just "warp", which is missing a ton of conversions, so let
> me just post a removal patch instead and see where it goes.
> 

I guess this would also mean the removal of GPIO drivers that haven't 
moved to DM?

# git grep -L UCLASS drivers/gpio/*.c
drivers/gpio/adi_gpio2.c
drivers/gpio/kona_gpio.c
drivers/gpio/kw_gpio.c
drivers/gpio/mpc83xx_gpio.c
drivers/gpio/mvgpio.c
drivers/gpio/pca953x.c
drivers/gpio/pca9698.c
drivers/gpio/sh_pfc.c
drivers/gpio/tca642x.c
?

Cheers,
Quentin
Tom Rini Aug. 3, 2022, 4:28 p.m. UTC | #3
On Wed, Aug 03, 2022 at 06:26:19PM +0200, Quentin Schulz wrote:
> Hi Tom,
> 
> On 8/3/22 18:08, Tom Rini wrote:
> > On Wed, Aug 03, 2022 at 04:39:52PM +0200, Heinrich Schuchardt wrote:
> > 
> > > Only five boards are left that need to be migrated to DM_GPIO. Set a
> > > 2023.04 deadline.
> > > 
> > > * edminiv2_defconfig
> > > * mx28evk_auart_console_defconfig
> > > * mx28evk_nand_defconfig
> > > * mx28evk_spi_defconfig
> > > * warp_defconfig
> > > 
> > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > 
> > I see you've now ack'd Fabio's patch to remove those mx28 configs.
> > Here's my patch to remove edminiv2:
> > https://patchwork.ozlabs.org/project/uboot/patch/20220802113424.2988464-6-trini@konsulko.com/
> > 
> > That leaves just "warp", which is missing a ton of conversions, so let
> > me just post a removal patch instead and see where it goes.
> > 
> 
> I guess this would also mean the removal of GPIO drivers that haven't moved
> to DM?
> 
> # git grep -L UCLASS drivers/gpio/*.c
> drivers/gpio/adi_gpio2.c
> drivers/gpio/kona_gpio.c
> drivers/gpio/kw_gpio.c
> drivers/gpio/mpc83xx_gpio.c
> drivers/gpio/mvgpio.c
> drivers/gpio/pca953x.c
> drivers/gpio/pca9698.c
> drivers/gpio/sh_pfc.c
> drivers/gpio/tca642x.c

Probably?  Let me run a one-off in CI to see what all breaks with those
removed.
Heinrich Schuchardt Aug. 3, 2022, 5:27 p.m. UTC | #4
On 8/3/22 18:26, Quentin Schulz wrote:
> Hi Tom,
> 
> On 8/3/22 18:08, Tom Rini wrote:
>> On Wed, Aug 03, 2022 at 04:39:52PM +0200, Heinrich Schuchardt wrote:
>>
>>> Only five boards are left that need to be migrated to DM_GPIO. Set a
>>> 2023.04 deadline.
>>>
>>> * edminiv2_defconfig
>>> * mx28evk_auart_console_defconfig
>>> * mx28evk_nand_defconfig
>>> * mx28evk_spi_defconfig
>>> * warp_defconfig
>>>
>>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>>
>> I see you've now ack'd Fabio's patch to remove those mx28 configs.
>> Here's my patch to remove edminiv2:
>> https://patchwork.ozlabs.org/project/uboot/patch/20220802113424.2988464-6-trini@konsulko.com/
>>
>> That leaves just "warp", which is missing a ton of conversions, so let
>> me just post a removal patch instead and see where it goes.
>>
> 
> I guess this would also mean the removal of GPIO drivers that haven't 
> moved to DM?
> 
> # git grep -L UCLASS drivers/gpio/*.c
> drivers/gpio/adi_gpio2.c
> drivers/gpio/kona_gpio.c
> drivers/gpio/kw_gpio.c
> drivers/gpio/mpc83xx_gpio.c
> drivers/gpio/mvgpio.c
> drivers/gpio/pca953x.c
> drivers/gpio/pca9698.c
> drivers/gpio/sh_pfc.c
> drivers/gpio/tca642x.c

I tried to remove the drivers but that leads to errors in
https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/13021

Here are some examples:

mx6sabreauto
+make[3]: *** No rule to make target 'drivers/gpio/pca953x.o

cl-som-imx7
+make[3]: *** No rule to make target 'drivers/gpio/pca953x.o

omap5_uevm
+make[3]: *** No rule to make target 'drivers/gpio/tca642x.o

armadillo-800eva
+make[3]: *** No rule to make target 'drivers/gpio/sh_pfc.o

kzm9g
+make[3]: *** No rule to make target 'drivers/gpio/sh_pfc.o

Dozens of boards have enabled DM_GPIO but the drivers that they use 
still have to be converted. When converting be aware that DM_GPIO does 
not imply SPL_DM_GPIO so these drivers could actually do real work in SPL.

Best regards

Heinrich

> ?
> 
> Cheers,
> Quentin
Tom Rini Aug. 3, 2022, 5:43 p.m. UTC | #5
On Wed, Aug 03, 2022 at 07:27:50PM +0200, Heinrich Schuchardt wrote:
> On 8/3/22 18:26, Quentin Schulz wrote:
> > Hi Tom,
> > 
> > On 8/3/22 18:08, Tom Rini wrote:
> > > On Wed, Aug 03, 2022 at 04:39:52PM +0200, Heinrich Schuchardt wrote:
> > > 
> > > > Only five boards are left that need to be migrated to DM_GPIO. Set a
> > > > 2023.04 deadline.
> > > > 
> > > > * edminiv2_defconfig
> > > > * mx28evk_auart_console_defconfig
> > > > * mx28evk_nand_defconfig
> > > > * mx28evk_spi_defconfig
> > > > * warp_defconfig
> > > > 
> > > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > 
> > > I see you've now ack'd Fabio's patch to remove those mx28 configs.
> > > Here's my patch to remove edminiv2:
> > > https://patchwork.ozlabs.org/project/uboot/patch/20220802113424.2988464-6-trini@konsulko.com/
> > > 
> > > That leaves just "warp", which is missing a ton of conversions, so let
> > > me just post a removal patch instead and see where it goes.
> > > 
> > 
> > I guess this would also mean the removal of GPIO drivers that haven't
> > moved to DM?
> > 
> > # git grep -L UCLASS drivers/gpio/*.c
> > drivers/gpio/adi_gpio2.c
> > drivers/gpio/kona_gpio.c
> > drivers/gpio/kw_gpio.c
> > drivers/gpio/mpc83xx_gpio.c
> > drivers/gpio/mvgpio.c
> > drivers/gpio/pca953x.c
> > drivers/gpio/pca9698.c
> > drivers/gpio/sh_pfc.c
> > drivers/gpio/tca642x.c
> 
> I tried to remove the drivers but that leads to errors in
> https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/13021

I did a similar test, but on top of my DM_ETH branch so some platforms
got removed already.  The fatal platform list is:
SBx81LIFKW lschlv2 lsxhl dns325 km_kirkwood km_kirkwood_128m16
km_kirkwood_pci kmcoge5un kmnusa kmsuse2 d2net_v2 net2big_v2
inetspace_v2 netspace_lite_v2 netspace_max_v2 netspace_mini_v2
netspace_v2 omap5_uevm

and I've cc'd the maintainers.  Folks, are you able to pick up and
convert the GPIO driver that your platform relies on to DM_GPIO soon, or
should we just disable the GPIO driver?  Or drop the platform?  Thanks!
Tom Rini Aug. 3, 2022, 5:49 p.m. UTC | #6
On Wed, Aug 03, 2022 at 07:27:50PM +0200, Heinrich Schuchardt wrote:
> On 8/3/22 18:26, Quentin Schulz wrote:
> > Hi Tom,
> > 
> > On 8/3/22 18:08, Tom Rini wrote:
> > > On Wed, Aug 03, 2022 at 04:39:52PM +0200, Heinrich Schuchardt wrote:
> > > 
> > > > Only five boards are left that need to be migrated to DM_GPIO. Set a
> > > > 2023.04 deadline.
> > > > 
> > > > * edminiv2_defconfig
> > > > * mx28evk_auart_console_defconfig
> > > > * mx28evk_nand_defconfig
> > > > * mx28evk_spi_defconfig
> > > > * warp_defconfig
> > > > 
> > > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > 
> > > I see you've now ack'd Fabio's patch to remove those mx28 configs.
> > > Here's my patch to remove edminiv2:
> > > https://patchwork.ozlabs.org/project/uboot/patch/20220802113424.2988464-6-trini@konsulko.com/
> > > 
> > > That leaves just "warp", which is missing a ton of conversions, so let
> > > me just post a removal patch instead and see where it goes.
> > > 
> > 
> > I guess this would also mean the removal of GPIO drivers that haven't
> > moved to DM?
> > 
> > # git grep -L UCLASS drivers/gpio/*.c
> > drivers/gpio/adi_gpio2.c
> > drivers/gpio/kona_gpio.c
> > drivers/gpio/kw_gpio.c
> > drivers/gpio/mpc83xx_gpio.c
> > drivers/gpio/mvgpio.c
> > drivers/gpio/pca953x.c
> > drivers/gpio/pca9698.c
> > drivers/gpio/sh_pfc.c
> > drivers/gpio/tca642x.c
> 
> I tried to remove the drivers but that leads to errors in
> https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/13021
> 
> Here are some examples:
> 
> mx6sabreauto
> +make[3]: *** No rule to make target 'drivers/gpio/pca953x.o

This is a slightly trickier case as there's pca953x_gpio.c that is
DM_GPIO, so the question is if we have cases where SPL_DM is off (SPL_DM
is not required) and so the platform cannot switch over to the DM
driver there, but needs to for full U-Boot.  Maybe we need a new symbol,
CONFIG_SPL_PCA953X that depends on !SPL_DM_GPIO.
Chris Packham Aug. 4, 2022, 4:56 a.m. UTC | #7
On Thu, Aug 4, 2022 at 5:44 AM Tom Rini <trini@konsulko.com> wrote:
>
> On Wed, Aug 03, 2022 at 07:27:50PM +0200, Heinrich Schuchardt wrote:
> > On 8/3/22 18:26, Quentin Schulz wrote:
> > > Hi Tom,
> > >
> > > On 8/3/22 18:08, Tom Rini wrote:
> > > > On Wed, Aug 03, 2022 at 04:39:52PM +0200, Heinrich Schuchardt wrote:
> > > >
> > > > > Only five boards are left that need to be migrated to DM_GPIO. Set a
> > > > > 2023.04 deadline.
> > > > >
> > > > > * edminiv2_defconfig
> > > > > * mx28evk_auart_console_defconfig
> > > > > * mx28evk_nand_defconfig
> > > > > * mx28evk_spi_defconfig
> > > > > * warp_defconfig
> > > > >
> > > > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > >
> > > > I see you've now ack'd Fabio's patch to remove those mx28 configs.
> > > > Here's my patch to remove edminiv2:
> > > > https://patchwork.ozlabs.org/project/uboot/patch/20220802113424.2988464-6-trini@konsulko.com/
> > > >
> > > > That leaves just "warp", which is missing a ton of conversions, so let
> > > > me just post a removal patch instead and see where it goes.
> > > >
> > >
> > > I guess this would also mean the removal of GPIO drivers that haven't
> > > moved to DM?
> > >
> > > # git grep -L UCLASS drivers/gpio/*.c
> > > drivers/gpio/adi_gpio2.c
> > > drivers/gpio/kona_gpio.c
> > > drivers/gpio/kw_gpio.c
> > > drivers/gpio/mpc83xx_gpio.c
> > > drivers/gpio/mvgpio.c
> > > drivers/gpio/pca953x.c
> > > drivers/gpio/pca9698.c
> > > drivers/gpio/sh_pfc.c
> > > drivers/gpio/tca642x.c
> >
> > I tried to remove the drivers but that leads to errors in
> > https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/13021
>
> I did a similar test, but on top of my DM_ETH branch so some platforms
> got removed already.  The fatal platform list is:
> SBx81LIFKW lschlv2 lsxhl dns325 km_kirkwood km_kirkwood_128m16
> km_kirkwood_pci kmcoge5un kmnusa kmsuse2 d2net_v2 net2big_v2
> inetspace_v2 netspace_lite_v2 netspace_max_v2 netspace_mini_v2
> netspace_v2 omap5_uevm
>
> and I've cc'd the maintainers.  Folks, are you able to pick up and
> convert the GPIO driver that your platform relies on to DM_GPIO soon, or
> should we just disable the GPIO driver?  Or drop the platform?  Thanks!
>
(sorry for the odd threading, failed reply-all+gmail so the content
below only went to Tom)

The current users of kw_gpio.c should be able to switch to
mvebu_gpio.c with some minor changes (the equivalent linux driver
supports the kirkwood Soc). I'll try and take a look and convert my
boards over. I could do a blind conversion of the other boards if
no-one with actual hardware pipes up.

I notice that mvgpio is on your list but I think the last user of
CONFIG_MARVELL_GPIO was removed in commit dee08b1999e2 ("arm: Remove
gplugd board"). If no-one else has sent one already I can whip up a
quick patch to remove the dead code.

Update: Patch sent
https://lore.kernel.org/u-boot/20220803234357.21457-1-judge.packham@gmail.com/

Also as it turns out MVEBU_GPIO is default y and depends on DM_GPIO &&
(ARCH_MVEBU || ARCH_KIRKWOOD) so the Kirkwood boards that are using
DM_GPIO already have it. Disabling KIRKWOOD_GPIO and eventually
removing the driver should be all that is needed.

> --
> Tom
Michael Walle Aug. 4, 2022, 7:15 a.m. UTC | #8
Hi,

> The current users of kw_gpio.c should be able to switch to
> mvebu_gpio.c with some minor changes (the equivalent linux driver
> supports the kirkwood Soc). I'll try and take a look and convert my
> boards over. I could do a blind conversion of the other boards if
> no-one with actual hardware pipes up.

I'll give it a try on the lsxl board during next week.

-michael
Holger Brunck Aug. 12, 2022, 9:38 a.m. UTC | #9
> Subject: Re: [PATCH 1/1] Migration: set deadline for move to DM_GPIO
> 
> On Wed, Aug 03, 2022 at 07:27:50PM +0200, Heinrich Schuchardt wrote:
> > On 8/3/22 18:26, Quentin Schulz wrote:
> > > Hi Tom,
> > >
> > > On 8/3/22 18:08, Tom Rini wrote:
> > > > On Wed, Aug 03, 2022 at 04:39:52PM +0200, Heinrich Schuchardt wrote:
> > > >
> > > > > Only five boards are left that need to be migrated to DM_GPIO.
> > > > > Set a
> > > > > 2023.04 deadline.
> > > > >
> > > > > * edminiv2_defconfig
> > > > > * mx28evk_auart_console_defconfig
> > > > > * mx28evk_nand_defconfig
> > > > > * mx28evk_spi_defconfig
> > > > > * warp_defconfig
> > > > >
> > > > > Signed-off-by: Heinrich Schuchardt
> > > > > <heinrich.schuchardt@canonical.com>
> > > >
> > > > I see you've now ack'd Fabio's patch to remove those mx28 configs.
> > > > Here's my patch to remove edminiv2:
> > > > https://patchwork.ozlabs.org/project/uboot/patch/20220802113424.29
> > > > 88464-6-trini@konsulko.com/
> > > >
> > > > That leaves just "warp", which is missing a ton of conversions, so
> > > > let me just post a removal patch instead and see where it goes.
> > > >
> > >
> > > I guess this would also mean the removal of GPIO drivers that
> > > haven't moved to DM?
> > >
> > > # git grep -L UCLASS drivers/gpio/*.c drivers/gpio/adi_gpio2.c
> > > drivers/gpio/kona_gpio.c drivers/gpio/kw_gpio.c
> > > drivers/gpio/mpc83xx_gpio.c drivers/gpio/mvgpio.c
> > > drivers/gpio/pca953x.c drivers/gpio/pca9698.c drivers/gpio/sh_pfc.c
> > > drivers/gpio/tca642x.c
> >
> > I tried to remove the drivers but that leads to errors in
> > https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/13021
> 
> I did a similar test, but on top of my DM_ETH branch so some platforms got
> removed already.  The fatal platform list is:
> SBx81LIFKW lschlv2 lsxhl dns325 km_kirkwood km_kirkwood_128m16
> km_kirkwood_pci kmcoge5un kmnusa kmsuse2 d2net_v2 net2big_v2
> inetspace_v2 netspace_lite_v2 netspace_max_v2 netspace_mini_v2
> netspace_v2 omap5_uevm
> 
> and I've cc'd the maintainers.  Folks, are you able to pick up and convert the
> GPIO driver that your platform relies on to DM_GPIO soon, or should we just
> disable the GPIO driver?  Or drop the platform?  Thanks!
> 

the platforms km_kirkwood km_kirkwood_128m16 km_kirkwood_pci
kmcoge5un kmnusa kmsuse2 we can drop. I will prepare a patch at the 
beginning of the next week to remove them.

Best regards
Holger
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index d76ec69b52..f17c0c9bd3 100644
--- a/Makefile
+++ b/Makefile
@@ -1146,6 +1146,7 @@  endif
 	$(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\
 		$(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG))
 	$(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET))
+	$(call deprecated,CONFIG_DM_GPIO,GPIO drivers,v2023.04,$(CONFIG_GPIO))
 	$(call deprecated,CONFIG_DM_I2C,I2C drivers,v2022.04,$(CONFIG_SYS_I2C_LEGACY))
 	$(call deprecated,CONFIG_DM_KEYBOARD,Keyboard drivers,v2022.10,$(CONFIG_KEYBOARD))
 	@# CONFIG_SYS_TIMER_RATE has brackets in it for some boards which
diff --git a/doc/develop/driver-model/migration.rst b/doc/develop/driver-model/migration.rst
index 5a60436925..0c0cb3cec0 100644
--- a/doc/develop/driver-model/migration.rst
+++ b/doc/develop/driver-model/migration.rst
@@ -126,3 +126,11 @@  Deadline: 2023.04
 The serial subsystem has supported the driver model since late 2014.
 Maintainers should submit patches switching over to using CONFIG_DM_SERIAL and
 other base driver model options in time for inclusion in the 2022.10 release.
+
+CONFIG_DM_GPIO
+--------------
+* Deadline: 2023.04
+
+The subsystem itself has been converted and maintainers should submit patches
+switching over to using CONFIG_DM_GPIO and other base driver model options in
+time for inclusion in the 2023.04 rerelease.