sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a proper Kconfig option
authorHans de Goede <hdegoede@redhat.com>
Thu, 2 Oct 2014 18:43:50 +0000 (20:43 +0200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 24 Oct 2014 07:35:38 +0000 (09:35 +0200)
Note we also drop the SPL check for initializing the 2nd mmc slot, the SPL
check is not necessary with Kconfig, because only options explicitly marked
as also being for the SPL get set during SPL builds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
board/sunxi/Kconfig
board/sunxi/board.c

index 63188dd..552fce8 100644 (file)
@@ -67,4 +67,12 @@ config MMC3_CD_PIN
        ---help---
        See MMC0_CD_PIN help text.
 
+config MMC_SUNXI_SLOT_EXTRA
+       int "mmc extra slot number"
+       default -1
+       ---help---
+       sunxi builds always enable mmc0, some boards also have a second sdcard
+       slot or emmc on mmc1 - mmc3. Setting this to 1, 2 or 3 will enable
+       support for this.
+
 endif
index 2179e23..cfe22b6 100644 (file)
@@ -106,7 +106,7 @@ int board_mmc_init(bd_t *bis)
 {
        mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT);
        sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT);
-#if !defined (CONFIG_SPL_BUILD) && defined (CONFIG_MMC_SUNXI_SLOT_EXTRA)
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
        mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT_EXTRA);
        sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT_EXTRA);
 #endif