aboutsummaryrefslogtreecommitdiff
path: root/board/st-ericsson/u8500/u8500_href.c
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2012-07-31 08:59:31 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-08-14 02:22:09 +0200
commite786f55420353fa499461adea650ef77b2531919 (patch)
treeef70cd26dc41e6982956700693a3f38a61369eb1 /board/st-ericsson/u8500/u8500_href.c
parent65eb5ef3ea1bc2e9da7b27fcab380691732e805a (diff)
downloadu-boot-linaro-stable-e786f55420353fa499461adea650ef77b2531919.tar.gz
u8500: Separating mmc config parameters from driver
Configuration in vexpress and u8500.v1 is different from what is needed in u8500.v2. As such, card configuration specifics need to reside in the board file rather than the driver. Signed-off-by: John Rigby <john.rigby@linaro.org> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'board/st-ericsson/u8500/u8500_href.c')
-rw-r--r--board/st-ericsson/u8500/u8500_href.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/board/st-ericsson/u8500/u8500_href.c b/board/st-ericsson/u8500/u8500_href.c
index e75f8b435..f06120c62 100644
--- a/board/st-ericsson/u8500/u8500_href.c
+++ b/board/st-ericsson/u8500/u8500_href.c
@@ -18,6 +18,7 @@
#include <config.h>
#include <common.h>
+#include <malloc.h>
#include <i2c.h>
#include <asm/types.h>
#include <asm/io.h>
@@ -375,12 +376,27 @@ static int u8500_mmci_board_init(void)
int board_mmc_init(bd_t *bd)
{
+ struct pl180_mmc_host *host;
+
if (u8500_mmci_board_init())
return -ENODEV;
- if (arm_pl180_mmci_init())
- return -ENODEV;
- return 0;
+ host = malloc(sizeof(struct pl180_mmc_host));
+ if (!host)
+ return -ENOMEM;
+ memset(host, 0, sizeof(*host));
+
+ strcpy(host->name, "MMC");
+ host->base = (struct sdi_registers *)CONFIG_ARM_PL180_MMCI_BASE;
+ host->pwr_init = INIT_PWR;
+ host->clkdiv_init = SDI_CLKCR_CLKDIV_INIT_V1 | SDI_CLKCR_CLKEN;
+ host->voltages = VOLTAGE_WINDOW_MMC;
+ host->caps = 0;
+ host->clock_in = ARM_MCLK;
+ host->clock_min = ARM_MCLK / (2 * (SDI_CLKCR_CLKDIV_INIT_V1 + 1));
+ host->clock_max = CONFIG_ARM_PL180_MMCI_CLOCK_FREQ;
+
+ return arm_pl180_mmci_init(host);
}
#endif