From 0748a95f88c56b2f5c14cc75b9aac5be6550c24f Mon Sep 17 00:00:00 2001 From: Kees Jongenburger Date: Fri, 24 May 2013 15:39:41 +0200 Subject: [PATCH] arm:mmc only compile mmchs when targeting arm. Change-Id: Ie8d0b6461b58c2a7becda98401dece81be607a01 --- drivers/mmc/Makefile | 8 +++++++- drivers/mmc/mmcblk.c | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile index 2e8f9df89..efca6b02e 100644 --- a/drivers/mmc/Makefile +++ b/drivers/mmc/Makefile @@ -1,6 +1,12 @@ # Makefile for the mmc driver. PROG= mmc -SRCS= mmcblk.c mmchost_mmchs.c mmchost_dummy.c mmclog.h sdhcreg.h sdmmcreg.h +SRCS= mmcblk.c mmchost_dummy.c mmclog.h sdhcreg.h sdmmcreg.h + + +.if ${MACHINE_ARCH} == "earm" +SRCS += mmchost_mmchs.c +.endif + DPADD+= ${LIBBLOCKDRIVER} ${LIBSYS} LDADD+= -lblockdriver -lsys diff --git a/drivers/mmc/mmcblk.c b/drivers/mmc/mmcblk.c index e2ed76b9c..4720a9826 100644 --- a/drivers/mmc/mmcblk.c +++ b/drivers/mmc/mmcblk.c @@ -112,7 +112,9 @@ apply_env() || strncmp(driver, "mmchs", strlen("mmchs") + 1) == 0) { /* early init of host mmc host controller. This code should * depend on knowing the hardware that is running bellow. */ +#ifdef __arm__ host_initialize_host_structure_mmchs(&host); +#endif } else if (strncmp(driver, "dummy", strlen("dummy") + 1) == 0) { host_initialize_host_structure_dummy(&host); } else { -- 2.44.0