omap3: Migrate CONFIG_OMAP3_GPIO_X to Kconfig
authorTom Rini <trini@konsulko.com>
Sat, 13 May 2017 02:33:22 +0000 (22:33 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 15 May 2017 14:40:00 +0000 (10:40 -0400)
The symbols CONFIG_OMAP3_GPIO_X control if we enable the clocks for a
given GPIO bank in U-Boot.  select the required banks for each target.
In some cases we need to also migrate from CONFIG_USB_EHCI (deprecated,
in include/configs/) to CONFIG_USB_EHCI_HCD as we only require the GPIO
bank to be enabled if USB is also enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
20 files changed:
arch/arm/mach-omap2/omap3/Kconfig
configs/eco5pk_defconfig
configs/mcx_defconfig
configs/mt_ventoux_defconfig
configs/twister_defconfig
include/configs/cm_t35.h
include/configs/cm_t3517.h
include/configs/mcx.h
include/configs/mt_ventoux.h
include/configs/omap3_beagle.h
include/configs/omap3_igep00x0.h
include/configs/omap3_logic.h
include/configs/omap3_overo.h
include/configs/omap3_pandora.h
include/configs/sniper.h
include/configs/tam3517-common.h
include/configs/tao3530.h
include/configs/tricorder.h
include/configs/twister.h
scripts/config_whitelist.txt

index 933fcba..7b298d6 100644 (file)
@@ -1,5 +1,21 @@
 if OMAP34XX
 
+# We only enable the clocks for the GPIO banks that a given board requies.
+config OMAP3_GPIO_2
+       bool
+
+config OMAP3_GPIO_3
+       bool
+
+config OMAP3_GPIO_4
+       bool
+
+config OMAP3_GPIO_5
+       bool
+
+config OMAP3_GPIO_6
+       bool
+
 choice
        prompt "OMAP3 board select"
        optional
@@ -9,18 +25,28 @@ config TARGET_AM3517_EVM
 
 config TARGET_MT_VENTOUX
        bool "TeeJet Mt.Ventoux"
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_5 if USB_EHCI_HCD
 
 config TARGET_OMAP3_BEAGLE
        bool "TI OMAP3 BeagleBoard"
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 config TARGET_CM_T35
        bool "CompuLab CM-T3530 and CM-T3730 boards"
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6 if LED_STATUS
 
 config TARGET_CM_T3517
        bool "CompuLab CM-T3517 boards"
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6 if LED_STATUS
 
 config TARGET_DEVKIT8000
        bool "TimLL OMAP3 Devkit8000"
@@ -36,12 +62,20 @@ config TARGET_OMAP3_IGEP00X0
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_3
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 config TARGET_OMAP3_OVERO
        bool "OMAP35xx Gumstix Overo"
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_3
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 config TARGET_OMAP3_ZOOM1
        bool "TI Zoom1"
@@ -54,16 +88,22 @@ config TARGET_AM3517_CRANE
 
 config TARGET_OMAP3_PANDORA
        bool "OMAP3 Pandora"
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_6
 
 config TARGET_ECO5PK
        bool "ECO5PK"
+       select OMAP3_GPIO_5 if USB_EHCI_HCD
 
 config TARGET_TRICORDER
        bool "Tricorder"
+       select OMAP3_GPIO_2
 
 config TARGET_MCX
        bool "MCX"
        select BOARD_LATE_INIT
+       select OMAP3_GPIO_2 if USB_EHCI_HCD
+       select OMAP3_GPIO_5 if USB_EHCI_HCD
 
 config TARGET_OMAP3_LOGIC
        bool "OMAP3 Logic"
@@ -71,15 +111,24 @@ config TARGET_OMAP3_LOGIC
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_6
 
 config TARGET_NOKIA_RX51
        bool "Nokia RX51"
 
 config TARGET_TAO3530
        bool "TAO3530"
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_3
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 config TARGET_TWISTER
        bool "Twister"
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_5 if USB_EHCI_HCD
 
 config TARGET_OMAP3_CAIRO
        bool "QUIPOS CAIRO"
@@ -92,6 +141,11 @@ config TARGET_SNIPER
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_3
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 endchoice
 
index 2f3d814..a6de0b2 100644 (file)
@@ -24,5 +24,6 @@ CONFIG_CMD_UBI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 3cc1a2b..349df80 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_CMD_UBI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT_OMAP=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 08e400c..4840868 100644 (file)
@@ -29,6 +29,7 @@ CONFIG_CMD_UBI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT_OMAP=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index ba7b68b..62d7d17 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT_OMAP=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 349a8de..78f8e5d 100644 (file)
 
 #define CONFIG_SPLASHIMAGE_GUARD
 
-/* GPIO banks */
-#ifdef CONFIG_LED_STATUS
-#define CONFIG_OMAP3_GPIO_6    /* GPIO186 is in GPIO bank 6  */
-#endif
-
 /* Display Configuration */
-#define CONFIG_OMAP3_GPIO_2
-#define CONFIG_OMAP3_GPIO_5
 #define CONFIG_VIDEO_OMAP3
 #define LCD_BPP                LCD_COLOR16
 
index 2fed312..d157f24 100644 (file)
 /* Status LED */
 #define GREEN_LED_GPIO                 186 /* CM-T3517 Green LED is GPIO186 */
 
-/* GPIO banks */
-#ifdef CONFIG_LED_STATUS
-#define CONFIG_OMAP3_GPIO_6    /* GPIO186 is in GPIO bank 6  */
-#endif
-
 /* Display Configuration */
-#define CONFIG_OMAP3_GPIO_2
-#define CONFIG_OMAP3_GPIO_5
 #define CONFIG_VIDEO_OMAP3
 #define LCD_BPP                LCD_COLOR16
 
index c698166..09f8b96 100644 (file)
@@ -73,9 +73,6 @@
                                        115200}
 
 /* EHCI */
-#define CONFIG_OMAP3_GPIO_2
-#define CONFIG_OMAP3_GPIO_5
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_OMAP
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO       57
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
index dfebde2..2e37317 100644 (file)
@@ -24,7 +24,6 @@
 #define CONFIG_BOOTFILE                "uImage"
 #define CONFIG_AUTO_COMPLETE
 
-#define CONFIG_OMAP3_GPIO_4
 #define CONFIG_HOSTNAME mt_ventoux
 
 /*
index c69b325..c91d093 100644 (file)
 #define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_5            /* GPIO128..159 is in GPIO bank 5 */
-#define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
-
 /* commands to include */
 
 #define MTDIDS_DEFAULT                 "nand0=nand"
index 70d337e..59da726 100644 (file)
 #endif
 #endif
 
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_3            /* GPIO64 .. 95 is in GPIO bank 3 */
-#define CONFIG_OMAP3_GPIO_5            /* GPIO128..159 is in GPIO bank 5 */
-#define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
-
 /* USB */
 #define CONFIG_USB_MUSB_UDC            1
 #define CONFIG_USB_OMAP3               1
index 772fc60..735c9ef 100644 (file)
 
 /* Hardware drivers */
 
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_4            /* GPIO 96..128 is in GPIO bank 4 */
-#define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
-
 #define CONFIG_USB_OMAP3
 
 /* commands to include */
index ebf7dd0..40107e4 100644 (file)
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO       183
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     3
 
-/* Initialize GPIOs by default */
-#define CONFIG_OMAP3_GPIO_2    /* GPIO32..63 is in GPIO Bank 2 */
-#define CONFIG_OMAP3_GPIO_3    /* GPIO64..95 is in GPIO Bank 3 */
-#define CONFIG_OMAP3_GPIO_4    /* GPIO96..127 is in GPIO Bank 4 */
-#define CONFIG_OMAP3_GPIO_5    /* GPIO128..159 is in GPIO Bank 5 */
-#define CONFIG_OMAP3_GPIO_6    /* GPIO160..191 is in GPIO Bank 6 */
-
 /* commands to include */
 
 #ifdef CONFIG_NAND
index ba7d3cd..efee5b0 100644 (file)
 /* TWL4030 LED */
 #define CONFIG_TWL4030_LED
 
-/* Initialize GPIOs by default */
-#define CONFIG_OMAP3_GPIO_4    /* GPIO96..127 is in GPIO Bank 4 */
-#define CONFIG_OMAP3_GPIO_6    /* GPIO160..191 is in GPIO Bank 6 */
-
 /*
  * NS16550 Configuration
  */
index 23e965f..c56169d 100644 (file)
 
 #define CONFIG_SYS_MALLOC_LEN          (1024 * 1024 + CONFIG_ENV_SIZE)
 
-/*
- * GPIO
- */
-#define CONFIG_OMAP3_GPIO_2
-#define CONFIG_OMAP3_GPIO_3
-#define CONFIG_OMAP3_GPIO_4
-#define CONFIG_OMAP3_GPIO_5
-#define CONFIG_OMAP3_GPIO_6
-
 /*
  * I2C
  */
index 84d5907..9dfda1e 100644 (file)
@@ -67,8 +67,6 @@
 #define CONFIG_SYS_BAUDRATE_TABLE      {4800, 9600, 19200, 38400, 57600,\
                                        115200}
 /* EHCI */
-#define CONFIG_OMAP3_GPIO_5
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_OMAP
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO       25
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
index 85feb05..834fe17 100644 (file)
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_2            /* GPIO32 ..63  is in GPIO bank 2 */
-#define CONFIG_OMAP3_GPIO_3            /* GPIO64 ..95  is in GPIO bank 3 */
-#define CONFIG_OMAP3_GPIO_4            /* GPIO96 ..127 is in GPIO bank 4 */
-#define CONFIG_OMAP3_GPIO_5            /* GPIO128..159 is in GPIO bank 5 */
-#define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
-
 /* commands to include */
 #define CONFIG_CMD_MTDPARTS    /* Enable MTD parts commands */
 #define CONFIG_MTD_DEVICE      /* needed for mtdparts commands */
index bc592cf..8fe4165 100644 (file)
 
 /* Hardware drivers */
 
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_2            /* GPIO32..63 are in GPIO bank 2 */
-
-/* LED support */
-
 /* NS16550 Configuration */
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
index 30ad241..a7de75e 100644 (file)
@@ -45,7 +45,4 @@
 #define CONFIG_SYS_SPL_ARGS_ADDR       (PHYS_SDRAM_1 + 0x100)
 #define CONFIG_SPL_BOARD_INIT
 
-/* gpio 55 is used as SPL_OS_BOOT_KEY */
-#define CONFIG_OMAP3_GPIO_2
-
 #endif /* __CONFIG_H */
index ea82a71..ee8f215 100644 (file)
@@ -1979,11 +1979,6 @@ CONFIG_OF_SPI
 CONFIG_OF_SPI_FLASH
 CONFIG_OF_STDOUT_PATH
 CONFIG_OF_SUPPORT_OLD_DEVICE_TREES
-CONFIG_OMAP3_GPIO_2
-CONFIG_OMAP3_GPIO_3
-CONFIG_OMAP3_GPIO_4
-CONFIG_OMAP3_GPIO_5
-CONFIG_OMAP3_GPIO_6
 CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID
 CONFIG_OMAP3_MICRON_DDR
 CONFIG_OMAP3_SPI_D0_D1_SWAPPED