mmc: sdio: print correct UHS mode during card detection
authorSubhash Jadavani <subhashj@codeaurora.org>
Tue, 4 Dec 2012 11:36:20 +0000 (17:06 +0530)
committerChris Ball <cjb@laptop.org>
Mon, 28 Jan 2013 11:51:31 +0000 (06:51 -0500)
When SDIO3.0 card is detected, incorrect bus speed mode
is printed as part of card detection print in kernel logs.

This change fixes it so that user won't be confused by
looking at incorrect card detection message in logs.

Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Tested-by: Jackey Shen <Jackey.Shen@amd.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/sdio.c

index 9565d38d91a440233f76312f65750c127239cdca..3a64933466b85afdbdb0bf50b2e4cbc139f6c8ad 100644 (file)
@@ -485,23 +485,27 @@ static int sdio_set_bus_speed_mode(struct mmc_card *card)
                        bus_speed = SDIO_SPEED_SDR104;
                        timing = MMC_TIMING_UHS_SDR104;
                        card->sw_caps.uhs_max_dtr = UHS_SDR104_MAX_DTR;
+                       card->sd_bus_speed = UHS_SDR104_BUS_SPEED;
        } else if ((card->host->caps & MMC_CAP_UHS_DDR50) &&
                   (card->sw_caps.sd3_bus_mode & SD_MODE_UHS_DDR50)) {
                        bus_speed = SDIO_SPEED_DDR50;
                        timing = MMC_TIMING_UHS_DDR50;
                        card->sw_caps.uhs_max_dtr = UHS_DDR50_MAX_DTR;
+                       card->sd_bus_speed = UHS_DDR50_BUS_SPEED;
        } else if ((card->host->caps & (MMC_CAP_UHS_SDR104 |
                    MMC_CAP_UHS_SDR50)) && (card->sw_caps.sd3_bus_mode &
                    SD_MODE_UHS_SDR50)) {
                        bus_speed = SDIO_SPEED_SDR50;
                        timing = MMC_TIMING_UHS_SDR50;
                        card->sw_caps.uhs_max_dtr = UHS_SDR50_MAX_DTR;
+                       card->sd_bus_speed = UHS_SDR50_BUS_SPEED;
        } else if ((card->host->caps & (MMC_CAP_UHS_SDR104 |
                    MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR25)) &&
                   (card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR25)) {
                        bus_speed = SDIO_SPEED_SDR25;
                        timing = MMC_TIMING_UHS_SDR25;
                        card->sw_caps.uhs_max_dtr = UHS_SDR25_MAX_DTR;
+                       card->sd_bus_speed = UHS_SDR25_BUS_SPEED;
        } else if ((card->host->caps & (MMC_CAP_UHS_SDR104 |
                    MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR25 |
                    MMC_CAP_UHS_SDR12)) && (card->sw_caps.sd3_bus_mode &
@@ -509,6 +513,7 @@ static int sdio_set_bus_speed_mode(struct mmc_card *card)
                        bus_speed = SDIO_SPEED_SDR12;
                        timing = MMC_TIMING_UHS_SDR12;
                        card->sw_caps.uhs_max_dtr = UHS_SDR12_MAX_DTR;
+                       card->sd_bus_speed = UHS_SDR12_BUS_SPEED;
        }
 
        err = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_SPEED, 0, &speed);