summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChenhui Zhao <b26998@freescale.com>2011-01-04 17:23:05 +0800
committerKumar Gala <galak@kernel.crashing.org>2011-01-14 01:32:19 -0600
commita6da8b8195f47a70106f743948f2729d94157b32 (patch)
treec02ba2d813964d558c9a4bc9b6bde4a2e56cd7d8 /drivers
parentafabe4b94e35af74f3dfc13d833bf47d367c2051 (diff)
downloadu-boot-imx-a6da8b8195f47a70106f743948f2729d94157b32.zip
u-boot-imx-a6da8b8195f47a70106f743948f2729d94157b32.tar.gz
u-boot-imx-a6da8b8195f47a70106f743948f2729d94157b32.tar.bz2
fsl_esdhc: Fix esdhc disabled problem on some platforms
Some new platform's esdhc pins don't share with other function. The eSDHC shouldn't be disabled, even if "esdhc" isn't defined in hwconfig env variable. Use CONFIG_FSL_ESDHC_PIN_MUX to fix this problem. Signed-off-by: Chenhui Zhao <b26998@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/fsl_esdhc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 40b136c..cef2859 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -508,17 +508,19 @@ int fsl_esdhc_mmc_init(bd_t *bis)
void fdt_fixup_esdhc(void *blob, bd_t *bd)
{
const char *compat = "fsl,esdhc";
- const char *status = "okay";
+#ifdef CONFIG_FSL_ESDHC_PIN_MUX
if (!hwconfig("esdhc")) {
- status = "disabled";
- goto out;
+ do_fixup_by_compat(blob, compat, "status", "disabled",
+ 8 + 1, 1);
+ return;
}
+#endif
do_fixup_by_compat_u32(blob, compat, "clock-frequency",
gd->sdhc_clk, 1);
-out:
- do_fixup_by_compat(blob, compat, "status", status,
- strlen(status) + 1, 1);
+
+ do_fixup_by_compat(blob, compat, "status", "okay",
+ 4 + 1, 1);
}
#endif