From patchwork Thu Oct 15 20:04:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 530882 X-Patchwork-Delegate: hdegoede@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 7482F1402D5 for ; Fri, 16 Oct 2015 07:04:51 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4DEE94B693; Thu, 15 Oct 2015 22:04:39 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id onYRXR33_HGz; Thu, 15 Oct 2015 22:04:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CF5294B6A1; Thu, 15 Oct 2015 22:04:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9A2F94B62C for ; Thu, 15 Oct 2015 22:04:32 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BO5wunFlcRZn for ; Thu, 15 Oct 2015 22:04:32 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by theia.denx.de (Postfix) with ESMTP id 203734B667 for ; Thu, 15 Oct 2015 22:04:26 +0200 (CEST) Received: by mail.free-electrons.com (Postfix, from userid 110) id 6FC4D30E; Thu, 15 Oct 2015 22:04:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (227.200.97.84.rev.sfr.net [84.97.200.227]) by mail.free-electrons.com (Postfix) with ESMTPSA id 2539A3182; Thu, 15 Oct 2015 22:04:25 +0200 (CEST) From: Maxime Ripard To: Hans de Goede , Ian Campbell , Marek Vasut , Pantelis Antoniou Date: Thu, 15 Oct 2015 22:04:07 +0200 Message-Id: <1444939450-26812-5-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.5.3 In-Reply-To: <1444939450-26812-1-git-send-email-maxime.ripard@free-electrons.com> References: <1444939450-26812-1-git-send-email-maxime.ripard@free-electrons.com> Cc: Tom Rini , u-boot@lists.denx.de, Alexander Kaplan Subject: [U-Boot] [PATCH v2 4/7] sunxi: Use Kconfig CONFIG_MMC X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Not all sunxi boards have an MMC embedded. Switching to the Kconfig option will allow to enable or disable the support in each boards' defconfig. Signed-off-by: Maxime Ripard --- 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 b3367779af9b..f6f2a605eca3 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 d3d7d911e484..ceae7bcaec6a 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 879d0f42385f..dd314468be45 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -140,8 +140,7 @@ #endif /* mmc config */ -#if !defined(CONFIG_UART0_PORT_F) -#define CONFIG_MMC +#if defined(CONFIG_MMC) #define CONFIG_GENERIC_MMC #define CONFIG_CMD_MMC #define CONFIG_MMC_SUNXI @@ -197,7 +196,7 @@ #define CONFIG_SPL_LIBDISK_SUPPORT -#if !defined(CONFIG_UART0_PORT_F) +#if defined(CONFIG_MMC) #define CONFIG_SPL_MMC_SUPPORT #endif @@ -354,9 +353,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