From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Sun, 12 Oct 2014 10:58:44 +0200 Subject: [U-Boot] [PATCH 1/9] ARM: sunxi: Fix build break when CONFIG_MMC is not defined In-Reply-To: <1413042621.11505.36.camel@hellion.org.uk> References: <1412665917-29731-1-git-send-email-wens@csie.org> <1412665917-29731-2-git-send-email-wens@csie.org> <1413042621.11505.36.camel@hellion.org.uk> Message-ID: <543A42C4.5090300@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 10/11/2014 05:50 PM, Ian Campbell wrote: > On Tue, 2014-10-07 at 15:11 +0800, Chen-Yu Tsai wrote: >> 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 > > Hans, this made me think back to your " Enable second sdcard slot found > on some boards" series -- do you not want to add mmc1 as a boot target > device when MMC_SUNXI_SLOT_EXTRA is enabled? An interesting question. u-boot itself is always running of mmc 0, or loaded through FEL, but that does not mean that e.g. extlinux.conf + the kernel and dts could not be on mmc 1. So yes I guess we do want to add mmc 1 as boot target. First lets get Chen's patches + my existing second mmc slot set merged into u-boot-sunxi next, and then I'll do a patch on top of that. Regards, Hans > >> --- >> 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) \ > >