summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>2012-09-27 10:28:29 +0000
committerTom Rini <trini@ti.com>2012-10-15 11:54:13 -0700
commit6be58005041f2093f41bcb669ac88278ff8ccb1f (patch)
tree82fa10d6afbfa383ae238835a1e241c93b52a3d6
parentf7542638c7ad3e2b98163f4b95a6d6f268c13a8b (diff)
downloadu-boot-imx-6be58005041f2093f41bcb669ac88278ff8ccb1f.zip
u-boot-imx-6be58005041f2093f41bcb669ac88278ff8ccb1f.tar.gz
u-boot-imx-6be58005041f2093f41bcb669ac88278ff8ccb1f.tar.bz2
mx25: Fix eSDHC support
The MMC driver appropriate for the i.MX25 is fsl_esdhc, which has nothing to do with mxcmmc. Also, each eSDHC instance has a dedicated clock, so gd->sdhc_clk must be set accordingly. This is good for the case only a single SDHC instance is used (initialization made with fsl_esdhc_mmc_init()). A future patch will fix the multi-instance use case (initialization made directly with fsl_esdhc_initialize()). Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Eric Bénard <eric@eukrea.com> Cc: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--arch/arm/cpu/arm926ejs/mx25/generic.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 7cfa66f..b991418 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -29,11 +29,10 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/imx25-pinmux.h>
#include <asm/arch/clock.h>
-#ifdef CONFIG_MXC_MMC
-#include <asm/arch/mxcmmc.h>
-#endif
#ifdef CONFIG_FSL_ESDHC
+#include <fsl_esdhc.h>
+
DECLARE_GLOBAL_DATA_PTR;
#endif
@@ -229,23 +228,25 @@ int cpu_eth_init(bd_t *bis)
int get_clocks(void)
{
#ifdef CONFIG_FSL_ESDHC
- gd->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
+#if CONFIG_SYS_FSL_ESDHC_ADDR == IMX_MMC_SDHC2_BASE
+ gd->sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
+#else
+ gd->sdhc_clk = mxc_get_clock(MXC_ESDHC1_CLK);
+#endif
#endif
return 0;
}
+#ifdef CONFIG_FSL_ESDHC
/*
* Initializes on-chip MMC controllers.
* to override, implement board_mmc_init()
*/
int cpu_mmc_init(bd_t *bis)
{
-#ifdef CONFIG_MXC_MMC
- return mxc_mmc_init(bis);
-#else
- return 0;
-#endif
+ return fsl_esdhc_mmc_init(bis);
}
+#endif
#ifdef CONFIG_MXC_UART
void mx25_uart1_init_pins(void)