gpio: Introduce CONFIG_GPIO_EXTRA_HEADER to cleanup #ifdefs
Since some SoCs and boards do not hae extra asm/arch/gpio.h,
introduce CONFIG_GPIO_EXTRA_HEADER instead of adding
!define(CONFIG_ARCH_XXXX) in asm/gpio.h.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0448787..993772b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -90,6 +90,9 @@
config HAS_THUMB2
bool
+config GPIO_EXTRA_HEADER
+ bool
+
# Used for compatibility with asm files copied from the kernel
config ARM_ASM_UNIFIED
bool
@@ -518,25 +521,30 @@
config ARCH_AT91
bool "Atmel AT91"
+ select GPIO_EXTRA_HEADER
select SPL_BOARD_INIT if SPL && !TARGET_SMARTWEB
select SPL_SEPARATE_BSS if SPL
config TARGET_EDB93XX
bool "Support edb93xx"
select CPU_ARM920T
+ select GPIO_EXTRA_HEADER
select PL010_SERIAL
config TARGET_ASPENITE
bool "Support aspenite"
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
config TARGET_GPLUGD
bool "Support gplugd"
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
config ARCH_DAVINCI
bool "TI DaVinci"
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
select SPL_DM_SPI if SPL
imply CMD_SAVES
help
@@ -547,6 +555,7 @@
select ARCH_MISC_INIT
select BOARD_EARLY_INIT_F
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
config ARCH_MVEBU
bool "Marvell MVEBU family (Armada XP/375/38x/3700/7K/8K)"
@@ -555,6 +564,7 @@
select DM_SERIAL
select DM_SPI
select DM_SPI_FLASH
+ select GPIO_EXTRA_HEADER
select SPL_DM_SPI if SPL
select SPL_DM_SPI_FLASH if SPL
select OF_CONTROL
@@ -565,11 +575,13 @@
config ARCH_ORION5X
bool "Marvell Orion"
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
config TARGET_SPEAR300
bool "Support spear300"
select BOARD_EARLY_INIT_F
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
select PL011_SERIAL
imply CMD_SAVES
@@ -577,6 +589,7 @@
bool "Support spear310"
select BOARD_EARLY_INIT_F
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
select PL011_SERIAL
imply CMD_SAVES
@@ -584,6 +597,7 @@
bool "Support spear320"
select BOARD_EARLY_INIT_F
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
select PL011_SERIAL
imply CMD_SAVES
@@ -591,6 +605,7 @@
bool "Support spear600"
select BOARD_EARLY_INIT_F
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
select PL011_SERIAL
imply CMD_SAVES
@@ -601,6 +616,7 @@
select DM_SERIAL
select DM_SPI
select DM_SPI_FLASH
+ select GPIO_EXTRA_HEADER
select PL01X_SERIAL
select SPI
select SPI_FLASH
@@ -610,18 +626,21 @@
bool "Support x600"
select BOARD_LATE_INIT
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
select PL011_SERIAL
select SUPPORT_SPL
config TARGET_FLEA3
bool "Support flea3"
select CPU_ARM1136
+ select GPIO_EXTRA_HEADER
config ARCH_BCM283X
bool "Broadcom BCM283X family"
select DM
select DM_GPIO
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select PL01X_SERIAL
select SERIAL_SEARCH_ALL
@@ -650,6 +669,7 @@
bool "Broadcom BCM7XXX family"
select CPU_V7A
select DM
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select OF_PRIOR_STAGE
imply CMD_DM
@@ -660,6 +680,7 @@
config TARGET_BCMCYGNUS
bool "Support bcmcygnus"
select CPU_V7A
+ select GPIO_EXTRA_HEADER
imply BCM_SF2_ETH
imply BCM_SF2_ETH_GMAC
imply CMD_HASH
@@ -671,6 +692,7 @@
config TARGET_BCMNS2
bool "Support Broadcom Northstar2"
select ARM64
+ select GPIO_EXTRA_HEADER
help
Support for Broadcom Northstar 2 SoCs. NS2 is a quad-core 64-bit
ARMv8 Cortex-A57 processors targeting a broad range of networking
@@ -695,6 +717,7 @@
select DM_SPI
select DM_SPI_FLASH
select SPI
+ select GPIO_EXTRA_HEADER
imply SYS_THUMB_BUILD
imply CMD_DM
imply FAT_WRITE
@@ -706,6 +729,7 @@
select DM_GPIO
select DM_I2C
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
imply CMD_DM
config ARCH_HIGHBANK
@@ -726,6 +750,7 @@
bool "ARM Ltd. Integrator family"
select DM
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select PL01X_SERIAL
imply CMD_DM
@@ -736,6 +761,7 @@
select DM_GPIO
select DM_SERIAL
select DM_RESET
+ select GPIO_EXTRA_HEADER
select MSM_SMEM
select PINCTRL
select CLK
@@ -747,6 +773,7 @@
bool "TI Keystone"
select CMD_POWEROFF
select CPU_V7A
+ select GPIO_EXTRA_HEADER
select SUPPORT_SPL
select SYS_ARCH_TIMER
select SYS_THUMB_BUILD
@@ -763,6 +790,7 @@
config ARCH_OMAP2PLUS
bool "TI OMAP2+"
select CPU_V7A
+ select GPIO_EXTRA_HEADER
select SPL_BOARD_INIT if SPL
select SPL_STACK_R if SPL
select SUPPORT_SPL
@@ -771,6 +799,7 @@
config ARCH_MESON
bool "Amlogic Meson"
+ select GPIO_EXTRA_HEADER
imply DISTRO_DEFAULTS
imply DM_RNG
help
@@ -781,6 +810,7 @@
config ARCH_MEDIATEK
bool "MediaTek SoCs"
select DM
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select SPL_DM if SPL
select SPL_LIBCOMMON_SUPPORT if SPL
@@ -797,6 +827,7 @@
select DM
select DM_GPIO
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select SPL_DM if SPL
select SUPPORT_SPL
imply CMD_DM
@@ -805,12 +836,14 @@
bool "NXP i.MX8 platform"
select ARM64
select DM
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select ENABLE_ARM_SOC_BOOT0_HOOK
config ARCH_IMX8M
bool "NXP i.MX8M platform"
select ARM64
+ select GPIO_EXTRA_HEADER
select SYS_FSL_HAS_SEC if IMX_HAB
select SYS_FSL_SEC_COMPAT_4
select SYS_FSL_SEC_LE
@@ -823,33 +856,39 @@
select CPU_V7M
select DM
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select SUPPORT_SPL
imply CMD_DM
config ARCH_MX23
bool "NXP i.MX23 family"
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
select PL011_SERIAL
select SUPPORT_SPL
config ARCH_MX25
bool "NXP MX25"
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
imply MXC_GPIO
config ARCH_MX28
bool "NXP i.MX28 family"
select CPU_ARM926EJS
+ select GPIO_EXTRA_HEADER
select PL011_SERIAL
select SUPPORT_SPL
config ARCH_MX31
bool "NXP i.MX31 family"
select CPU_ARM1136
+ select GPIO_EXTRA_HEADER
config ARCH_MX7ULP
bool "NXP MX7ULP"
select CPU_V7A
+ select GPIO_EXTRA_HEADER
select SYS_FSL_HAS_SEC if IMX_HAB
select SYS_FSL_SEC_COMPAT_4
select SYS_FSL_SEC_LE
@@ -861,6 +900,7 @@
bool "Freescale MX7"
select ARCH_MISC_INIT
select CPU_V7A
+ select GPIO_EXTRA_HEADER
select SYS_FSL_HAS_SEC if IMX_HAB
select SYS_FSL_SEC_COMPAT_4
select SYS_FSL_SEC_LE
@@ -871,6 +911,7 @@
config ARCH_MX6
bool "Freescale MX6"
select CPU_V7A
+ select GPIO_EXTRA_HEADER
select SYS_FSL_HAS_SEC
select SYS_FSL_SEC_COMPAT_4
select SYS_FSL_SEC_LE
@@ -886,18 +927,21 @@
bool "Freescale MX5"
select BOARD_EARLY_INIT_F
select CPU_V7A
+ select GPIO_EXTRA_HEADER
imply MXC_GPIO
config ARCH_NEXELL
bool "Nexell S5P4418/S5P6818 SoC"
select ENABLE_ARM_SOC_BOOT0_HOOK
select DM
+ select GPIO_EXTRA_HEADER
config ARCH_OWL
bool "Actions Semi OWL SoCs"
select DM
select DM_ETH
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select OWL_SERIAL
select CLK
select CLK_OWL
@@ -920,6 +964,7 @@
bool "Renesas ARM SoCs"
select DM
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
imply BOARD_EARLY_INIT_F
imply CMD_DM
imply FAT_WRITE
@@ -932,6 +977,7 @@
select DM
select DM_GPIO
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select MSM_SMEM
select OF_CONTROL
select OF_SEPARATE
@@ -947,6 +993,7 @@
select CPU_V7A if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10
select DM
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select ENABLE_ARM_SOC_BOOT0_HOOK if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10
select OF_CONTROL
select SPL_DM_RESET if DM_RESET
@@ -998,6 +1045,7 @@
select DM_SCSI if SCSI
select DM_SERIAL
select DM_USB if DISTRO_DEFAULTS
+ select GPIO_EXTRA_HEADER
select OF_BOARD_SETUP
select OF_CONTROL
select OF_SEPARATE
@@ -1057,6 +1105,7 @@
select DM_ETH if NET
select DM_MMC if MMC
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
imply BOARD_LATE_INIT
imply ENV_VARS_UBOOT_RUNTIME_CONFIG
@@ -1064,6 +1113,7 @@
config ARCH_VF610
bool "Freescale Vybrid"
select CPU_V7A
+ select GPIO_EXTRA_HEADER
select SYS_FSL_ERRATUM_ESDHC111
imply CMD_MTDPARTS
imply MTD_RAW_NAND
@@ -1080,6 +1130,7 @@
select DM_SPI
select DM_SPI_FLASH
select DM_USB if USB
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select SPI
select SPL_BOARD_INIT if SPL
@@ -1106,6 +1157,7 @@
select DM_ETH if NET
select DM_MMC if MMC
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
imply CMD_DM
imply DM_USB_GADGET
@@ -1123,6 +1175,7 @@
select DM_SPI_FLASH if DM_SPI
select DM_USB if USB
select FIRMWARE
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select SPL_BOARD_INIT if SPL
select SPL_CLK if SPL
@@ -1143,23 +1196,27 @@
config ARCH_TEGRA
bool "NVIDIA Tegra"
+ select GPIO_EXTRA_HEADER
imply DISTRO_DEFAULTS
imply FAT_WRITE
config TARGET_VEXPRESS64_AEMV8A
bool "Support vexpress_aemv8a"
select ARM64
+ select GPIO_EXTRA_HEADER
select PL01X_SERIAL
config TARGET_VEXPRESS64_BASE_FVP
bool "Support Versatile Express ARMv8a FVP BASE model"
select ARM64
+ select GPIO_EXTRA_HEADER
select PL01X_SERIAL
select SEMIHOSTING
config TARGET_VEXPRESS64_JUNO
bool "Support Versatile Express Juno Development Platform"
select ARM64
+ select GPIO_EXTRA_HEADER
select PL01X_SERIAL
select DM
select OF_CONTROL
@@ -1188,6 +1245,7 @@
select ARM64
select ARMV8_MULTIENTRY
select FSL_DDR_SYNC_REFRESH
+ select GPIO_EXTRA_HEADER
help
Support for Freescale LS2080A_EMU platform.
The LS2080A Development System (EMULATOR) is a pre-silicon
@@ -1201,6 +1259,7 @@
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
select SUPPORT_SPL
select FSL_DDR_INTERACTIVE if !SD_BOOT
help
@@ -1216,6 +1275,7 @@
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
select SUPPORT_SPL
imply SCSI
imply SCSI_AHCI
@@ -1237,6 +1297,7 @@
select SUPPORT_SPL
select FSL_DDR_BIST
select FSL_DDR_INTERACTIVE if !SPL
+ select GPIO_EXTRA_HEADER
imply SCSI
imply SCSI_AHCI
help
@@ -1251,6 +1312,7 @@
select ARM64
select ARMV8_MULTIENTRY
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
select SUPPORT_SPL
help
Support for Freescale LS2081ARDB platform.
@@ -1265,6 +1327,7 @@
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
help
Support for NXP LX2160ARDB platform.
The lx2160ardb (LX2160A Reference design board (RDB)
@@ -1278,6 +1341,7 @@
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
help
Support for NXP LX2160AQDS platform.
The lx2160aqds (LX2160A QorIQ Development System (QDS)
@@ -1292,6 +1356,7 @@
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
help
Support for NXP LX2162AQDS platform.
The lx2162aqds support is based on LX2160A Layerscape Architecture processor.
@@ -1302,6 +1367,7 @@
select DM
select DM_GPIO
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select PL01X_SERIAL
select SPECIFY_CONSOLE_INDEX
@@ -1315,6 +1381,7 @@
select ARM64
select DM
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select PL01X_SERIAL
imply CMD_DM
@@ -1328,6 +1395,7 @@
select DM
select DM_SERIAL
select DM_USB
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select PL01X_SERIAL
imply CMD_DM
@@ -1343,6 +1411,7 @@
select ARM64
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
help
Support for Freescale LS1012AQDS platform.
The LS1012A Development System (QDS) is a high-performance
@@ -1355,6 +1424,7 @@
select ARM64
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
imply SCSI
imply SCSI_AHCI
help
@@ -1369,6 +1439,7 @@
select ARM64
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
imply SCSI
help
Support for Freescale LS1012A2G5RDB platform.
@@ -1382,6 +1453,7 @@
select ARM64
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
imply SCSI
imply SCSI_AHCI
help
@@ -1395,6 +1467,7 @@
select ARCH_LS1012A
select ARM64
select ARCH_SUPPORT_TFABOOT
+ select GPIO_EXTRA_HEADER
help
Support for Freescale LS1012AFRDM platform.
The LS1012A Freedom board (FRDM) is a high-performance
@@ -1408,6 +1481,7 @@
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
help
Support for Freescale LS1028AQDS platform
The LS1028A Development System (QDS) is a high-performance
@@ -1421,6 +1495,7 @@
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select GPIO_EXTRA_HEADER
help
Support for Freescale LS1028ARDB platform
The LS1028A Development System (RDB) is a high-performance
@@ -1436,6 +1511,7 @@
select BOARD_LATE_INIT
select SUPPORT_SPL
select FSL_DDR_INTERACTIVE if !SD_BOOT
+ select GPIO_EXTRA_HEADER
help
Support for NXP LS1088ARDB platform.
The LS1088A Reference design board (RDB) is a high-performance
@@ -1456,6 +1532,7 @@
select SYS_FSL_DDR
select FSL_DDR_INTERACTIVE
select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
+ select GPIO_EXTRA_HEADER
select SPI_FLASH_DATAFLASH if FSL_DSPI || FSL_QSPI
imply SCSI
@@ -1471,6 +1548,7 @@
select LS1_DEEP_SLEEP
select SUPPORT_SPL
select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
+ select GPIO_EXTRA_HEADER
imply SCSI
config TARGET_PG_WCOM_SELI8
@@ -1484,6 +1562,7 @@
select CPU_V7_HAS_VIRT
select SYS_FSL_DDR
select FSL_DDR_INTERACTIVE
+ select GPIO_EXTRA_HEADER
select VENDOR_KM
imply SCSI
help
@@ -1520,6 +1599,7 @@
select CPU_V7_HAS_VIRT
select LS1_DEEP_SLEEP
select SUPPORT_SPL
+ select GPIO_EXTRA_HEADER
imply SCSI
config TARGET_LS1021AIOT
@@ -1532,6 +1612,7 @@
select CPU_V7_HAS_VIRT
select SUPPORT_SPL
select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
+ select GPIO_EXTRA_HEADER
imply SCSI
help
Support for Freescale LS1021AIOT platform.
@@ -1551,6 +1632,7 @@
select FSL_DDR_INTERACTIVE if !SPL
select FSL_DSPI if !SPL_NO_DSPI
select DM_SPI_FLASH if FSL_DSPI
+ select GPIO_EXTRA_HEADER
imply SCSI
imply SCSI_AHCI
help
@@ -1567,6 +1649,7 @@
select SUPPORT_SPL
select FSL_DSPI if !SPL_NO_DSPI
select DM_SPI_FLASH if FSL_DSPI
+ select GPIO_EXTRA_HEADER
help
Support for Freescale LS1043ARDB platform.
@@ -1583,6 +1666,7 @@
select FSL_DDR_BIST if !SPL
select FSL_DDR_INTERACTIVE if !SPL
select FSL_DDR_INTERACTIVE if !SPL
+ select GPIO_EXTRA_HEADER
imply SCSI
help
Support for Freescale LS1046AQDS platform.
@@ -1603,6 +1687,7 @@
select SUPPORT_SPL
select FSL_DDR_BIST
select FSL_DDR_INTERACTIVE if !SPL
+ select GPIO_EXTRA_HEADER
imply SCSI
help
Support for Freescale LS1046ARDB platform.
@@ -1619,6 +1704,7 @@
select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select DM_SPI_FLASH if DM_SPI
+ select GPIO_EXTRA_HEADER
imply SCSI
help
Support for Freescale LS1046AFRWY platform.
@@ -1647,6 +1733,7 @@
select DM_SERIAL
select DM_SPI
select DM_USB
+ select GPIO_EXTRA_HEADER
select SPL_DM if SPL
select SPL_DM_SPI if SPL
select SPL_DM_SPI_FLASH if SPL
@@ -1659,6 +1746,7 @@
config TARGET_COLIBRI_PXA270
bool "Support colibri_pxa270"
select CPU_PXA
+ select GPIO_EXTRA_HEADER
config ARCH_UNIPHIER
bool "Socionext UniPhier SoCs"
@@ -1695,6 +1783,7 @@
select CPU_V7M
select DM
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
imply CMD_DM
config ARCH_STI
@@ -1720,6 +1809,7 @@
select DM_GPIO
select DM_RESET
select DM_SERIAL
+ select GPIO_EXTRA_HEADER
select MISC
select OF_CONTROL
select OF_LIBFDT
@@ -1782,6 +1872,7 @@
bool "Support OcteonTX SoCs"
select CLK
select DM
+ select GPIO_EXTRA_HEADER
select ARM64
select OF_CONTROL
select OF_LIVE
@@ -1792,6 +1883,7 @@
bool "Support OcteonTX2 SoCs"
select CLK
select DM
+ select GPIO_EXTRA_HEADER
select ARM64
select OF_CONTROL
select OF_LIVE
@@ -1801,6 +1893,7 @@
config TARGET_THUNDERX_88XX
bool "Support ThunderX 88xx"
select ARM64
+ select GPIO_EXTRA_HEADER
select OF_CONTROL
select PL01X_SERIAL
select SYS_CACHE_SHIFT_7
@@ -1814,6 +1907,7 @@
config TARGET_DURIAN
bool "Support Phytium Durian Platform"
select ARM64
+ select GPIO_EXTRA_HEADER
help
Support for durian platform.
It has 2GB Sdram, uart and pcie.