From patchwork Tue Oct 7 07:11:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 397129 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 2DD271400B5 for ; Tue, 7 Oct 2014 18:12:39 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1C49AA7422; Tue, 7 Oct 2014 09:12:26 +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 zg-v+ELxq3Je; Tue, 7 Oct 2014 09:12:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F130EA740D; Tue, 7 Oct 2014 09:12:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A35484B62F for ; Tue, 7 Oct 2014 09:12:09 +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 mvPQMzJR+JG4 for ; Tue, 7 Oct 2014 09:12:09 +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 smtp.csie.ntu.edu.tw (smtp.csie.ntu.edu.tw [140.112.30.61]) by theia.denx.de (Postfix) with ESMTP id 375644B631 for ; Tue, 7 Oct 2014 09:12:08 +0200 (CEST) Received: from mirror2.csie.ntu.edu.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (Authenticated sender: b93043) by smtp.csie.ntu.edu.tw (Postfix) with ESMTPSA id 388B62056F; Tue, 7 Oct 2014 15:12:02 +0800 (CST) Received: by mirror2.csie.ntu.edu.tw (Postfix, from userid 1000) id 166775F82C; Tue, 7 Oct 2014 15:12:02 +0800 (CST) From: Chen-Yu Tsai To: u-boot@lists.denx.de, Ian Campbell , Hans de Goede Date: Tue, 7 Oct 2014 15:11:49 +0800 Message-Id: <1412665917-29731-2-git-send-email-wens@csie.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1412665917-29731-1-git-send-email-wens@csie.org> References: <1412665917-29731-1-git-send-email-wens@csie.org> Cc: linux-sunxi@googlegroups.com Subject: [U-Boot] [PATCH 1/9] ARM: sunxi: Fix build break when CONFIG_MMC is not defined X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de BOOT_TARGET_DEVICES includes MMC unconditionally. This breaks when CONFIG_CMD_MMC is not defined. Use a secondary macro to conditionally include it when CONFIG_MMC is enabled, as we do for CONFIG_AHCI. This is used when we want to use uart0 from port F, which conflicts with mmc0. Signed-off-by: Chen-Yu Tsai Acked-by: Ian Campbell --- include/configs/sunxi-common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index a31656e..7571e0e 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -227,6 +227,12 @@ "pxefile_addr_r=0x43200000\0" \ "ramdisk_addr_r=0x43300000\0" +#ifdef CONFIG_MMC +#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) +#else +#define BOOT_TARGET_DEVICES_MMC(func) +#endif + #ifdef CONFIG_AHCI #define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) #else @@ -240,7 +246,7 @@ #endif #define BOOT_TARGET_DEVICES(func) \ - func(MMC, mmc, 0) \ + BOOT_TARGET_DEVICES_MMC(func) \ BOOT_TARGET_DEVICES_SCSI(func) \ BOOT_TARGET_DEVICES_USB(func) \ func(PXE, pxe, na) \