dm: gpio: Allow control of GPIO uclass in SPL
authorSimon Glass <sjg@chromium.org>
Sat, 7 Dec 2019 04:41:35 +0000 (21:41 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Sun, 15 Dec 2019 00:52:29 +0000 (08:52 +0800)
commitbcee8d6764f9215f16b393a35581000178633254
tree592ad4911f0bb8c35a5ef4de29b03c62fb6cb32f
parent3c10dc95bdd0706ff85ffdc25ecd6381c3d51e4c
dm: gpio: Allow control of GPIO uclass in SPL

At present if CONFIG_SPL_GPIO_SUPPORT is enabled then the GPIO uclass
is included in SPL/TPL without any control for boards. Some boards may
want to disable this to reduce code size where GPIOs are not needed in
SPL or TPL.

Add a new Kconfig option to permit this. Default it to 'y' so that
existing boards work correctly.

Change existing uses of CONFIG_DM_GPIO to CONFIG_IS_ENABLED(DM_GPIO) to
preserve the current behaviour. Also update the 74x164 GPIO driver since
it cannot build with SPL.

This allows us to remove the hacks in config_uncmd_spl.h and
Makefile.uncmd_spl (eventually those files should be removed).

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
42 files changed:
arch/arm/include/asm/omap_gpio.h
arch/arm/mach-at91/include/mach/at91sam9260.h
arch/arm/mach-davinci/include/mach/gpio.h
arch/arm/mach-omap2/am33xx/board.c
arch/arm/mach-omap2/omap3/board.c
arch/arm/mach-omap2/omap5/hwinit.c
board/freescale/imx8qm_mek/imx8qm_mek.c
board/freescale/imx8qxp_mek/imx8qxp_mek.c
board/gateworks/gw_ventana/Kconfig
board/toradex/apalis-imx8/apalis-imx8.c
configs/omap35_logic_defconfig
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/at91_gpio.c
drivers/gpio/atmel_pio4.c
drivers/gpio/da8xx_gpio.c
drivers/gpio/da8xx_gpio.h
drivers/gpio/mxc_gpio.c
drivers/gpio/mxs_gpio.c
drivers/gpio/omap_gpio.c
drivers/gpio/sunxi_gpio.c
drivers/i2c/i2c-uclass.c
drivers/i2c/muxes/pca954x.c
drivers/mmc/fsl_esdhc_imx.c
drivers/mmc/omap_hsmmc.c
drivers/net/designware.c
drivers/net/designware.h
drivers/net/fec_mxc.c
drivers/net/fec_mxc.h
drivers/net/mvneta.c
drivers/net/mvpp2.c
drivers/net/sun8i_emac.c
drivers/pci/pci-aardvark.c
drivers/pci/pcie_dw_mvebu.c
drivers/spi/atmel_spi.c
drivers/spi/designware_spi.c
drivers/tpm/tpm2_tis_spi.c
include/config_uncmd_spl.h
include/configs/at91-sama5_common.h
include/configs/gw_ventana.h
include/configs/mx6ul_14x14_evk.h
scripts/Makefile.uncmd_spl