mmc: core: Fix print option of UHS mode of SDIO
rrajk [Thu, 25 Oct 2012 08:33:34 +0000 (13:33 +0530)]
Print correct UHS mode of SDIO card being used.
Bug 1162770

Change-Id: Ice721ea54fbbd57b4dc97961692bae7656b3aa59
Signed-off-by: rrajk <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/147485
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>

drivers/mmc/core/sdio.c

index 333025d..451b2a4 100644 (file)
@@ -488,23 +488,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 &
@@ -512,6 +516,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);