aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2012-01-19 10:08:32 -0700
committerJohn Rigby <john.rigby@linaro.org>2012-05-02 19:44:09 -0600
commita637d7b462eeeef37657ec2247309f9be53dc13a (patch)
treed801d04bab25205f8a599a9281d4268e8b4fdddd
parent2101cba1e7fa26fd89fe3ad01c0ec8cea8ccf444 (diff)
downloadu-boot-linaro-stable-a637d7b462eeeef37657ec2247309f9be53dc13a.tar.gz
HACK: Bypass normal mmc if CONFIG_SNOWBALL_MMC_HACK
Signed-off-by: John Rigby <john.rigby@linaro.org>
-rw-r--r--board/st-ericsson/snowball/mmc_host.c1
-rw-r--r--common/cmd_mmc.c3
-rw-r--r--drivers/mmc/Makefile2
-rw-r--r--drivers/mmc/mmc.c2
-rw-r--r--include/configs/snowball.h1
-rw-r--r--include/mmc.h4
6 files changed, 11 insertions, 2 deletions
diff --git a/board/st-ericsson/snowball/mmc_host.c b/board/st-ericsson/snowball/mmc_host.c
index 4e5c0e39a..5c0b65937 100644
--- a/board/st-ericsson/snowball/mmc_host.c
+++ b/board/st-ericsson/snowball/mmc_host.c
@@ -23,7 +23,6 @@
#include <div64.h>
#include "mmc_fifo.h"
-
struct mmc_host {
struct sdi_registers *base;
};
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 750509da5..6820c5653 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -22,9 +22,11 @@
*/
#include <common.h>
+#include <config.h>
#include <command.h>
#include <mmc.h>
+#ifndef CONFIG_SNOWBALL_MMC_HACK
static int curr_device = -1;
#ifndef CONFIG_GENERIC_MMC
int do_mmc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -321,3 +323,4 @@ U_BOOT_CMD(
"mmc dev [dev] [part] - show or set current mmc device [partition]\n"
"mmc list - lists available devices");
#endif
+#endif /* !CONFIG_SNOWBALL_MMC_HACK */
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index e021cdb48..6a316384a 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -30,7 +30,7 @@ COBJS-$(CONFIG_DAVINCI_MMC) += davinci_mmc.o
COBJS-$(CONFIG_FSL_ESDHC) += fsl_esdhc.o
COBJS-$(CONFIG_FTSDC010) += ftsdc010_esdhc.o
COBJS-$(CONFIG_GENERIC_MMC) += mmc.o
-COBJS-$(CONFIG_GENERIC_STE_MMC) += mmc_ste.o
+COBJS-$(CONFIG_SNOWBALL_MMC_HACK) += mmc_ste.o
COBJS-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o
COBJS-$(CONFIG_MMC_SPI) += mmc_spi.o
COBJS-$(CONFIG_ARM_PL180_MMCI) += arm_pl180_mmci.o
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 596732e80..3fd0cde10 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -32,6 +32,7 @@
#include <linux/list.h>
#include <div64.h>
+#ifndef CONFIG_SNOWBALL_MMC_HACK
/* Set block count limit because of 16 bit register limit on some hardware*/
#ifndef CONFIG_SYS_MMC_MAX_BLK_COUNT
#define CONFIG_SYS_MMC_MAX_BLK_COUNT 65535
@@ -1408,3 +1409,4 @@ int mmc_initialize(bd_t *bis)
return 0;
}
+#endif /* CONFIG_SNOWBALL_MMC_HACK */
diff --git a/include/configs/snowball.h b/include/configs/snowball.h
index aa0a69ec6..f71b8831d 100644
--- a/include/configs/snowball.h
+++ b/include/configs/snowball.h
@@ -99,6 +99,7 @@
*/
#define CONFIG_MMC
#define CONFIG_GENERIC_MMC
+#define CONFIG_SNOWBALL_MMC_HACK
#define CONFIG_DOS_PARTITION
/*
diff --git a/include/mmc.h b/include/mmc.h
index f52df70ad..c523d6c49 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -23,6 +23,9 @@
* MA 02111-1307 USA
*/
+#ifdef CONFIG_SNOWBALL_MMC_HACK
+#include <mmc_ste.h>
+#else /* CONFIG_SNOWBALL_MMC_HACK */
#ifndef _MMC_H_
#define _MMC_H_
@@ -329,3 +332,4 @@ int mmc_legacy_init(int verbose);
#endif
#endif /* _MMC_H_ */
+#endif /* CONFIG_SNOWBALL_MMC_HACK */