]> git.sur5r.net Git - u-boot/commitdiff
fsl_esdhc: Fix esdhc disabled problem on some platforms
authorChenhui Zhao <b26998@freescale.com>
Tue, 4 Jan 2011 09:23:05 +0000 (17:23 +0800)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 14 Jan 2011 07:32:19 +0000 (01:32 -0600)
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>
drivers/mmc/fsl_esdhc.c
include/configs/MPC837XEMDS.h
include/configs/MPC837XERDB.h
include/configs/MPC8569MDS.h

index 40b136c17643cfce70a1740b23d06dc3aa936906..cef2859ec66498e2e666641efff8ca69dac435af 100644 (file)
@@ -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
index c237991adc55b666959d13f7b4b0c099eb8ffc7f..abccfd6439e1196d032213696d674a19269a2def 100644 (file)
@@ -509,6 +509,7 @@ extern int board_pci_host_broken(void);
 
 #ifdef CONFIG_MMC
 #define CONFIG_FSL_ESDHC
+#define CONFIG_FSL_ESDHC_PIN_MUX
 #define CONFIG_SYS_FSL_ESDHC_ADDR      CONFIG_SYS_MPC83xx_ESDHC_ADDR
 #define CONFIG_CMD_MMC
 #define CONFIG_GENERIC_MMC
index 385c7c321b06af129fd567edad3b8a65c52be1a3..ea3056b93f75cab016eb726e810218ff3c67a1bb 100644 (file)
 
 #ifdef CONFIG_MMC
 #define CONFIG_FSL_ESDHC
+#define CONFIG_FSL_ESDHC_PIN_MUX
 #define CONFIG_SYS_FSL_ESDHC_ADDR      CONFIG_SYS_MPC83xx_ESDHC_ADDR
 #define CONFIG_CMD_MMC
 #define CONFIG_GENERIC_MMC
index 2395cb222ad0123ff9f9306f55d4a29b2b77b9a1..177d5d5362c67d76016988055e529abc9f767acc 100644 (file)
@@ -554,6 +554,7 @@ extern unsigned long get_clock_freq(void);
 
 #ifdef CONFIG_MMC
 #define CONFIG_FSL_ESDHC
+#define CONFIG_FSL_ESDHC_PIN_MUX
 #define CONFIG_SYS_FSL_ESDHC_ADDR      CONFIG_SYS_MPC85xx_ESDHC_ADDR
 #define CONFIG_CMD_MMC
 #define CONFIG_GENERIC_MMC