aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPhilip Rakity <prakity@marvell.com>2012-01-26 09:57:10 -0500
committerChris Ball <cjb@laptop.org>2012-02-13 20:38:28 -0500
commit2d0d68f583279dbdcc1a2ef3f81ea8d285a0adbe (patch)
treed99691e952df66e43250670df70372e308ffebed /drivers
parentba8c4dc99808b1de809a0eda71a32f26efdafd92 (diff)
mmc: core: UHS sdio card that fails should not exceed 50MHz
A UHS sdio card that fails initialization at 1.8v signaling is not in UHS mode. We cannot use the speed in the the cis to reflect the bus speed as this is the maxiumum value and will not reflect the fact that the host is operating at a lower (non uhs) bus speed. Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Reviewed-by: Aaron Lu <aaron.lu@amd.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/core/sdio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index bd7bacc950dc..12cde6ee17f5 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -98,10 +98,11 @@ fail:
98 return ret; 98 return ret;
99} 99}
100 100
101static int sdio_read_cccr(struct mmc_card *card) 101static int sdio_read_cccr(struct mmc_card *card, u32 ocr)
102{ 102{
103 int ret; 103 int ret;
104 int cccr_vsn; 104 int cccr_vsn;
105 int uhs = ocr & R4_18V_PRESENT;
105 unsigned char data; 106 unsigned char data;
106 unsigned char speed; 107 unsigned char speed;
107 108
@@ -149,7 +150,7 @@ static int sdio_read_cccr(struct mmc_card *card)
149 card->scr.sda_spec3 = 0; 150 card->scr.sda_spec3 = 0;
150 card->sw_caps.sd3_bus_mode = 0; 151 card->sw_caps.sd3_bus_mode = 0;
151 card->sw_caps.sd3_drv_type = 0; 152 card->sw_caps.sd3_drv_type = 0;
152 if (cccr_vsn >= SDIO_CCCR_REV_3_00) { 153 if (cccr_vsn >= SDIO_CCCR_REV_3_00 && uhs) {
153 card->scr.sda_spec3 = 1; 154 card->scr.sda_spec3 = 1;
154 ret = mmc_io_rw_direct(card, 0, 0, 155 ret = mmc_io_rw_direct(card, 0, 0,
155 SDIO_CCCR_UHS, 0, &data); 156 SDIO_CCCR_UHS, 0, &data);
@@ -712,7 +713,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
712 /* 713 /*
713 * Read the common registers. 714 * Read the common registers.
714 */ 715 */
715 err = sdio_read_cccr(card); 716 err = sdio_read_cccr(card, ocr);
716 if (err) 717 if (err)
717 goto remove; 718 goto remove;
718 719