Commit a6da8b8195f47a70106f743948f2729d94157b32
Committed by
Kumar Gala
1 parent
afabe4b94e
Exists in
master
and in
54 other branches
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>
Showing 4 changed files with 11 additions and 6 deletions Side-by-side Diff
drivers/mmc/fsl_esdhc.c
... | ... | @@ -508,18 +508,20 @@ |
508 | 508 | void fdt_fixup_esdhc(void *blob, bd_t *bd) |
509 | 509 | { |
510 | 510 | const char *compat = "fsl,esdhc"; |
511 | - const char *status = "okay"; | |
512 | 511 | |
512 | +#ifdef CONFIG_FSL_ESDHC_PIN_MUX | |
513 | 513 | if (!hwconfig("esdhc")) { |
514 | - status = "disabled"; | |
515 | - goto out; | |
514 | + do_fixup_by_compat(blob, compat, "status", "disabled", | |
515 | + 8 + 1, 1); | |
516 | + return; | |
516 | 517 | } |
518 | +#endif | |
517 | 519 | |
518 | 520 | do_fixup_by_compat_u32(blob, compat, "clock-frequency", |
519 | 521 | gd->sdhc_clk, 1); |
520 | -out: | |
521 | - do_fixup_by_compat(blob, compat, "status", status, | |
522 | - strlen(status) + 1, 1); | |
522 | + | |
523 | + do_fixup_by_compat(blob, compat, "status", "okay", | |
524 | + 4 + 1, 1); | |
523 | 525 | } |
524 | 526 | #endif |
include/configs/MPC837XEMDS.h
include/configs/MPC837XERDB.h
include/configs/MPC8569MDS.h