uboot-tools/0005-sunxi-Use-Kconfig-CONFIG_MMC.patch
2015-11-17 12:11:40 +00:00

79 lines
2.0 KiB
Diff

From c8a8fe4701ba559f843a3af7ac7df44d967cdb0f Mon Sep 17 00:00:00 2001
From: no one <noone@example.com>
Date: Tue, 17 Nov 2015 11:58:14 +0000
Subject: [PATCH 1/2] sunxi: Use Kconfig CONFIG_MMC
---
board/sunxi/Kconfig | 4 ++++
drivers/mmc/Kconfig | 2 +-
include/configs/sunxi-common.h | 8 +++++---
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 55906b5..8a727d6 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -227,6 +227,10 @@ config OLD_SUNXI_KERNEL_COMPAT
Set this to enable various workarounds for old kernels, this results in
sub-optimal settings for newer kernels, only enable if needed.
+config MMC
+ depends on !UART0_PORT_F
+ default y if ARCH_SUNXI
+
config MMC0_CD_PIN
string "Card detect pin for mmc0"
default ""
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index d3d7d91..ceae7bc 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -2,7 +2,7 @@ menu "MMC Host controller Support"
config MMC
bool "Enable MMC support"
- depends on UNUSED
+ depends on ARCH_SUNXI
help
TODO: Move all architectures to use this option
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index e1ba791..607fda2 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -135,8 +135,7 @@
#endif
/* mmc config */
-#if !defined(CONFIG_UART0_PORT_F)
-#define CONFIG_MMC
+#ifdef CONFIG_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_CMD_MMC
#define CONFIG_MMC_SUNXI
@@ -192,7 +191,7 @@
#define CONFIG_SPL_LIBDISK_SUPPORT
-#if !defined(CONFIG_UART0_PORT_F)
+#ifdef CONFIG_MMC
#define CONFIG_SPL_MMC_SUPPORT
#endif
@@ -349,9 +348,12 @@ extern int soft_i2c_gpio_scl;
#define CONFIG_FASTBOOT_BUF_SIZE 0x2000000
#define CONFIG_FASTBOOT_FLASH
+
+#ifdef CONFIG_MMC
#define CONFIG_FASTBOOT_FLASH_MMC_DEV 0
#define CONFIG_EFI_PARTITION
#endif
+#endif
#ifdef CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_CMD_USB_MASS_STORAGE
--
2.5.0