summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharles.park <charles.park@hardkernel.com>2017-08-07 07:37:44 +0300
committercharles.park <charles.park@hardkernel.com>2017-08-07 07:37:44 +0300
commit20f11ed2778fc856716bbc7767bc77549bdce96d (patch)
tree4bc3587bb944ba2cf8fd4ed5921aa40d8f11c6a1
parentddaa85859cc92554c53f1ce64d9d79d00343cc5f (diff)
downloadu-boot-20f11ed2778fc856716bbc7767bc77549bdce96d.tar.xz
ODROID-XU4 : eMMC rst_n_function status display.
Change-Id: I6ab9379c71caecf833bfb8591bfe8d3be8fd3d85
-rwxr-xr-xdrivers/mmc/mmc.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 6311c32667..ffe9eb39ae 100755
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -531,10 +531,6 @@ int mmc_rst_n_func_status(struct mmc *mmc)
puts("Could not get ext_csd register values\n");
return err;
}
-
- printf("%s : %d\n", __func__, ext_csd[EXT_CSD_RST_N_FUNCTION]);
- printf("%s : EXT_CSD_RST_N_FUNCTION enable!\n", __func__);
-
return ext_csd[EXT_CSD_RST_N_FUNCTION];
}
#else
@@ -1890,11 +1886,20 @@ int mmc_initialize(bd_t *bis)
return err;
printf("MMC Device %d (%s): ", dev, IS_SD(mmc) ? " SD " : "eMMC");
print_size(mmc->capacity, "\n");
-
- /* enable EXT_CSD_RST_N_FUNCTION command for hardware reset */
- if (!IS_SD(mmc))
- mmc_set_rst_n_function(mmc, 1);
+ if (!IS_SD(mmc)) {
+ /* status read */
+ err = mmc_rst_n_func_status(mmc);
+ printf("Info eMMC rst_n_func status = %s\n",
+ err ? "enabled" : "disabled");
+ /*
+ if h/w rst function disabled
+ send EXT_CSD_RST_N_FUNCTION command for hardware reset
+ */
+ if (!err)
+ mmc_set_rst_n_function(mmc, 1);
+ }
}
+ printf("\n");
#endif
mmc_do_preinit();
return 0;