diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2017-11-30 17:43:54 +0100 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2018-01-12 18:11:04 +0900 |
commit | 52d241dfba7c3903a3a7d97fe6cb815c9ed379d6 (patch) | |
tree | 7d7154d958ac7bf164a8b9dd28ece7032c375c7e /drivers/mmc/mmc.c | |
parent | ef1614acf8f39637c798125deea06aaa83b5f986 (diff) |
mmc: dump card and host capabilities if debug is enabled
This is a useful information while debugging the initialization process or
performance issues.
Also dump this information with the other mmc info if the verbose option
is selected
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r-- | drivers/mmc/mmc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index ab2483e9db..9b5c982578 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1582,6 +1582,10 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps) bool uhs_en = (mmc->ocr & OCR_S18R) ? true : false; uint caps; +#ifdef DEBUG + mmc_dump_capabilities("sd card", card_caps); + mmc_dump_capabilities("host", mmc->host_caps | MMC_MODE_1BIT); +#endif /* Restrict card's capabilities by what the host can do */ caps = card_caps & (mmc->host_caps | MMC_MODE_1BIT); @@ -1764,6 +1768,11 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps) const struct mode_width_tuning *mwt; const struct ext_csd_bus_width *ecbw; +#ifdef DEBUG + mmc_dump_capabilities("mmc", card_caps); + mmc_dump_capabilities("host", mmc->host_caps | MMC_MODE_1BIT); +#endif + /* Restrict card's capabilities by what the host can do */ card_caps &= (mmc->host_caps | MMC_MODE_1BIT); |