ipq40xx: mmc: Added check for status of sdhci node

Currently, we search for "sdhci" node and continue with
mmc_init if it is present. We never check for status of
the sdhci node. As sdhci node is present in all the
board variants, mmc_init happens in all boards.

So, added a check to see if the status of sdhci node is
"okay" and continue with initialization, else return.

fdtdec_get_is_enabled library function checks only for
string "okay" which is the correct usage for status
variable. So, changed the status string in the
dts files accordingly.

Change-Id: I26ac5d9930b9e91e3d9d2436eff0cf02b8977b2e
Signed-off-by: Balaji Jagadeesan <bjagadee@codeaurora.org>
This commit is contained in:
Balaji Jagadeesan 2018-07-05 10:36:52 +05:30
parent 74e17d6a35
commit 9e96ab7e28
3 changed files with 4 additions and 4 deletions

View file

@ -40,7 +40,7 @@
};
sdhci@7824000 {
status = "ok";
status = "okay";
};
serial@78b0000 {
status = "ok";

View file

@ -19,7 +19,7 @@
config_name = "config@ap.dk04.1-c3";
sdhci@7824000 {
status = "ok";
status = "okay";
};
};

View file

@ -274,8 +274,8 @@ int board_mmc_init(bd_t *bis)
qca_smem_flash_info_t *sfi = &qca_smem_flash_info;
node = fdt_path_offset(gd->fdt_blob, "/sdhci");
if (node < 0) {
printf("Could not find mmc-flash in device tree\n");
if (!fdtdec_get_is_enabled(gd->fdt_blob, node)) {
printf("sdhci: disabled, skipping initialization\n");
return -1;
}