Convert CONFIG_EMIF4 et al to Kconfig

This converts the following to Kconfig:
   CONFIG_EMIF4
   CONFIG_SDRC

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefano Babic <sbabic@denx.de>
diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig
index cc2c4cd..11f5f05 100644
--- a/arch/arm/mach-omap2/omap3/Kconfig
+++ b/arch/arm/mach-omap2/omap3/Kconfig
@@ -150,6 +150,21 @@
 
 endchoice
 
+choice
+	prompt "Memory Controller"
+	default SDRC
+
+config SDRC
+	bool "SDRC controller"
+	help
+	  The default memory controller on most OMAP3 boards is SDRC.
+
+config EMIF4
+	bool "EMIF4 controller"
+	help
+	  Enable this on boards like AM3517 which use EMIF4 controller
+endchoice
+
 config SPL_OMAP3_ID_NAND
 	bool "Support OMAP3-specific ID and MFR function"
 	help
diff --git a/configs/am3517_crane_defconfig b/configs/am3517_crane_defconfig
index 42260b1..516ac2d 100644
--- a/configs/am3517_crane_defconfig
+++ b/configs/am3517_crane_defconfig
@@ -4,6 +4,7 @@
 CONFIG_SYS_TEXT_BASE=0x80100000
 # CONFIG_SPL_GPIO_SUPPORT is not set
 CONFIG_TARGET_AM3517_CRANE=y
+CONFIG_EMIF4=y
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
 # CONFIG_SPL_EXT_SUPPORT is not set
diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index b3e89eb..920c61c 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -5,6 +5,7 @@
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 # CONFIG_SPL_GPIO_SUPPORT is not set
 CONFIG_TARGET_AM3517_EVM=y
+CONFIG_EMIF4=y
 CONFIG_BOOTDELAY=10
 CONFIG_VERSION_VARIABLE=y
 CONFIG_SPL=y
diff --git a/configs/cm_t3517_defconfig b/configs/cm_t3517_defconfig
index ba7d813..4df40d6 100644
--- a/configs/cm_t3517_defconfig
+++ b/configs/cm_t3517_defconfig
@@ -3,6 +3,7 @@
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SYS_TEXT_BASE=0x80008000
 CONFIG_TARGET_CM_T3517=y
+CONFIG_EMIF4=y
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
diff --git a/configs/eco5pk_defconfig b/configs/eco5pk_defconfig
index ed32930..2bf48e0 100644
--- a/configs/eco5pk_defconfig
+++ b/configs/eco5pk_defconfig
@@ -3,6 +3,7 @@
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SYS_TEXT_BASE=0x80008000
 CONFIG_TARGET_ECO5PK=y
+CONFIG_EMIF4=y
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
 # CONFIG_SPL_EXT_SUPPORT is not set
diff --git a/configs/mcx_defconfig b/configs/mcx_defconfig
index c36cef8..972cb63 100644
--- a/configs/mcx_defconfig
+++ b/configs/mcx_defconfig
@@ -4,6 +4,7 @@
 CONFIG_SYS_TEXT_BASE=0x80008000
 # CONFIG_SPL_GPIO_SUPPORT is not set
 CONFIG_TARGET_MCX=y
+CONFIG_EMIF4=y
 CONFIG_VIDEO=y
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
diff --git a/configs/mt_ventoux_defconfig b/configs/mt_ventoux_defconfig
index 09580e7..316e4f0 100644
--- a/configs/mt_ventoux_defconfig
+++ b/configs/mt_ventoux_defconfig
@@ -3,6 +3,7 @@
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SYS_TEXT_BASE=0x80008000
 CONFIG_TARGET_MT_VENTOUX=y
+CONFIG_EMIF4=y
 CONFIG_VIDEO=y
 CONFIG_BOOTDELAY=10
 # CONFIG_CONSOLE_MUX is not set
diff --git a/configs/twister_defconfig b/configs/twister_defconfig
index 7bbf781..53edadb 100644
--- a/configs/twister_defconfig
+++ b/configs/twister_defconfig
@@ -3,6 +3,7 @@
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SYS_TEXT_BASE=0x80008000
 CONFIG_TARGET_TWISTER=y
+CONFIG_EMIF4=y
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
 # CONFIG_SPL_EXT_SUPPORT is not set
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index c5fe3dc..db75fe5 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -16,7 +16,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_EMIF4	/* The chip has EMIF4 controller */
 
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap.h>
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index b13381d..708a98f 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -14,7 +14,6 @@
 #define __CONFIG_H
 
 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
-#define CONFIG_EMIF4	/* The chip has EMIF4 controller */
 
 /*
  * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 30e20b8..6e7dcc6 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -24,8 +24,6 @@
  */
 #define CONFIG_CM_T3X	/* working with CM-T35 and CM-T3730 */
 
-#define CONFIG_SDRC	/* The chip has SDRC controller */
-
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap.h>
 
diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h
index c166bf7..b44777f 100644
--- a/include/configs/cm_t3517.h
+++ b/include/configs/cm_t3517.h
@@ -23,8 +23,6 @@
  * to be on the safe side once the default is changed.
  */
 
-#define CONFIG_EMIF4	/* The chip has EMIF4 controller */
-
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap.h>
 
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index fb35f97..2a77430 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -15,8 +15,6 @@
 
 #define CONFIG_MACH_TYPE	MACH_TYPE_MCX
 
-#define CONFIG_EMIF4	/* The chip has EMIF4 controller */
-
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap.h>
 
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index 8e1effa..20b8c34 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -33,8 +33,6 @@
  */
 #define CONFIG_SYS_TEXT_BASE	0x80008000
 
-#define CONFIG_SDRC			/* The chip has SDRC controller */
-
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap.h>
 #include <asm/arch/mem.h>
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index 5997902..5809942 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -39,7 +39,6 @@
  * DRAM
  */
 
-#define CONFIG_SDRC
 #define CONFIG_NR_DRAM_BANKS	2
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 2363912..ba8483f 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -16,8 +16,6 @@
 
 #define CONFIG_SYS_TEXT_BASE 0x80008000
 
-#define CONFIG_EMIF4	/* The chip has EMIF4 controller */
-
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap.h>
 
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index 7f4acba..b4311d9 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -17,8 +17,6 @@
  * High Level Configuration Options
  */
 
-#define CONFIG_SDRC			/* Has an SDRC controller */
-
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap.h>
 
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index 938136c..531bffc 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -21,9 +21,6 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/omap.h>
 
-/* The chip has SDRC controller */
-#define CONFIG_SDRC
-
 /* Clock Defines */
 #define V_OSCK			26000000	/* Clock output from T2 */
 #define V_SCLK			(V_OSCK >> 1)
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 46bb6f4..33071ef 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -25,8 +25,6 @@
  */
 #define CONFIG_SYS_TEXT_BASE		0x80100000
 
-#define CONFIG_SDRC			/* The chip has SDRC controller */
-
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap.h>
 
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 0368f2c..56bb639 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -562,7 +562,6 @@
 CONFIG_EHCI_MXS_PORT0
 CONFIG_EHCI_MXS_PORT1
 CONFIG_ELBC_NAND_SPL_STATIC_PGSIZE
-CONFIG_EMIF4
 CONFIG_EMMC_BOOT
 CONFIG_EMU
 CONFIG_ENABLE_36BIT_PHYS
@@ -1973,7 +1972,6 @@
 CONFIG_SC_TIMER_CLK
 CONFIG_SDCARD
 CONFIG_SDRAM_OFFSET_FOR_RT
-CONFIG_SDRC
 CONFIG_SD_BOOT_QSPI
 CONFIG_SECBOOT
 CONFIG_SECURE_BL1_ONLY