aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/bus.c')
-rw-r--r--drivers/mmc/core/bus.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 5d011a39dfff..3f606068d552 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -267,6 +267,15 @@ int mmc_add_card(struct mmc_card *card)
267{ 267{
268 int ret; 268 int ret;
269 const char *type; 269 const char *type;
270 const char *uhs_bus_speed_mode = "";
271 static const char *const uhs_speeds[] = {
272 [UHS_SDR12_BUS_SPEED] = "SDR12 ",
273 [UHS_SDR25_BUS_SPEED] = "SDR25 ",
274 [UHS_SDR50_BUS_SPEED] = "SDR50 ",
275 [UHS_SDR104_BUS_SPEED] = "SDR104 ",
276 [UHS_DDR50_BUS_SPEED] = "DDR50 ",
277 };
278
270 279
271 dev_set_name(&card->dev, "%s:%04x", mmc_hostname(card->host), card->rca); 280 dev_set_name(&card->dev, "%s:%04x", mmc_hostname(card->host), card->rca);
272 281
@@ -296,6 +305,10 @@ int mmc_add_card(struct mmc_card *card)
296 break; 305 break;
297 } 306 }
298 307
308 if (mmc_sd_card_uhs(card) &&
309 (card->sd_bus_speed < ARRAY_SIZE(uhs_speeds)))
310 uhs_bus_speed_mode = uhs_speeds[card->sd_bus_speed];
311
299 if (mmc_host_is_spi(card->host)) { 312 if (mmc_host_is_spi(card->host)) {
300 pr_info("%s: new %s%s%s card on SPI\n", 313 pr_info("%s: new %s%s%s card on SPI\n",
301 mmc_hostname(card->host), 314 mmc_hostname(card->host),
@@ -303,13 +316,13 @@ int mmc_add_card(struct mmc_card *card)
303 mmc_card_ddr_mode(card) ? "DDR " : "", 316 mmc_card_ddr_mode(card) ? "DDR " : "",
304 type); 317 type);
305 } else { 318 } else {
306 pr_info("%s: new %s%s%s%s card at address %04x\n", 319 pr_info("%s: new %s%s%s%s%s card at address %04x\n",
307 mmc_hostname(card->host), 320 mmc_hostname(card->host),
308 mmc_card_uhs(card) ? "ultra high speed " : 321 mmc_card_uhs(card) ? "ultra high speed " :
309 (mmc_card_highspeed(card) ? "high speed " : ""), 322 (mmc_card_highspeed(card) ? "high speed " : ""),
310 (mmc_card_hs200(card) ? "HS200 " : ""), 323 (mmc_card_hs200(card) ? "HS200 " : ""),
311 mmc_card_ddr_mode(card) ? "DDR " : "", 324 mmc_card_ddr_mode(card) ? "DDR " : "",
312 type, card->rca); 325 uhs_bus_speed_mode, type, card->rca);
313 } 326 }
314 327
315#ifdef CONFIG_DEBUG_FS 328#ifdef CONFIG_DEBUG_FS