diff mbox

[U-Boot,v2,21/44] Convert CONFIG_SPL_GPIO_SUPPORT to Kconfig

Message ID 1472516512-26412-22-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Aug. 30, 2016, 12:21 a.m. UTC
Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/arm/cpu/armv7/am33xx/Kconfig            | 3 +++
 arch/arm/cpu/armv7/omap3/Kconfig             | 3 +++
 arch/arm/cpu/armv7/omap4/Kconfig             | 3 +++
 arch/arm/cpu/armv7/omap5/Kconfig             | 3 +++
 arch/arm/mach-exynos/Kconfig                 | 3 +++
 arch/arm/mach-tegra/Kconfig                  | 3 +++
 board/sunxi/Kconfig                          | 3 +++
 board/ti/common/Kconfig                      | 3 +++
 configs/am335x_baltos_defconfig              | 1 +
 configs/am335x_igep0033_defconfig            | 1 +
 configs/am335x_shc_defconfig                 | 1 +
 configs/am335x_shc_ict_defconfig             | 1 +
 configs/am335x_shc_netboot_defconfig         | 1 +
 configs/am335x_shc_prompt_defconfig          | 1 +
 configs/am335x_shc_sdboot_defconfig          | 1 +
 configs/am335x_shc_sdboot_prompt_defconfig   | 1 +
 configs/am335x_sl50_defconfig                | 1 +
 configs/apx4devkit_defconfig                 | 1 +
 configs/at91sam9m10g45ek_mmc_defconfig       | 1 +
 configs/at91sam9m10g45ek_nandflash_defconfig | 1 +
 configs/at91sam9n12ek_nandflash_defconfig    | 1 +
 configs/at91sam9n12ek_spiflash_defconfig     | 1 +
 configs/at91sam9x5ek_nandflash_defconfig     | 1 +
 configs/at91sam9x5ek_spiflash_defconfig      | 1 +
 configs/axm_defconfig                        | 1 +
 configs/bg0900_defconfig                     | 1 +
 configs/birdland_bav335a_defconfig           | 1 +
 configs/birdland_bav335b_defconfig           | 1 +
 configs/brppt1_mmc_defconfig                 | 1 +
 configs/brppt1_nand_defconfig                | 1 +
 configs/brppt1_spi_defconfig                 | 1 +
 configs/brxre1_defconfig                     | 1 +
 configs/cgtqmx6eval_defconfig                | 1 +
 configs/cm_fx6_defconfig                     | 1 +
 configs/cm_t335_defconfig                    | 1 +
 configs/corvus_defconfig                     | 1 +
 configs/draco_defconfig                      | 1 +
 configs/etamin_defconfig                     | 1 +
 configs/gwventana_defconfig                  | 1 +
 configs/ipam390_defconfig                    | 1 +
 configs/m28evk_defconfig                     | 1 +
 configs/m53evk_defconfig                     | 1 +
 configs/ma5d4evk_defconfig                   | 1 +
 configs/mx23_olinuxino_defconfig             | 1 +
 configs/mx23evk_defconfig                    | 1 +
 configs/mx28evk_auart_console_defconfig      | 1 +
 configs/mx28evk_defconfig                    | 1 +
 configs/mx28evk_nand_defconfig               | 1 +
 configs/mx28evk_spi_defconfig                | 1 +
 configs/mx6cuboxi_defconfig                  | 1 +
 configs/mx6sabresd_spl_defconfig             | 1 +
 configs/mx6slevk_spl_defconfig               | 1 +
 configs/mx6sxsabresd_spl_defconfig           | 1 +
 configs/mx6ul_14x14_evk_defconfig            | 1 +
 configs/mx6ul_9x9_evk_defconfig              | 1 +
 configs/novena_defconfig                     | 1 +
 configs/ot1200_spl_defconfig                 | 1 +
 configs/pcm051_rev1_defconfig                | 1 +
 configs/pcm051_rev3_defconfig                | 1 +
 configs/pcm058_defconfig                     | 1 +
 configs/pengwyn_defconfig                    | 1 +
 configs/pepper_defconfig                     | 1 +
 configs/picosam9g45_defconfig                | 1 +
 configs/platinum_picon_defconfig             | 1 +
 configs/platinum_titanium_defconfig          | 1 +
 configs/pxm2_defconfig                       | 1 +
 configs/rastaban_defconfig                   | 1 +
 configs/rut_defconfig                        | 1 +
 configs/sama5d2_ptc_nandflash_defconfig      | 1 +
 configs/sama5d2_ptc_spiflash_defconfig       | 1 +
 configs/sama5d2_xplained_mmc_defconfig       | 1 +
 configs/sama5d2_xplained_spiflash_defconfig  | 1 +
 configs/sama5d3_xplained_mmc_defconfig       | 1 +
 configs/sama5d3_xplained_nandflash_defconfig | 1 +
 configs/sama5d3xek_mmc_defconfig             | 1 +
 configs/sama5d3xek_nandflash_defconfig       | 1 +
 configs/sama5d3xek_spiflash_defconfig        | 1 +
 configs/sama5d4_xplained_mmc_defconfig       | 1 +
 configs/sama5d4_xplained_nandflash_defconfig | 1 +
 configs/sama5d4_xplained_spiflash_defconfig  | 1 +
 configs/sama5d4ek_mmc_defconfig              | 1 +
 configs/sama5d4ek_nandflash_defconfig        | 1 +
 configs/sama5d4ek_spiflash_defconfig         | 1 +
 configs/sansa_fuze_plus_defconfig            | 1 +
 configs/sc_sps_1_defconfig                   | 1 +
 configs/smartweb_defconfig                   | 1 +
 configs/taurus_defconfig                     | 1 +
 configs/thuban_defconfig                     | 1 +
 configs/ti814x_evm_defconfig                 | 1 +
 configs/ti816x_evm_defconfig                 | 1 +
 configs/udoo_defconfig                       | 1 +
 configs/wandboard_defconfig                  | 1 +
 configs/woodburn_sd_defconfig                | 1 +
 configs/xfi3_defconfig                       | 1 +
 configs/xpress_spl_defconfig                 | 1 +
 configs/zc5202_defconfig                     | 1 +
 configs/zc5601_defconfig                     | 1 +
 include/configs/at91sam9m10g45ek.h           | 1 -
 include/configs/at91sam9n12ek.h              | 1 -
 include/configs/at91sam9x5ek.h               | 1 -
 include/configs/brppt1.h                     | 1 -
 include/configs/brxre1.h                     | 1 -
 include/configs/chromebook_jerry.h           | 2 --
 include/configs/cm_t35.h                     | 1 -
 include/configs/cm_t43.h                     | 1 -
 include/configs/corvus.h                     | 1 -
 include/configs/exynos5-common.h             | 1 -
 include/configs/imx6_spl.h                   | 1 -
 include/configs/ipam390.h                    | 1 -
 include/configs/kc1.h                        | 1 -
 include/configs/m53evk.h                     | 1 -
 include/configs/ma5d4evk.h                   | 1 -
 include/configs/mxs.h                        | 1 -
 include/configs/picosam9g45.h                | 1 -
 include/configs/sama5d2_ptc.h                | 1 -
 include/configs/sama5d2_xplained.h           | 1 -
 include/configs/sama5d3_xplained.h           | 1 -
 include/configs/sama5d3xek.h                 | 1 -
 include/configs/sama5d4_xplained.h           | 1 -
 include/configs/sama5d4ek.h                  | 1 -
 include/configs/siemens-am33x-common.h       | 1 -
 include/configs/smartweb.h                   | 1 -
 include/configs/sniper.h                     | 1 -
 include/configs/sunxi-common.h               | 1 -
 include/configs/tam3517-common.h             | 1 -
 include/configs/tao3530.h                    | 1 -
 include/configs/taurus.h                     | 1 -
 include/configs/tegra-common.h               | 1 -
 include/configs/ti814x_evm.h                 | 1 -
 include/configs/ti816x_evm.h                 | 1 -
 include/configs/ti_armv7_common.h            | 1 -
 include/configs/ti_armv7_keystone2.h         | 1 -
 include/configs/tricorder.h                  | 1 -
 include/configs/woodburn_sd.h                | 1 -
 134 files changed, 113 insertions(+), 38 deletions(-)

Comments

Masahiro Yamada Aug. 30, 2016, 3:25 a.m. UTC | #1
2016-08-30 9:21 GMT+09:00 Simon Glass <sjg@chromium.org>:
> Move this option to Kconfig and tidy up existing uses.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

>
> diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig b/arch/arm/cpu/armv7/am33xx/Kconfig
> index efbc219..54474c2 100644
> --- a/arch/arm/cpu/armv7/am33xx/Kconfig
> +++ b/arch/arm/cpu/armv7/am33xx/Kconfig
> @@ -3,6 +3,9 @@ if AM43XX
>  config SPL_EXT_SUPPORT
>         default y
>
> +config SPL_GPIO_SUPPORT
> +       default y
> +
>  config TARGET_AM43XX_EVM
>         bool "Support am43xx_evm"
>         select TI_I2C_BOARD_DETECT
> diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
> index de65ac6..e1c981e 100644
> --- a/arch/arm/cpu/armv7/omap3/Kconfig
> +++ b/arch/arm/cpu/armv7/omap3/Kconfig
> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT
>  config SPL_FAT_SUPPORT
>         default y
>
> +config SPL_GPIO_SUPPORT
> +       default y
> +
>  choice
>         prompt "OMAP3 board select"
>         optional
> diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/cpu/armv7/omap4/Kconfig
> index 92eb2f4..48ce9d3 100644
> --- a/arch/arm/cpu/armv7/omap4/Kconfig
> +++ b/arch/arm/cpu/armv7/omap4/Kconfig
> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT
>  config SPL_FAT_SUPPORT
>         default y
>
> +config SPL_GPIO_SUPPORT
> +       default y
> +
>  choice
>         prompt "OMAP4 board select"
>         optional
> diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
> index e367828..5b049ad 100644
> --- a/arch/arm/cpu/armv7/omap5/Kconfig
> +++ b/arch/arm/cpu/armv7/omap5/Kconfig
> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT
>  config SPL_FAT_SUPPORT
>         default y
>
> +config SPL_GPIO_SUPPORT
> +       default y
> +
>  choice
>         prompt "OMAP5 board select"
>         optional
> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> index c25fcf3..d4a5bc9 100644
> --- a/arch/arm/mach-exynos/Kconfig
> +++ b/arch/arm/mach-exynos/Kconfig
> @@ -61,6 +61,9 @@ endif
>
>  if ARCH_EXYNOS5
>
> +config SPL_GPIO_SUPPORT
> +       default y
> +


As we discussed before,
we decided to not do this.
Simon Glass Aug. 30, 2016, 6:33 p.m. UTC | #2
Hi Masahiro,

On 29 August 2016 at 21:25, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2016-08-30 9:21 GMT+09:00 Simon Glass <sjg@chromium.org>:
>> Move this option to Kconfig and tidy up existing uses.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>
>>
>> diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig b/arch/arm/cpu/armv7/am33xx/Kconfig
>> index efbc219..54474c2 100644
>> --- a/arch/arm/cpu/armv7/am33xx/Kconfig
>> +++ b/arch/arm/cpu/armv7/am33xx/Kconfig
>> @@ -3,6 +3,9 @@ if AM43XX
>>  config SPL_EXT_SUPPORT
>>         default y
>>
>> +config SPL_GPIO_SUPPORT
>> +       default y
>> +
>>  config TARGET_AM43XX_EVM
>>         bool "Support am43xx_evm"
>>         select TI_I2C_BOARD_DETECT
>> diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
>> index de65ac6..e1c981e 100644
>> --- a/arch/arm/cpu/armv7/omap3/Kconfig
>> +++ b/arch/arm/cpu/armv7/omap3/Kconfig
>> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT
>>  config SPL_FAT_SUPPORT
>>         default y
>>
>> +config SPL_GPIO_SUPPORT
>> +       default y
>> +
>>  choice
>>         prompt "OMAP3 board select"
>>         optional
>> diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/cpu/armv7/omap4/Kconfig
>> index 92eb2f4..48ce9d3 100644
>> --- a/arch/arm/cpu/armv7/omap4/Kconfig
>> +++ b/arch/arm/cpu/armv7/omap4/Kconfig
>> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT
>>  config SPL_FAT_SUPPORT
>>         default y
>>
>> +config SPL_GPIO_SUPPORT
>> +       default y
>> +
>>  choice
>>         prompt "OMAP4 board select"
>>         optional
>> diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
>> index e367828..5b049ad 100644
>> --- a/arch/arm/cpu/armv7/omap5/Kconfig
>> +++ b/arch/arm/cpu/armv7/omap5/Kconfig
>> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT
>>  config SPL_FAT_SUPPORT
>>         default y
>>
>> +config SPL_GPIO_SUPPORT
>> +       default y
>> +
>>  choice
>>         prompt "OMAP5 board select"
>>         optional
>> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
>> index c25fcf3..d4a5bc9 100644
>> --- a/arch/arm/mach-exynos/Kconfig
>> +++ b/arch/arm/mach-exynos/Kconfig
>> @@ -61,6 +61,9 @@ endif
>>
>>  if ARCH_EXYNOS5
>>
>> +config SPL_GPIO_SUPPORT
>> +       default y
>> +
>
>
> As we discussed before,
> we decided to not do this.

Tom was keen to avoid changing every defconfig file. It is there
another way to express common defaults?

Regards,
Simon
Tom Rini Sept. 2, 2016, 2:35 p.m. UTC | #3
On Tue, Aug 30, 2016 at 12:33:05PM -0600, Simon Glass wrote:
> Hi Masahiro,
> 
> On 29 August 2016 at 21:25, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> > 2016-08-30 9:21 GMT+09:00 Simon Glass <sjg@chromium.org>:
> >> Move this option to Kconfig and tidy up existing uses.
> >>
> >> Signed-off-by: Simon Glass <sjg@chromium.org>
> >
> >>
> >> diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig b/arch/arm/cpu/armv7/am33xx/Kconfig
> >> index efbc219..54474c2 100644
> >> --- a/arch/arm/cpu/armv7/am33xx/Kconfig
> >> +++ b/arch/arm/cpu/armv7/am33xx/Kconfig
> >> @@ -3,6 +3,9 @@ if AM43XX
> >>  config SPL_EXT_SUPPORT
> >>         default y
> >>
> >> +config SPL_GPIO_SUPPORT
> >> +       default y
> >> +
> >>  config TARGET_AM43XX_EVM
> >>         bool "Support am43xx_evm"
> >>         select TI_I2C_BOARD_DETECT
> >> diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
> >> index de65ac6..e1c981e 100644
> >> --- a/arch/arm/cpu/armv7/omap3/Kconfig
> >> +++ b/arch/arm/cpu/armv7/omap3/Kconfig
> >> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT
> >>  config SPL_FAT_SUPPORT
> >>         default y
> >>
> >> +config SPL_GPIO_SUPPORT
> >> +       default y
> >> +
> >>  choice
> >>         prompt "OMAP3 board select"
> >>         optional
> >> diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/cpu/armv7/omap4/Kconfig
> >> index 92eb2f4..48ce9d3 100644
> >> --- a/arch/arm/cpu/armv7/omap4/Kconfig
> >> +++ b/arch/arm/cpu/armv7/omap4/Kconfig
> >> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT
> >>  config SPL_FAT_SUPPORT
> >>         default y
> >>
> >> +config SPL_GPIO_SUPPORT
> >> +       default y
> >> +
> >>  choice
> >>         prompt "OMAP4 board select"
> >>         optional
> >> diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
> >> index e367828..5b049ad 100644
> >> --- a/arch/arm/cpu/armv7/omap5/Kconfig
> >> +++ b/arch/arm/cpu/armv7/omap5/Kconfig
> >> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT
> >>  config SPL_FAT_SUPPORT
> >>         default y
> >>
> >> +config SPL_GPIO_SUPPORT
> >> +       default y
> >> +
> >>  choice
> >>         prompt "OMAP5 board select"
> >>         optional
> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> >> index c25fcf3..d4a5bc9 100644
> >> --- a/arch/arm/mach-exynos/Kconfig
> >> +++ b/arch/arm/mach-exynos/Kconfig
> >> @@ -61,6 +61,9 @@ endif
> >>
> >>  if ARCH_EXYNOS5
> >>
> >> +config SPL_GPIO_SUPPORT
> >> +       default y
> >> +
> >
> >
> > As we discussed before,
> > we decided to not do this.
> 
> Tom was keen to avoid changing every defconfig file. It is there
> another way to express common defaults?

I was thinking in the Kconfig with the entry for SPL_GPIO_SUPPORT, for
optional stuff and select in the board, etc, Kconfig for non-optional
stuff.  Now, I realize that optional vs non-optional is more the domain
of the individual SoC custodians, so we'll have some clean up afterwards
that isn't on you (well, aside from the SoCs you know like rockchip ;)).
Masahiro Yamada Sept. 5, 2016, 2:40 a.m. UTC | #4
2016-09-02 23:35 GMT+09:00 Tom Rini <trini@konsulko.com>:

>> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
>> >> index c25fcf3..d4a5bc9 100644
>> >> --- a/arch/arm/mach-exynos/Kconfig
>> >> +++ b/arch/arm/mach-exynos/Kconfig
>> >> @@ -61,6 +61,9 @@ endif
>> >>
>> >>  if ARCH_EXYNOS5
>> >>
>> >> +config SPL_GPIO_SUPPORT
>> >> +       default y
>> >> +
>> >
>> >
>> > As we discussed before,
>> > we decided to not do this.
>>
>> Tom was keen to avoid changing every defconfig file. It is there
>> another way to express common defaults?
>
> I was thinking in the Kconfig with the entry for SPL_GPIO_SUPPORT, for
> optional stuff and select in the board, etc, Kconfig for non-optional
> stuff.  Now, I realize that optional vs non-optional is more the domain
> of the individual SoC custodians, so we'll have some clean up afterwards
> that isn't on you (well, aside from the SoCs you know like rockchip ;)).

config SPL_GPIO_SUPPORT
       default y

is incorrect because it could violate
the dependency in the proper Kconfig entry in spl/Kconfig.




Basically, we are supposed to use "select FOO" when it is mandatory,
or add CONFIG_FOO=y in a defconfig when the board wants it, but
can still make it optional.


I know our pain comes from that "include" is not supported by Kconfig.

What I can suggest now is:



[1]  Add ARCH_WANT_* to specify a SoC-common default.


       config SPL_GPIO_SUPPORT
                bool "GPIO support for SPL"
                default  ARCH_WANT_SPL_GPIO_SUPPORT


       config ARCH_WANT_SPL_GPIO_SUPPORT
                bool


       config ARCH_EXYNOS5
               select ARCH_WANT_SPL_GPIO_SUPPORT


Linux used to have ARCH_WANT_OPTIONAL_GPIOLIB to do similar things.
(they stopped this way, though)



[2] Support multi boards with one defconfig
    (barebox supports multi-platform like Linux does.)


[3] use pre-processor to support #include <...>





BTW, SPL_GPIO_SUPPORT is optional in this case?

U-Boot proper supports a command line interface,
while SPL is usually run in a non-interactive mode.

So, what SPL needs is generally mandatory,
so we can "select" it,  I guess.
Simon Glass Sept. 6, 2016, 1:04 a.m. UTC | #5
Hi Masahiro,

On 4 September 2016 at 20:40, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2016-09-02 23:35 GMT+09:00 Tom Rini <trini@konsulko.com>:
>
>>> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
>>> >> index c25fcf3..d4a5bc9 100644
>>> >> --- a/arch/arm/mach-exynos/Kconfig
>>> >> +++ b/arch/arm/mach-exynos/Kconfig
>>> >> @@ -61,6 +61,9 @@ endif
>>> >>
>>> >>  if ARCH_EXYNOS5
>>> >>
>>> >> +config SPL_GPIO_SUPPORT
>>> >> +       default y
>>> >> +
>>> >
>>> >
>>> > As we discussed before,
>>> > we decided to not do this.
>>>
>>> Tom was keen to avoid changing every defconfig file. It is there
>>> another way to express common defaults?
>>
>> I was thinking in the Kconfig with the entry for SPL_GPIO_SUPPORT, for
>> optional stuff and select in the board, etc, Kconfig for non-optional
>> stuff.  Now, I realize that optional vs non-optional is more the domain
>> of the individual SoC custodians, so we'll have some clean up afterwards
>> that isn't on you (well, aside from the SoCs you know like rockchip ;)).
>
> config SPL_GPIO_SUPPORT
>        default y
>
> is incorrect because it could violate
> the dependency in the proper Kconfig entry in spl/Kconfig.

But only if options depended on by this are not set, right?

>
>
>
>
> Basically, we are supposed to use "select FOO" when it is mandatory,
> or add CONFIG_FOO=y in a defconfig when the board wants it, but
> can still make it optional.

Yes, but this is not mandatory. It is a default, and some boards will
unset it. I did this in response to Tom's comment about trying to cut
down the defconfig patch size.

>
>
> I know our pain comes from that "include" is not supported by Kconfig.

How would that help? Why don't we implement it?

>
> What I can suggest now is:
>
>
>
> [1]  Add ARCH_WANT_* to specify a SoC-common default.
>
>
>        config SPL_GPIO_SUPPORT
>                 bool "GPIO support for SPL"
>                 default  ARCH_WANT_SPL_GPIO_SUPPORT
>
>
>        config ARCH_WANT_SPL_GPIO_SUPPORT
>                 bool
>
>
>        config ARCH_EXYNOS5
>                select ARCH_WANT_SPL_GPIO_SUPPORT
>
>
> Linux used to have ARCH_WANT_OPTIONAL_GPIOLIB to do similar things.
> (they stopped this way, though)
>
>
>
> [2] Support multi boards with one defconfig
>     (barebox supports multi-platform like Linux does.)
>
>
> [3] use pre-processor to support #include <...>
>
>
>
>
>
> BTW, SPL_GPIO_SUPPORT is optional in this case?
>
> U-Boot proper supports a command line interface,
> while SPL is usually run in a non-interactive mode.
>
> So, what SPL needs is generally mandatory,
> so we can "select" it,  I guess.

I found a lot of cases where 90% of the boards with the same SoC  had
the same setting for this (and a few other) options, but some boards
did not. So I did not want to use select, since then it is impossible
to unselect.

This series is actually really tricky. I'm looking forward to putting
it to bed. We need to make these conversions easier.

Regards,
Simon
Tom Rini Sept. 6, 2016, 3:54 p.m. UTC | #6
On Mon, Sep 05, 2016 at 07:04:45PM -0600, Simon Glass wrote:
> Hi Masahiro,
> 
> On 4 September 2016 at 20:40, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> > 2016-09-02 23:35 GMT+09:00 Tom Rini <trini@konsulko.com>:
> >
> >>> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> >>> >> index c25fcf3..d4a5bc9 100644
> >>> >> --- a/arch/arm/mach-exynos/Kconfig
> >>> >> +++ b/arch/arm/mach-exynos/Kconfig
> >>> >> @@ -61,6 +61,9 @@ endif
> >>> >>
> >>> >>  if ARCH_EXYNOS5
> >>> >>
> >>> >> +config SPL_GPIO_SUPPORT
> >>> >> +       default y
> >>> >> +
> >>> >
> >>> >
> >>> > As we discussed before,
> >>> > we decided to not do this.
> >>>
> >>> Tom was keen to avoid changing every defconfig file. It is there
> >>> another way to express common defaults?
> >>
> >> I was thinking in the Kconfig with the entry for SPL_GPIO_SUPPORT, for
> >> optional stuff and select in the board, etc, Kconfig for non-optional
> >> stuff.  Now, I realize that optional vs non-optional is more the domain
> >> of the individual SoC custodians, so we'll have some clean up afterwards
> >> that isn't on you (well, aside from the SoCs you know like rockchip ;)).
> >
> > config SPL_GPIO_SUPPORT
> >        default y
> >
> > is incorrect because it could violate
> > the dependency in the proper Kconfig entry in spl/Kconfig.
> 
> But only if options depended on by this are not set, right?
> 
> >
> >
> >
> >
> > Basically, we are supposed to use "select FOO" when it is mandatory,
> > or add CONFIG_FOO=y in a defconfig when the board wants it, but
> > can still make it optional.
> 
> Yes, but this is not mandatory. It is a default, and some boards will
> unset it. I did this in response to Tom's comment about trying to cut
> down the defconfig patch size.

Well, here is where it is tricky.  For example, in SPL when we bring in
the GPIO code, it's because it's required to enable DDR or know which
board rev we're on.  So it needs to be select'd or people will get
failure to build problems.  Other things like filesystems should be an
option.

> > I know our pain comes from that "include" is not supported by Kconfig.
> 
> How would that help? Why don't we implement it?

Well, if we could more literally translate the various *common*.h files
into a Kconfig file that was "included" it would be easier to say that
various CONFIG variables are just a bool (or hex) and then
board/ti/am335x/Kconfig would 'include
include/kconfig/ti_am33xx_common.k' and get all of the stuff it
used to get from include/configs/ti_am335x_common.h.

> > What I can suggest now is:
> >
> >
> >
> > [1]  Add ARCH_WANT_* to specify a SoC-common default.
> >
> >
> >        config SPL_GPIO_SUPPORT
> >                 bool "GPIO support for SPL"
> >                 default  ARCH_WANT_SPL_GPIO_SUPPORT
> >
> >
> >        config ARCH_WANT_SPL_GPIO_SUPPORT
> >                 bool
> >
> >
> >        config ARCH_EXYNOS5
> >                select ARCH_WANT_SPL_GPIO_SUPPORT
> >
> >
> > Linux used to have ARCH_WANT_OPTIONAL_GPIOLIB to do similar things.
> > (they stopped this way, though)

This may be better.

> > [2] Support multi boards with one defconfig
> >     (barebox supports multi-platform like Linux does.)

Unless I missed something, this is just kicking the problem up a level
frankly.  They just allow (and we could / can / do, depending on the
SoC) one full "barebox" to be loaded by the board-specific preloader.
We can, should, and hopefully will once DM is 'done', have this be an
option.  But that's a different problem set from how do we configure the
board specific part of a build.

> > [3] use pre-processor to support #include <...>
> >
> >
> >
> >
> >
> > BTW, SPL_GPIO_SUPPORT is optional in this case?
> >
> > U-Boot proper supports a command line interface,
> > while SPL is usually run in a non-interactive mode.
> >
> > So, what SPL needs is generally mandatory,
> > so we can "select" it,  I guess.
> 
> I found a lot of cases where 90% of the boards with the same SoC  had
> the same setting for this (and a few other) options, but some boards
> did not. So I did not want to use select, since then it is impossible
> to unselect.

Maybe this is where [1] above will work best and we can select
ARCH_WANT_.. (or BOARD_WANT_...) from TARGET_... and leave some things
as questions.

> This series is actually really tricky. I'm looking forward to putting
> it to bed. We need to make these conversions easier.

Agreed!
Masahiro Yamada Sept. 7, 2016, 4:55 a.m. UTC | #7
2016-09-07 0:54 GMT+09:00 Tom Rini <trini@konsulko.com>:
> On Mon, Sep 05, 2016 at 07:04:45PM -0600, Simon Glass wrote:
>> Hi Masahiro,
>>
>> On 4 September 2016 at 20:40, Masahiro Yamada
>> <yamada.masahiro@socionext.com> wrote:
>> > 2016-09-02 23:35 GMT+09:00 Tom Rini <trini@konsulko.com>:
>> >
>> >>> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
>> >>> >> index c25fcf3..d4a5bc9 100644
>> >>> >> --- a/arch/arm/mach-exynos/Kconfig
>> >>> >> +++ b/arch/arm/mach-exynos/Kconfig
>> >>> >> @@ -61,6 +61,9 @@ endif
>> >>> >>
>> >>> >>  if ARCH_EXYNOS5
>> >>> >>
>> >>> >> +config SPL_GPIO_SUPPORT
>> >>> >> +       default y
>> >>> >> +
>> >>> >
>> >>> >
>> >>> > As we discussed before,
>> >>> > we decided to not do this.
>> >>>
>> >>> Tom was keen to avoid changing every defconfig file. It is there
>> >>> another way to express common defaults?
>> >>
>> >> I was thinking in the Kconfig with the entry for SPL_GPIO_SUPPORT, for
>> >> optional stuff and select in the board, etc, Kconfig for non-optional
>> >> stuff.  Now, I realize that optional vs non-optional is more the domain
>> >> of the individual SoC custodians, so we'll have some clean up afterwards
>> >> that isn't on you (well, aside from the SoCs you know like rockchip ;)).
>> >
>> > config SPL_GPIO_SUPPORT
>> >        default y
>> >
>> > is incorrect because it could violate
>> > the dependency in the proper Kconfig entry in spl/Kconfig.
>>
>> But only if options depended on by this are not set, right?
>>
>> >
>> >
>> >
>> >
>> > Basically, we are supposed to use "select FOO" when it is mandatory,
>> > or add CONFIG_FOO=y in a defconfig when the board wants it, but
>> > can still make it optional.
>>
>> Yes, but this is not mandatory. It is a default, and some boards will
>> unset it. I did this in response to Tom's comment about trying to cut
>> down the defconfig patch size.
>
> Well, here is where it is tricky.  For example, in SPL when we bring in
> the GPIO code, it's because it's required to enable DDR or know which
> board rev we're on.  So it needs to be select'd or people will get
> failure to build problems.  Other things like filesystems should be an
> option.

I agree.


>> > I know our pain comes from that "include" is not supported by Kconfig.
>>
>> How would that help? Why don't we implement it?
>
> Well, if we could more literally translate the various *common*.h files
> into a Kconfig file that was "included" it would be easier to say that
> various CONFIG variables are just a bool (or hex) and then
> board/ti/am335x/Kconfig would 'include
> include/kconfig/ti_am33xx_common.k' and get all of the stuff it
> used to get from include/configs/ti_am335x_common.h.

Yes, exactly.

The problem is we can not sync defconfigs any more.
Actually, we can only sync *common* defconfigs,
but we cannot per-board ones.


>> > What I can suggest now is:
>> >
>> >
>> >
>> > [1]  Add ARCH_WANT_* to specify a SoC-common default.
>> >
>> >
>> >        config SPL_GPIO_SUPPORT
>> >                 bool "GPIO support for SPL"
>> >                 default  ARCH_WANT_SPL_GPIO_SUPPORT
>> >
>> >
>> >        config ARCH_WANT_SPL_GPIO_SUPPORT
>> >                 bool
>> >
>> >
>> >        config ARCH_EXYNOS5
>> >                select ARCH_WANT_SPL_GPIO_SUPPORT
>> >
>> >
>> > Linux used to have ARCH_WANT_OPTIONAL_GPIOLIB to do similar things.
>> > (they stopped this way, though)
>
> This may be better.
>
>> > [2] Support multi boards with one defconfig
>> >     (barebox supports multi-platform like Linux does.)
>
> Unless I missed something, this is just kicking the problem up a level
> frankly.  They just allow (and we could / can / do, depending on the
> SoC) one full "barebox" to be loaded by the board-specific preloader.

Right.
Barebox proper can be multi-platform
because it supports driver model and device tree.

On the other hand, barebox PBL (= correspond to U-Boot SPL)
is a per-board image.
(More precisely, per-board and per-boot-mode image)


> We can, should, and hopefully will once DM is 'done', have this be an
> option.  But that's a different problem set from how do we configure the
> board specific part of a build.


As far as I know, things are roughly like this:

The build system of barebox generates a *big* PBL object first
by compiling every source files for all of enabled boards,
enabled boot modes, like boardA_nand, boardA_mmc, boardB_nand, boardC, etc.
Then gives a different entry point for each board/boot-mode
to the linker script.

The objects unreachable from the board-specific entry point
are ripped off by the GCC garbage collection.
For example, the  board_a_init()
is unreachable from the entry point of board B/C,
so contained only in the board A PBL.

Finally, it gets small per-board/per-boot-mode PBL images.


So, there is no CONFIG options to switch the boot-flow of PBL.

For U-Boot,
we enable CONFIG_SPL_NAND_SUPPORT for  boardA_nand_defconfig,
and CONFIG_SPL_MMC_SUPPORT for boardA_mmc_defconfig.


In barebox, each of boardA_nand, boardA_mmc, whatever
has its own entry point.

nand_load() is reachable from boardA_nand entry, but
not from boardA_mmc entry.  Only needed objects are linked.
Simon Glass Sept. 12, 2016, 4:16 a.m. UTC | #8
Hi,

On 6 September 2016 at 09:54, Tom Rini <trini@konsulko.com> wrote:
> On Mon, Sep 05, 2016 at 07:04:45PM -0600, Simon Glass wrote:
>> Hi Masahiro,
>>
>> On 4 September 2016 at 20:40, Masahiro Yamada
>> <yamada.masahiro@socionext.com> wrote:
>> > 2016-09-02 23:35 GMT+09:00 Tom Rini <trini@konsulko.com>:
>> >
>> >>> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
>> >>> >> index c25fcf3..d4a5bc9 100644
>> >>> >> --- a/arch/arm/mach-exynos/Kconfig
>> >>> >> +++ b/arch/arm/mach-exynos/Kconfig
>> >>> >> @@ -61,6 +61,9 @@ endif
>> >>> >>
>> >>> >>  if ARCH_EXYNOS5
>> >>> >>
>> >>> >> +config SPL_GPIO_SUPPORT
>> >>> >> +       default y
>> >>> >> +
>> >>> >
>> >>> >
>> >>> > As we discussed before,
>> >>> > we decided to not do this.
>> >>>
>> >>> Tom was keen to avoid changing every defconfig file. It is there
>> >>> another way to express common defaults?
>> >>
>> >> I was thinking in the Kconfig with the entry for SPL_GPIO_SUPPORT, for
>> >> optional stuff and select in the board, etc, Kconfig for non-optional
>> >> stuff.  Now, I realize that optional vs non-optional is more the domain
>> >> of the individual SoC custodians, so we'll have some clean up afterwards
>> >> that isn't on you (well, aside from the SoCs you know like rockchip ;)).
>> >
>> > config SPL_GPIO_SUPPORT
>> >        default y
>> >
>> > is incorrect because it could violate
>> > the dependency in the proper Kconfig entry in spl/Kconfig.
>>
>> But only if options depended on by this are not set, right?
>>
>> >
>> >
>> >
>> >
>> > Basically, we are supposed to use "select FOO" when it is mandatory,
>> > or add CONFIG_FOO=y in a defconfig when the board wants it, but
>> > can still make it optional.
>>
>> Yes, but this is not mandatory. It is a default, and some boards will
>> unset it. I did this in response to Tom's comment about trying to cut
>> down the defconfig patch size.
>
> Well, here is where it is tricky.  For example, in SPL when we bring in
> the GPIO code, it's because it's required to enable DDR or know which
> board rev we're on.  So it needs to be select'd or people will get
> failure to build problems.  Other things like filesystems should be an
> option.
>
>> > I know our pain comes from that "include" is not supported by Kconfig.
>>
>> How would that help? Why don't we implement it?
>
> Well, if we could more literally translate the various *common*.h files
> into a Kconfig file that was "included" it would be easier to say that
> various CONFIG variables are just a bool (or hex) and then
> board/ti/am335x/Kconfig would 'include
> include/kconfig/ti_am33xx_common.k' and get all of the stuff it
> used to get from include/configs/ti_am335x_common.h.
>
>> > What I can suggest now is:
>> >
>> >
>> >
>> > [1]  Add ARCH_WANT_* to specify a SoC-common default.
>> >
>> >
>> >        config SPL_GPIO_SUPPORT
>> >                 bool "GPIO support for SPL"
>> >                 default  ARCH_WANT_SPL_GPIO_SUPPORT
>> >
>> >
>> >        config ARCH_WANT_SPL_GPIO_SUPPORT
>> >                 bool
>> >
>> >
>> >        config ARCH_EXYNOS5
>> >                select ARCH_WANT_SPL_GPIO_SUPPORT
>> >
>> >
>> > Linux used to have ARCH_WANT_OPTIONAL_GPIOLIB to do similar things.
>> > (they stopped this way, though)
>
> This may be better.
>
>> > [2] Support multi boards with one defconfig
>> >     (barebox supports multi-platform like Linux does.)
>
> Unless I missed something, this is just kicking the problem up a level
> frankly.  They just allow (and we could / can / do, depending on the
> SoC) one full "barebox" to be loaded by the board-specific preloader.
> We can, should, and hopefully will once DM is 'done', have this be an
> option.  But that's a different problem set from how do we configure the
> board specific part of a build.
>
>> > [3] use pre-processor to support #include <...>
>> >
>> >
>> >
>> >
>> >
>> > BTW, SPL_GPIO_SUPPORT is optional in this case?
>> >
>> > U-Boot proper supports a command line interface,
>> > while SPL is usually run in a non-interactive mode.
>> >
>> > So, what SPL needs is generally mandatory,
>> > so we can "select" it,  I guess.
>>
>> I found a lot of cases where 90% of the boards with the same SoC  had
>> the same setting for this (and a few other) options, but some boards
>> did not. So I did not want to use select, since then it is impossible
>> to unselect.
>
> Maybe this is where [1] above will work best and we can select
> ARCH_WANT_.. (or BOARD_WANT_...) from TARGET_... and leave some things
> as questions.
>
>> This series is actually really tricky. I'm looking forward to putting
>> it to bed. We need to make these conversions easier.
>
> Agreed!

I am not sure about the WANT business, but I am sure that I don't want
to work through all the SoCs and figure how how they should set it.
I'd like to get this series in since i think it is a good starting
point for improving things. Changing to WANT will be easier after that
if we want to. Also I feel this should be the job of SoC maintainers.

Regards,
Simon
Masahiro Yamada Sept. 12, 2016, 4:32 a.m. UTC | #9
Hi Simon,


2016-09-12 13:16 GMT+09:00 Simon Glass <sjg@chromium.org>:
> Hi,
>
> On 6 September 2016 at 09:54, Tom Rini <trini@konsulko.com> wrote:
>> On Mon, Sep 05, 2016 at 07:04:45PM -0600, Simon Glass wrote:
>>> Hi Masahiro,
>>>
>>> On 4 September 2016 at 20:40, Masahiro Yamada
>>> <yamada.masahiro@socionext.com> wrote:
>>> > 2016-09-02 23:35 GMT+09:00 Tom Rini <trini@konsulko.com>:
>>> >
>>> >>> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
>>> >>> >> index c25fcf3..d4a5bc9 100644
>>> >>> >> --- a/arch/arm/mach-exynos/Kconfig
>>> >>> >> +++ b/arch/arm/mach-exynos/Kconfig
>>> >>> >> @@ -61,6 +61,9 @@ endif
>>> >>> >>
>>> >>> >>  if ARCH_EXYNOS5
>>> >>> >>
>>> >>> >> +config SPL_GPIO_SUPPORT
>>> >>> >> +       default y
>>> >>> >> +
>>> >>> >
>>> >>> >
>>> >>> > As we discussed before,
>>> >>> > we decided to not do this.
>>> >>>
>>> >>> Tom was keen to avoid changing every defconfig file. It is there
>>> >>> another way to express common defaults?
>>> >>
>>> >> I was thinking in the Kconfig with the entry for SPL_GPIO_SUPPORT, for
>>> >> optional stuff and select in the board, etc, Kconfig for non-optional
>>> >> stuff.  Now, I realize that optional vs non-optional is more the domain
>>> >> of the individual SoC custodians, so we'll have some clean up afterwards
>>> >> that isn't on you (well, aside from the SoCs you know like rockchip ;)).
>>> >
>>> > config SPL_GPIO_SUPPORT
>>> >        default y
>>> >
>>> > is incorrect because it could violate
>>> > the dependency in the proper Kconfig entry in spl/Kconfig.
>>>
>>> But only if options depended on by this are not set, right?
>>>
>>> >
>>> >
>>> >
>>> >
>>> > Basically, we are supposed to use "select FOO" when it is mandatory,
>>> > or add CONFIG_FOO=y in a defconfig when the board wants it, but
>>> > can still make it optional.
>>>
>>> Yes, but this is not mandatory. It is a default, and some boards will
>>> unset it. I did this in response to Tom's comment about trying to cut
>>> down the defconfig patch size.
>>
>> Well, here is where it is tricky.  For example, in SPL when we bring in
>> the GPIO code, it's because it's required to enable DDR or know which
>> board rev we're on.  So it needs to be select'd or people will get
>> failure to build problems.  Other things like filesystems should be an
>> option.
>>
>>> > I know our pain comes from that "include" is not supported by Kconfig.
>>>
>>> How would that help? Why don't we implement it?
>>
>> Well, if we could more literally translate the various *common*.h files
>> into a Kconfig file that was "included" it would be easier to say that
>> various CONFIG variables are just a bool (or hex) and then
>> board/ti/am335x/Kconfig would 'include
>> include/kconfig/ti_am33xx_common.k' and get all of the stuff it
>> used to get from include/configs/ti_am335x_common.h.
>>
>>> > What I can suggest now is:
>>> >
>>> >
>>> >
>>> > [1]  Add ARCH_WANT_* to specify a SoC-common default.
>>> >
>>> >
>>> >        config SPL_GPIO_SUPPORT
>>> >                 bool "GPIO support for SPL"
>>> >                 default  ARCH_WANT_SPL_GPIO_SUPPORT
>>> >
>>> >
>>> >        config ARCH_WANT_SPL_GPIO_SUPPORT
>>> >                 bool
>>> >
>>> >
>>> >        config ARCH_EXYNOS5
>>> >                select ARCH_WANT_SPL_GPIO_SUPPORT
>>> >
>>> >
>>> > Linux used to have ARCH_WANT_OPTIONAL_GPIOLIB to do similar things.
>>> > (they stopped this way, though)
>>
>> This may be better.
>>
>>> > [2] Support multi boards with one defconfig
>>> >     (barebox supports multi-platform like Linux does.)
>>
>> Unless I missed something, this is just kicking the problem up a level
>> frankly.  They just allow (and we could / can / do, depending on the
>> SoC) one full "barebox" to be loaded by the board-specific preloader.
>> We can, should, and hopefully will once DM is 'done', have this be an
>> option.  But that's a different problem set from how do we configure the
>> board specific part of a build.
>>
>>> > [3] use pre-processor to support #include <...>
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > BTW, SPL_GPIO_SUPPORT is optional in this case?
>>> >
>>> > U-Boot proper supports a command line interface,
>>> > while SPL is usually run in a non-interactive mode.
>>> >
>>> > So, what SPL needs is generally mandatory,
>>> > so we can "select" it,  I guess.
>>>
>>> I found a lot of cases where 90% of the boards with the same SoC  had
>>> the same setting for this (and a few other) options, but some boards
>>> did not. So I did not want to use select, since then it is impossible
>>> to unselect.
>>
>> Maybe this is where [1] above will work best and we can select
>> ARCH_WANT_.. (or BOARD_WANT_...) from TARGET_... and leave some things
>> as questions.
>>
>>> This series is actually really tricky. I'm looking forward to putting
>>> it to bed. We need to make these conversions easier.
>>
>> Agreed!
>
> I am not sure about the WANT business, but I am sure that I don't want
> to work through all the SoCs and figure how how they should set it.
> I'd like to get this series in since i think it is a good starting
> point for improving things. Changing to WANT will be easier after that
> if we want to. Also I feel this should be the job of SoC maintainers.


OK, I agree.


But, you added

config SPL_GPIO_SUPPORT
      default y

for some platforms, so it looks like you already figured out
how the default should be set for them.


Anyway, I know this task is too much burden.
How about moving CONFIG_SPL_GPIO_SUPPORT=y to defconfigs verbatim for now?


If SoC maintainers are unhappy about duplicated CONFIG defines in
their defconfigs,
they can work on the WANT refactoring later.
Tom Rini Sept. 12, 2016, 2:19 p.m. UTC | #10
On Mon, Sep 12, 2016 at 01:32:54PM +0900, Masahiro Yamada wrote:
> Hi Simon,
> 
> 
> 2016-09-12 13:16 GMT+09:00 Simon Glass <sjg@chromium.org>:
> > Hi,
> >
> > On 6 September 2016 at 09:54, Tom Rini <trini@konsulko.com> wrote:
> >> On Mon, Sep 05, 2016 at 07:04:45PM -0600, Simon Glass wrote:
> >>> Hi Masahiro,
> >>>
> >>> On 4 September 2016 at 20:40, Masahiro Yamada
> >>> <yamada.masahiro@socionext.com> wrote:
> >>> > 2016-09-02 23:35 GMT+09:00 Tom Rini <trini@konsulko.com>:
> >>> >
> >>> >>> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> >>> >>> >> index c25fcf3..d4a5bc9 100644
> >>> >>> >> --- a/arch/arm/mach-exynos/Kconfig
> >>> >>> >> +++ b/arch/arm/mach-exynos/Kconfig
> >>> >>> >> @@ -61,6 +61,9 @@ endif
> >>> >>> >>
> >>> >>> >>  if ARCH_EXYNOS5
> >>> >>> >>
> >>> >>> >> +config SPL_GPIO_SUPPORT
> >>> >>> >> +       default y
> >>> >>> >> +
> >>> >>> >
> >>> >>> >
> >>> >>> > As we discussed before,
> >>> >>> > we decided to not do this.
> >>> >>>
> >>> >>> Tom was keen to avoid changing every defconfig file. It is there
> >>> >>> another way to express common defaults?
> >>> >>
> >>> >> I was thinking in the Kconfig with the entry for SPL_GPIO_SUPPORT, for
> >>> >> optional stuff and select in the board, etc, Kconfig for non-optional
> >>> >> stuff.  Now, I realize that optional vs non-optional is more the domain
> >>> >> of the individual SoC custodians, so we'll have some clean up afterwards
> >>> >> that isn't on you (well, aside from the SoCs you know like rockchip ;)).
> >>> >
> >>> > config SPL_GPIO_SUPPORT
> >>> >        default y
> >>> >
> >>> > is incorrect because it could violate
> >>> > the dependency in the proper Kconfig entry in spl/Kconfig.
> >>>
> >>> But only if options depended on by this are not set, right?
> >>>
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > Basically, we are supposed to use "select FOO" when it is mandatory,
> >>> > or add CONFIG_FOO=y in a defconfig when the board wants it, but
> >>> > can still make it optional.
> >>>
> >>> Yes, but this is not mandatory. It is a default, and some boards will
> >>> unset it. I did this in response to Tom's comment about trying to cut
> >>> down the defconfig patch size.
> >>
> >> Well, here is where it is tricky.  For example, in SPL when we bring in
> >> the GPIO code, it's because it's required to enable DDR or know which
> >> board rev we're on.  So it needs to be select'd or people will get
> >> failure to build problems.  Other things like filesystems should be an
> >> option.
> >>
> >>> > I know our pain comes from that "include" is not supported by Kconfig.
> >>>
> >>> How would that help? Why don't we implement it?
> >>
> >> Well, if we could more literally translate the various *common*.h files
> >> into a Kconfig file that was "included" it would be easier to say that
> >> various CONFIG variables are just a bool (or hex) and then
> >> board/ti/am335x/Kconfig would 'include
> >> include/kconfig/ti_am33xx_common.k' and get all of the stuff it
> >> used to get from include/configs/ti_am335x_common.h.
> >>
> >>> > What I can suggest now is:
> >>> >
> >>> >
> >>> >
> >>> > [1]  Add ARCH_WANT_* to specify a SoC-common default.
> >>> >
> >>> >
> >>> >        config SPL_GPIO_SUPPORT
> >>> >                 bool "GPIO support for SPL"
> >>> >                 default  ARCH_WANT_SPL_GPIO_SUPPORT
> >>> >
> >>> >
> >>> >        config ARCH_WANT_SPL_GPIO_SUPPORT
> >>> >                 bool
> >>> >
> >>> >
> >>> >        config ARCH_EXYNOS5
> >>> >                select ARCH_WANT_SPL_GPIO_SUPPORT
> >>> >
> >>> >
> >>> > Linux used to have ARCH_WANT_OPTIONAL_GPIOLIB to do similar things.
> >>> > (they stopped this way, though)
> >>
> >> This may be better.
> >>
> >>> > [2] Support multi boards with one defconfig
> >>> >     (barebox supports multi-platform like Linux does.)
> >>
> >> Unless I missed something, this is just kicking the problem up a level
> >> frankly.  They just allow (and we could / can / do, depending on the
> >> SoC) one full "barebox" to be loaded by the board-specific preloader.
> >> We can, should, and hopefully will once DM is 'done', have this be an
> >> option.  But that's a different problem set from how do we configure the
> >> board specific part of a build.
> >>
> >>> > [3] use pre-processor to support #include <...>
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > BTW, SPL_GPIO_SUPPORT is optional in this case?
> >>> >
> >>> > U-Boot proper supports a command line interface,
> >>> > while SPL is usually run in a non-interactive mode.
> >>> >
> >>> > So, what SPL needs is generally mandatory,
> >>> > so we can "select" it,  I guess.
> >>>
> >>> I found a lot of cases where 90% of the boards with the same SoC  had
> >>> the same setting for this (and a few other) options, but some boards
> >>> did not. So I did not want to use select, since then it is impossible
> >>> to unselect.
> >>
> >> Maybe this is where [1] above will work best and we can select
> >> ARCH_WANT_.. (or BOARD_WANT_...) from TARGET_... and leave some things
> >> as questions.
> >>
> >>> This series is actually really tricky. I'm looking forward to putting
> >>> it to bed. We need to make these conversions easier.
> >>
> >> Agreed!
> >
> > I am not sure about the WANT business, but I am sure that I don't want
> > to work through all the SoCs and figure how how they should set it.
> > I'd like to get this series in since i think it is a good starting
> > point for improving things. Changing to WANT will be easier after that
> > if we want to. Also I feel this should be the job of SoC maintainers.
> 
> 
> OK, I agree.
> 
> 
> But, you added
> 
> config SPL_GPIO_SUPPORT
>       default y
> 
> for some platforms, so it looks like you already figured out
> how the default should be set for them.
> 
> 
> Anyway, I know this task is too much burden.
> How about moving CONFIG_SPL_GPIO_SUPPORT=y to defconfigs verbatim for now?
> 
> 
> If SoC maintainers are unhappy about duplicated CONFIG defines in
> their defconfigs,
> they can work on the WANT refactoring later.

Yes, how about this so we can get it in, and SoC clean up to follow by
SoC custodians ?
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig b/arch/arm/cpu/armv7/am33xx/Kconfig
index efbc219..54474c2 100644
--- a/arch/arm/cpu/armv7/am33xx/Kconfig
+++ b/arch/arm/cpu/armv7/am33xx/Kconfig
@@ -3,6 +3,9 @@  if AM43XX
 config SPL_EXT_SUPPORT
 	default y
 
+config SPL_GPIO_SUPPORT
+	default y
+
 config TARGET_AM43XX_EVM
 	bool "Support am43xx_evm"
 	select TI_I2C_BOARD_DETECT
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index de65ac6..e1c981e 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -6,6 +6,9 @@  config SPL_EXT_SUPPORT
 config SPL_FAT_SUPPORT
 	default y
 
+config SPL_GPIO_SUPPORT
+	default y
+
 choice
 	prompt "OMAP3 board select"
 	optional
diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/cpu/armv7/omap4/Kconfig
index 92eb2f4..48ce9d3 100644
--- a/arch/arm/cpu/armv7/omap4/Kconfig
+++ b/arch/arm/cpu/armv7/omap4/Kconfig
@@ -6,6 +6,9 @@  config SPL_EXT_SUPPORT
 config SPL_FAT_SUPPORT
 	default y
 
+config SPL_GPIO_SUPPORT
+	default y
+
 choice
 	prompt "OMAP4 board select"
 	optional
diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
index e367828..5b049ad 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/cpu/armv7/omap5/Kconfig
@@ -6,6 +6,9 @@  config SPL_EXT_SUPPORT
 config SPL_FAT_SUPPORT
 	default y
 
+config SPL_GPIO_SUPPORT
+	default y
+
 choice
 	prompt "OMAP5 board select"
 	optional
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index c25fcf3..d4a5bc9 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -61,6 +61,9 @@  endif
 
 if ARCH_EXYNOS5
 
+config SPL_GPIO_SUPPORT
+	default y
+
 choice
 	prompt "EXYNOS5 board select"
 
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 1eaf406..6b1cedf 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -1,5 +1,8 @@ 
 if TEGRA
 
+config SPL_GPIO_SUPPORT
+	default y
+
 config TEGRA_IVC
 	bool "Tegra IVC protocol"
 	help
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 1b30669..cf84689 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -1,5 +1,8 @@ 
 if ARCH_SUNXI
 
+config SPL_GPIO_SUPPORT
+	default y
+
 # Note only one of these may be selected at a time! But hidden choices are
 # not supported by Kconfig
 config SUNXI_GEN_SUN4I
diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig
index c4c0b4f..6796ec0 100644
--- a/board/ti/common/Kconfig
+++ b/board/ti/common/Kconfig
@@ -12,3 +12,6 @@  config SPL_EXT_SUPPORT
 
 config SPL_FAT_SUPPORT
 	default y
+
+config SPL_GPIO_SUPPORT
+	default y
diff --git a/configs/am335x_baltos_defconfig b/configs/am335x_baltos_defconfig
index c312e11..149ac9c 100644
--- a/configs/am335x_baltos_defconfig
+++ b/configs/am335x_baltos_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_BALTOS=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
diff --git a/configs/am335x_igep0033_defconfig b/configs/am335x_igep0033_defconfig
index 62530a6..59c8a71 100644
--- a/configs/am335x_igep0033_defconfig
+++ b/configs/am335x_igep0033_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_IGEP0033=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
diff --git a/configs/am335x_shc_defconfig b/configs/am335x_shc_defconfig
index d7e9ff0..0965c44 100644
--- a/configs/am335x_shc_defconfig
+++ b/configs/am335x_shc_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_SHC=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SERIES=y
diff --git a/configs/am335x_shc_ict_defconfig b/configs/am335x_shc_ict_defconfig
index f24b420..c4c9a39 100644
--- a/configs/am335x_shc_ict_defconfig
+++ b/configs/am335x_shc_ict_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_SHC=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SHC_ICT=y
diff --git a/configs/am335x_shc_netboot_defconfig b/configs/am335x_shc_netboot_defconfig
index 7ccc5d6..c85105f 100644
--- a/configs/am335x_shc_netboot_defconfig
+++ b/configs/am335x_shc_netboot_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_SHC=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL_ENV_SUPPORT=y
diff --git a/configs/am335x_shc_prompt_defconfig b/configs/am335x_shc_prompt_defconfig
index b6f41c1..844b3a0 100644
--- a/configs/am335x_shc_prompt_defconfig
+++ b/configs/am335x_shc_prompt_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_SHC=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SERIES=y
diff --git a/configs/am335x_shc_sdboot_defconfig b/configs/am335x_shc_sdboot_defconfig
index 0687be8..37e6d61 100644
--- a/configs/am335x_shc_sdboot_defconfig
+++ b/configs/am335x_shc_sdboot_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_SHC=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SHC_SDBOOT=y
diff --git a/configs/am335x_shc_sdboot_prompt_defconfig b/configs/am335x_shc_sdboot_prompt_defconfig
index 0687be8..37e6d61 100644
--- a/configs/am335x_shc_sdboot_prompt_defconfig
+++ b/configs/am335x_shc_sdboot_prompt_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_SHC=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SHC_SDBOOT=y
diff --git a/configs/am335x_sl50_defconfig b/configs/am335x_sl50_defconfig
index 9f772b7..df0fb21 100644
--- a/configs/am335x_sl50_defconfig
+++ b/configs/am335x_sl50_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_SL50=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL_ENV_SUPPORT=y
diff --git a/configs/apx4devkit_defconfig b/configs/apx4devkit_defconfig
index b0ae29c..c96f135 100644
--- a/configs/apx4devkit_defconfig
+++ b/configs/apx4devkit_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_APX4DEVKIT=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_BOOTDELAY=1
 CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/at91sam9m10g45ek_mmc_defconfig b/configs/at91sam9m10g45ek_mmc_defconfig
index f67e0f3..3a23a1c 100644
--- a/configs/at91sam9m10g45ek_mmc_defconfig
+++ b/configs/at91sam9m10g45ek_mmc_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9M10G45EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9M10G45,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
diff --git a/configs/at91sam9m10g45ek_nandflash_defconfig b/configs/at91sam9m10g45ek_nandflash_defconfig
index a50c2b2..ba00491 100644
--- a/configs/at91sam9m10g45ek_nandflash_defconfig
+++ b/configs/at91sam9m10g45ek_nandflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9M10G45EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9M10G45,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig
index d12cdb7..c636a44 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig
index ac00ee8..c968b4f 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_SPIFLASH"
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
index d4d9d0e..b97a840 100644
--- a/configs/at91sam9x5ek_nandflash_defconfig
+++ b/configs/at91sam9x5ek_nandflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9X5EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig
index 53f2b2d..925db2d 100644
--- a/configs/at91sam9x5ek_spiflash_defconfig
+++ b/configs/at91sam9x5ek_spiflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9X5EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_SPIFLASH"
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/axm_defconfig b/configs/axm_defconfig
index 93805d4..2573689 100644
--- a/configs/axm_defconfig
+++ b/configs/axm_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_TAURUS=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20-taurus"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,MACH_TYPE=2068,BOARD_AXM"
 CONFIG_BOOTDELAY=3
diff --git a/configs/bg0900_defconfig b/configs/bg0900_defconfig
index 905a441..bce3bef 100644
--- a/configs/bg0900_defconfig
+++ b/configs/bg0900_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_BG0900=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/birdland_bav335a_defconfig b/configs/birdland_bav335a_defconfig
index b34b573..f7a152a 100644
--- a/configs/birdland_bav335a_defconfig
+++ b/configs/birdland_bav335a_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_BAV335X=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_BAV_VERSION=1
diff --git a/configs/birdland_bav335b_defconfig b/configs/birdland_bav335b_defconfig
index ba0db09..fb0089e 100644
--- a/configs/birdland_bav335b_defconfig
+++ b/configs/birdland_bav335b_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_BAV335X=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_BAV_VERSION=2
diff --git a/configs/brppt1_mmc_defconfig b/configs/brppt1_mmc_defconfig
index b1ccf0f..5f53f1b 100644
--- a/configs/brppt1_mmc_defconfig
+++ b/configs/brppt1_mmc_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_BRPPT1=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,EMMC_BOOT"
 CONFIG_BOOTDELAY=-2
diff --git a/configs/brppt1_nand_defconfig b/configs/brppt1_nand_defconfig
index 839836b..4a97fe1 100644
--- a/configs/brppt1_nand_defconfig
+++ b/configs/brppt1_nand_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_BRPPT1=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND"
 CONFIG_BOOTDELAY=-2
diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig
index d318728..98984a6 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_BRPPT1=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,SPI_BOOT,EMMC_BOOT"
 CONFIG_SPI_BOOT=y
diff --git a/configs/brxre1_defconfig b/configs/brxre1_defconfig
index 79edfd6..32d56b2 100644
--- a/configs/brxre1_defconfig
+++ b/configs/brxre1_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_BRXRE1=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1"
 CONFIG_BOOTDELAY=-2
 CONFIG_SPL=y
diff --git a/configs/cgtqmx6eval_defconfig b/configs/cgtqmx6eval_defconfig
index cd6c91b..0c27a74 100644
--- a/configs/cgtqmx6eval_defconfig
+++ b/configs/cgtqmx6eval_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_CGTQMX6EVAL=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6QDL"
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 8f023f9..16a66e5 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_CM_FX6=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL,SPL"
diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig
index e527756..4c22616 100644
--- a/configs/cm_t335_defconfig
+++ b/configs/cm_t335_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_CM_T335=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL=y
diff --git a/configs/corvus_defconfig b/configs/corvus_defconfig
index 21aec74..02f2e9f 100644
--- a/configs/corvus_defconfig
+++ b/configs/corvus_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_CORVUS=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9g45-corvus"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9M10G45,MACH_TYPE=2066,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
diff --git a/configs/draco_defconfig b/configs/draco_defconfig
index 36b3249..44897cd 100644
--- a/configs/draco_defconfig
+++ b/configs/draco_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_DRACO=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-draco"
diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig
index 0b6c876..3535335 100644
--- a/configs/etamin_defconfig
+++ b/configs/etamin_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_ETAMIN=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-draco"
diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig
index 02a4600..64ad5cf 100644
--- a/configs/gwventana_defconfig
+++ b/configs/gwventana_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_GW_VENTANA=y
 CONFIG_SPL_STACK_R_ADDR=0x18000000
 CONFIG_DM_SERIAL=y
diff --git a/configs/ipam390_defconfig b/configs/ipam390_defconfig
index cee6988..3647515 100644
--- a/configs/ipam390_defconfig
+++ b/configs/ipam390_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_DAVINCI=y
 CONFIG_TARGET_IPAM390=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot > "
diff --git a/configs/m28evk_defconfig b/configs/m28evk_defconfig
index b7b59a2..a981d74 100644
--- a/configs/m28evk_defconfig
+++ b/configs/m28evk_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_M28EVK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/m53evk_defconfig b/configs/m53evk_defconfig
index a6249bb..8d019d1 100644
--- a/configs/m53evk_defconfig
+++ b/configs/m53evk_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_M53EVK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/denx/m53evk/imximage.cfg"
 CONFIG_BOOTDELAY=3
diff --git a/configs/ma5d4evk_defconfig b/configs/ma5d4evk_defconfig
index 72add34..fa7012e 100644
--- a/configs/ma5d4evk_defconfig
+++ b/configs/ma5d4evk_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_MA5D4EVK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4"
 CONFIG_BOOTDELAY=3
diff --git a/configs/mx23_olinuxino_defconfig b/configs/mx23_olinuxino_defconfig
index 0abf234..6221e0f 100644
--- a/configs/mx23_olinuxino_defconfig
+++ b/configs/mx23_olinuxino_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_MX23_OLINUXINO=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/mx23evk_defconfig b/configs/mx23evk_defconfig
index f53acb8..0da8c08 100644
--- a/configs/mx23evk_defconfig
+++ b/configs/mx23evk_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_MX23EVK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_BOOTDELAY=1
 CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/mx28evk_auart_console_defconfig b/configs/mx28evk_auart_console_defconfig
index 55f16a0..e3e7e40 100644
--- a/configs/mx28evk_auart_console_defconfig
+++ b/configs/mx28evk_auart_console_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_MX28EVK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="MXS_AUART,MXS_AUART_BASE=MXS_UARTAPP3_BASE,ENV_IS_IN_MMC"
 CONFIG_BOOTDELAY=1
 CONFIG_SPL=y
diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig
index 5082dd6..403fb21 100644
--- a/configs/mx28evk_defconfig
+++ b/configs/mx28evk_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_MX28EVK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_MMC"
 CONFIG_BOOTDELAY=1
diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig
index ad615bd..799245b 100644
--- a/configs/mx28evk_nand_defconfig
+++ b/configs/mx28evk_nand_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_MX28EVK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_NAND"
 CONFIG_BOOTDELAY=1
 CONFIG_SPL=y
diff --git a/configs/mx28evk_spi_defconfig b/configs/mx28evk_spi_defconfig
index b57fba8..083d7a5 100644
--- a/configs/mx28evk_spi_defconfig
+++ b/configs/mx28evk_spi_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_MX28EVK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH"
 CONFIG_BOOTDELAY=1
 CONFIG_SPL=y
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index a9177bc..732aa18 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_MX6CUBOXI=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL"
diff --git a/configs/mx6sabresd_spl_defconfig b/configs/mx6sabresd_spl_defconfig
index 2ef0d83..4cc791e 100644
--- a/configs/mx6sabresd_spl_defconfig
+++ b/configs/mx6sabresd_spl_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_MX6SABRESD=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6Q"
diff --git a/configs/mx6slevk_spl_defconfig b/configs/mx6slevk_spl_defconfig
index a48365f..727662e 100644
--- a/configs/mx6slevk_spl_defconfig
+++ b/configs/mx6slevk_spl_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_MX6SLEVK=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6SL"
diff --git a/configs/mx6sxsabresd_spl_defconfig b/configs/mx6sxsabresd_spl_defconfig
index 124c0256..51e2519 100644
--- a/configs/mx6sxsabresd_spl_defconfig
+++ b/configs/mx6sxsabresd_spl_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_MX6SXSABRESD=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg"
diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig
index e9da624..d223ac4 100644
--- a/configs/mx6ul_14x14_evk_defconfig
+++ b/configs/mx6ul_14x14_evk_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_MX6UL_14X14_EVK=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg"
diff --git a/configs/mx6ul_9x9_evk_defconfig b/configs/mx6ul_9x9_evk_defconfig
index e9724e3..f168a39 100644
--- a/configs/mx6ul_9x9_evk_defconfig
+++ b/configs/mx6ul_9x9_evk_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_MX6UL_9X9_EVK=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg"
diff --git a/configs/novena_defconfig b/configs/novena_defconfig
index c741abe..c83984e 100644
--- a/configs/novena_defconfig
+++ b/configs/novena_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_KOSAGI_NOVENA=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
diff --git a/configs/ot1200_spl_defconfig b/configs/ot1200_spl_defconfig
index 76bb8bf..35c7089 100644
--- a/configs/ot1200_spl_defconfig
+++ b/configs/ot1200_spl_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_OT1200=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
 CONFIG_BOOTDELAY=3
diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig
index 1a10909..ab0de7a 100644
--- a/configs/pcm051_rev1_defconfig
+++ b/configs/pcm051_rev1_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_PCM051=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL_ENV_SUPPORT=y
diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig
index ef6ef4c..d650aa7 100644
--- a/configs/pcm051_rev3_defconfig
+++ b/configs/pcm051_rev3_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_PCM051=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL_ENV_SUPPORT=y
diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig
index 14913bb..61d2d28 100644
--- a/configs/pcm058_defconfig
+++ b/configs/pcm058_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_PCM058=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_FIT=y
diff --git a/configs/pengwyn_defconfig b/configs/pengwyn_defconfig
index 944774b..9c73f95 100644
--- a/configs/pengwyn_defconfig
+++ b/configs/pengwyn_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_PENGWYN=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL_ENV_SUPPORT=y
diff --git a/configs/pepper_defconfig b/configs/pepper_defconfig
index 6cc4bec..b24413d 100644
--- a/configs/pepper_defconfig
+++ b/configs/pepper_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_PEPPER=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL=y
diff --git a/configs/picosam9g45_defconfig b/configs/picosam9g45_defconfig
index 737eb9c..4be2176 100644
--- a/configs/picosam9g45_defconfig
+++ b/configs/picosam9g45_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_PICOSAM9G45=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9M10G45,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
diff --git a/configs/platinum_picon_defconfig b/configs/platinum_picon_defconfig
index 738eb25..9de6bdd 100644
--- a/configs/platinum_picon_defconfig
+++ b/configs/platinum_picon_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_PLATINUM_PICON=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6DL"
diff --git a/configs/platinum_titanium_defconfig b/configs/platinum_titanium_defconfig
index 5a78386..b21c348 100644
--- a/configs/platinum_titanium_defconfig
+++ b/configs/platinum_titanium_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_PLATINUM_TITANIUM=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index ab8f568..ff4b2b7 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_PXM2=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-pxm50"
diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
index 7c33fe6..3ee2341 100644
--- a/configs/rastaban_defconfig
+++ b/configs/rastaban_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_RASTABAN=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-draco"
diff --git a/configs/rut_defconfig b/configs/rut_defconfig
index 724a86f..43a4e90 100644
--- a/configs/rut_defconfig
+++ b/configs/rut_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_RUT=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-rut"
diff --git a/configs/sama5d2_ptc_nandflash_defconfig b/configs/sama5d2_ptc_nandflash_defconfig
index 4ea99a3..b3a9f6e 100644
--- a/configs/sama5d2_ptc_nandflash_defconfig
+++ b/configs/sama5d2_ptc_nandflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D2_PTC=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/sama5d2_ptc_spiflash_defconfig b/configs/sama5d2_ptc_spiflash_defconfig
index 684fe5e..57d2484 100644
--- a/configs/sama5d2_ptc_spiflash_defconfig
+++ b/configs/sama5d2_ptc_spiflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D2_PTC=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index f7e7966..aed5a1b 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D2_XPLAINED=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index da1ade3..138f70d 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D2_XPLAINED=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
 CONFIG_BOOTDELAY=3
diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig
index 8167b0e..00a055b 100644
--- a/configs/sama5d3_xplained_mmc_defconfig
+++ b/configs/sama5d3_xplained_mmc_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D3_XPLAINED=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC"
diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig
index 85af07c..a8c182b 100644
--- a/configs/sama5d3_xplained_nandflash_defconfig
+++ b/configs/sama5d3_xplained_nandflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D3_XPLAINED=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig
index 076ef09..7278ea2 100644
--- a/configs/sama5d3xek_mmc_defconfig
+++ b/configs/sama5d3xek_mmc_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D3XEK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC"
diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig
index 73a3448..f2d3a35 100644
--- a/configs/sama5d3xek_nandflash_defconfig
+++ b/configs/sama5d3xek_nandflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D3XEK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig
index a17c0db..8ac7f64 100644
--- a/configs/sama5d3xek_spiflash_defconfig
+++ b/configs/sama5d3xek_spiflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D3XEK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_SERIALFLASH"
 CONFIG_BOOTDELAY=3
diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig
index 9b8aa23..9b4bbb9 100644
--- a/configs/sama5d4_xplained_mmc_defconfig
+++ b/configs/sama5d4_xplained_mmc_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D4_XPLAINED=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig
index 4090bff..b829338 100644
--- a/configs/sama5d4_xplained_nandflash_defconfig
+++ b/configs/sama5d4_xplained_nandflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D4_XPLAINED=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig
index 80d7002..3becfc8 100644
--- a/configs/sama5d4_xplained_spiflash_defconfig
+++ b/configs/sama5d4_xplained_spiflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D4_XPLAINED=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 CONFIG_BOOTDELAY=3
diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig
index 69027d3..debd47b 100644
--- a/configs/sama5d4ek_mmc_defconfig
+++ b/configs/sama5d4ek_mmc_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D4EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig
index ba268e3..ecf2b72 100644
--- a/configs/sama5d4ek_nandflash_defconfig
+++ b/configs/sama5d4ek_nandflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D4EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig
index f18722f..65f60c1 100644
--- a/configs/sama5d4ek_spiflash_defconfig
+++ b/configs/sama5d4ek_spiflash_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SAMA5D4EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 CONFIG_BOOTDELAY=3
diff --git a/configs/sansa_fuze_plus_defconfig b/configs/sansa_fuze_plus_defconfig
index 302da28..eb5f74d 100644
--- a/configs/sansa_fuze_plus_defconfig
+++ b/configs/sansa_fuze_plus_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_SANSA_FUZE_PLUS=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/sc_sps_1_defconfig b/configs/sc_sps_1_defconfig
index 6b5c797..9dcb64e 100644
--- a/configs/sc_sps_1_defconfig
+++ b/configs/sc_sps_1_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_SC_SPS_1=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
index 6dc2fd5..67d9a6c 100644
--- a/configs/smartweb_defconfig
+++ b/configs/smartweb_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SMARTWEB=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9260-smartweb"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9260"
diff --git a/configs/taurus_defconfig b/configs/taurus_defconfig
index dcabeb6..81ca80d 100644
--- a/configs/taurus_defconfig
+++ b/configs/taurus_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_TAURUS=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20-taurus"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,MACH_TYPE=2067,BOARD_TAURUS"
 CONFIG_BOOTDELAY=3
diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig
index 6a5bd30..5acecc3 100644
--- a/configs/thuban_defconfig
+++ b/configs/thuban_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_THUBAN=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-draco"
diff --git a/configs/ti814x_evm_defconfig b/configs/ti814x_evm_defconfig
index b8ff299..e480f38 100644
--- a/configs/ti814x_evm_defconfig
+++ b/configs/ti814x_evm_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_TI814X_EVM=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_BOOTDELAY=1
 CONFIG_SPL=y
diff --git a/configs/ti816x_evm_defconfig b/configs/ti816x_evm_defconfig
index dd84efc..41cd9fc 100644
--- a/configs/ti816x_evm_defconfig
+++ b/configs/ti816x_evm_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_TI816X_EVM=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
index 08786b2..6fd823e 100644
--- a/configs/udoo_defconfig
+++ b/configs/udoo_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_UDOO=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL"
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index 8feb0f8..b40eae0 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_WANDBOARD=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL"
diff --git a/configs/woodburn_sd_defconfig b/configs/woodburn_sd_defconfig
index 5dea03e..b421db9 100644
--- a/configs/woodburn_sd_defconfig
+++ b/configs/woodburn_sd_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_WOODBURN_SD=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/woodburn/imximage.cfg"
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
diff --git a/configs/xfi3_defconfig b/configs/xfi3_defconfig
index 0dda9d8..61180c1 100644
--- a/configs/xfi3_defconfig
+++ b/configs/xfi3_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_XFI3=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_BOOTDELAY=3
 CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/xpress_spl_defconfig b/configs/xpress_spl_defconfig
index 26eced7..3ddabf8 100644
--- a/configs/xpress_spl_defconfig
+++ b/configs/xpress_spl_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_XPRESS=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg"
diff --git a/configs/zc5202_defconfig b/configs/zc5202_defconfig
index 46625f7..dcda805 100644
--- a/configs/zc5202_defconfig
+++ b/configs/zc5202_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_ZC5202=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
diff --git a/configs/zc5601_defconfig b/configs/zc5601_defconfig
index 3d5e385..9342f22 100644
--- a/configs/zc5601_defconfig
+++ b/configs/zc5601_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_TARGET_ZC5601=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index 8864182..6299462 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -190,7 +190,6 @@ 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 
 #define CONFIG_SYS_MONITOR_LEN		0x80000
 
diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index 3be1072..9bda74f 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -233,7 +233,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index d8748fa..903a549 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -233,7 +233,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 6a239b5..b0fba16 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -26,7 +26,6 @@ 
 #define CONFIG_OMAP_WATCHDOG
 #define CONFIG_SPL_WATCHDOG_SUPPORT
 
-#define CONFIG_SPL_GPIO_SUPPORT
 /* Bootcount using the RTC block */
 #define CONFIG_SYS_BOOTCOUNT_ADDR	0x44E3E000
 #define CONFIG_BOOTCOUNT_LIMIT
diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h
index 11f56bf..3035eed 100644
--- a/include/configs/brxre1.h
+++ b/include/configs/brxre1.h
@@ -42,7 +42,6 @@ 
 #define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC	20000
 
 /* GPIO */
-#define CONFIG_SPL_GPIO_SUPPORT
 
 /* MMC/SD IP block */
 #define CONFIG_MMC
diff --git a/include/configs/chromebook_jerry.h b/include/configs/chromebook_jerry.h
index d1f5b46..9d54e77 100644
--- a/include/configs/chromebook_jerry.h
+++ b/include/configs/chromebook_jerry.h
@@ -22,8 +22,6 @@ 
 
 #define CONFIG_CMD_SF_TEST
 
-#undef CONFIG_SPL_GPIO_SUPPORT
-
 #define CONFIG_KEYBOARD
 
 #define CONFIG_SPL_POWER_SUPPORT
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 47545c6..b77f3dd 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -317,7 +317,6 @@ 
 #define CONFIG_SPL_NAND_BASE
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_POWER_SUPPORT
 #define CONFIG_SPL_OMAP3_ID_NAND
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index 5d94f13..3010449 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -93,7 +93,6 @@ 
 
 #include <configs/ti_armv7_omap.h>
 #undef CONFIG_SPL_OS_BOOT
-#undef CONFIG_SPL_GPIO_SUPPORT
 #undef CONFIG_SPL_NAND_SUPPORT
 #undef CONFIG_SYS_MONITOR_LEN
 #undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
diff --git a/include/configs/corvus.h b/include/configs/corvus.h
index 28ea15b..95fcb78 100644
--- a/include/configs/corvus.h
+++ b/include/configs/corvus.h
@@ -167,7 +167,6 @@ 
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_BASE
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index f2ed798..acc983e 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -59,7 +59,6 @@ 
 #define CONFIG_SUPPORT_EMMC_BOOT
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 
 /* specific .lds file */
diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h
index 4b7c285..208245f 100644
--- a/include/configs/imx6_spl.h
+++ b/include/configs/imx6_spl.h
@@ -33,7 +33,6 @@ 
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_WATCHDOG_SUPPORT
 
 /* NAND support */
diff --git a/include/configs/ipam390.h b/include/configs/ipam390.h
index b36b75d..2b06fe4 100644
--- a/include/configs/ipam390.h
+++ b/include/configs/ipam390.h
@@ -310,7 +310,6 @@ 
 #define CONFIG_CMD_SPL_WRITE_SIZE	0x400
 
 /* GPIO support */
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_DA8XX_GPIO
 #define CONFIG_IPAM390_GPIO_BOOTMODE	((16 * 7) + 14)
 
diff --git a/include/configs/kc1.h b/include/configs/kc1.h
index b08cf21..8851621 100644
--- a/include/configs/kc1.h
+++ b/include/configs/kc1.h
@@ -134,7 +134,6 @@ 
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_POWER_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
 #define CONFIG_SPL_MMC_SUPPORT
 
diff --git a/include/configs/m53evk.h b/include/configs/m53evk.h
index 781a162..c22da52 100644
--- a/include/configs/m53evk.h
+++ b/include/configs/m53evk.h
@@ -241,7 +241,6 @@ 
 #define CONFIG_SPL_TEXT_BASE		0x70008000
 #define CONFIG_SPL_PAD_TO		0x8000
 #define CONFIG_SPL_STACK		0x70004000
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h
index b4bd6b0..e9c4c32 100644
--- a/include/configs/ma5d4evk.h
+++ b/include/configs/ma5d4evk.h
@@ -220,7 +220,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/mxs.h b/include/configs/mxs.h
index 238b16d..0986b3c 100644
--- a/include/configs/mxs.h
+++ b/include/configs/mxs.h
@@ -52,7 +52,6 @@ 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 
 /* Memory sizes */
 #define CONFIG_SYS_MALLOC_LEN		0x00400000	/* 4 MB for malloc */
diff --git a/include/configs/picosam9g45.h b/include/configs/picosam9g45.h
index 1e424cd..20407b8 100644
--- a/include/configs/picosam9g45.h
+++ b/include/configs/picosam9g45.h
@@ -167,7 +167,6 @@ 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_WATCHDOG_SUPPORT
 
 #define CONFIG_SYS_MONITOR_LEN		0x80000
diff --git a/include/configs/sama5d2_ptc.h b/include/configs/sama5d2_ptc.h
index d91d75e..fe33390 100644
--- a/include/configs/sama5d2_ptc.h
+++ b/include/configs/sama5d2_ptc.h
@@ -124,7 +124,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h
index ae1f2be..ee3cd43 100644
--- a/include/configs/sama5d2_xplained.h
+++ b/include/configs/sama5d2_xplained.h
@@ -128,7 +128,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h
index 697fcb0..f947cb5 100644
--- a/include/configs/sama5d3_xplained.h
+++ b/include/configs/sama5d3_xplained.h
@@ -127,7 +127,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h
index 20d55a8..1b6b527 100644
--- a/include/configs/sama5d3xek.h
+++ b/include/configs/sama5d3xek.h
@@ -167,7 +167,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h
index 9874583..5f71eba 100644
--- a/include/configs/sama5d4_xplained.h
+++ b/include/configs/sama5d4_xplained.h
@@ -127,7 +127,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h
index 911f9f8..046c533 100644
--- a/include/configs/sama5d4ek.h
+++ b/include/configs/sama5d4ek.h
@@ -125,7 +125,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 8ff7981..67f1199 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -144,7 +144,6 @@ 
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_YMODEM_SUPPORT
 
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_WATCHDOG_SUPPORT
 
 #define CONFIG_SPL_SPI_SUPPORT
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index 076a5ce..f3bc87d 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -245,7 +245,6 @@ 
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SYS_NAND_ENABLE_PIN_SPL	(2*32 + 14)
 #define CONFIG_SPL_NAND_SUPPORT
 #define CONFIG_SYS_USE_NANDFLASH	1
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index 34fe18e..71f2ada 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -143,7 +143,6 @@ 
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_POWER_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
 #define CONFIG_SPL_MMC_SUPPORT
 
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index b9aa62b..0371f70 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -293,7 +293,6 @@  extern int soft_i2c_gpio_scl;
 
 /* GPIO */
 #define CONFIG_SUNXI_GPIO
-#define CONFIG_SPL_GPIO_SUPPORT
 
 #ifdef CONFIG_VIDEO
 /*
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 8ff4aaa..d4c3e37 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -210,7 +210,6 @@ 
 #define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_POWER_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
 #define CONFIG_SPL_NAND_BASE
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index ae90547..a768bd9 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -301,7 +301,6 @@ 
 #define CONFIG_SPL_NAND_BASE
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_POWER_SUPPORT
 #define CONFIG_SPL_OMAP3_ID_NAND
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index 2d091db..41669b4 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -266,7 +266,6 @@ 
 #define CONFIG_SPL_SERIAL_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SYS_NAND_ENABLE_PIN_SPL	(2*32 + 14)
 #define CONFIG_SPL_NAND_SUPPORT
 #define CONFIG_SYS_USE_NANDFLASH	1
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 7b0940a..5f4b980 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -125,7 +125,6 @@ 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_BOARD_LATE_INIT
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h
index ecd54bb..1ef7133 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -174,7 +174,6 @@ 
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_YMODEM_SUPPORT
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x20000
 #define CONFIG_SYS_SPI_U_BOOT_SIZE	0x40000
diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h
index 73e5f06..bb91828 100644
--- a/include/configs/ti816x_evm.h
+++ b/include/configs/ti816x_evm.h
@@ -140,7 +140,6 @@ 
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_YMODEM_SUPPORT
 #define CONFIG_SYS_SPI_U_BOOT_OFFS  0x20000
 #define CONFIG_SYS_SPI_U_BOOT_SIZE  0x40000
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index c6fdfe1..513a860 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -269,7 +269,6 @@ 
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_POWER_SUPPORT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_BOARD_INIT
 
 #ifdef CONFIG_NAND
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 1145d83..8fc98f1 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -315,7 +315,6 @@ 
 #undef CONFIG_GENERIC_MMC
 
 /* And no support for GPIO, yet.. */
-#undef CONFIG_SPL_GPIO_SUPPORT
 
 /* we may include files below only after all above definitions */
 #include <asm/arch/hardware.h>
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 3a9bf7e..b636b1a 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -321,7 +321,6 @@ 
 #define CONFIG_SPL_NAND_SIMPLE
 
 #define CONFIG_SPL_BOARD_INIT
-#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
diff --git a/include/configs/woodburn_sd.h b/include/configs/woodburn_sd.h
index 25bfeef..f74e120 100644
--- a/include/configs/woodburn_sd.h
+++ b/include/configs/woodburn_sd.h
@@ -30,7 +30,6 @@ 
 #define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x100 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x400 /* 512 KB */
-#define	CONFIG_SPL_GPIO_SUPPORT
 
 #define CONFIG_SPL_TEXT_BASE		0x10002300
 #define CONFIG_SPL_MAX_SIZE		(64 * 1024)	/* 8 KB for stack */