提交 2d0d68f5 编写于 作者: P Philip Rakity 提交者: Chris Ball

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: NPhilip Rakity <prakity@marvell.com>
Signed-off-by: NBing Zhao <bzhao@marvell.com>
Reviewed-by: NAaron Lu <aaron.lu@amd.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 ba8c4dc9
......@@ -98,10 +98,11 @@ static int sdio_init_func(struct mmc_card *card, unsigned int fn)
return ret;
}
static int sdio_read_cccr(struct mmc_card *card)
static int sdio_read_cccr(struct mmc_card *card, u32 ocr)
{
int ret;
int cccr_vsn;
int uhs = ocr & R4_18V_PRESENT;
unsigned char data;
unsigned char speed;
......@@ -149,7 +150,7 @@ static int sdio_read_cccr(struct mmc_card *card)
card->scr.sda_spec3 = 0;
card->sw_caps.sd3_bus_mode = 0;
card->sw_caps.sd3_drv_type = 0;
if (cccr_vsn >= SDIO_CCCR_REV_3_00) {
if (cccr_vsn >= SDIO_CCCR_REV_3_00 && uhs) {
card->scr.sda_spec3 = 1;
ret = mmc_io_rw_direct(card, 0, 0,
SDIO_CCCR_UHS, 0, &data);
......@@ -712,7 +713,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
/*
* Read the common registers.
*/
err = sdio_read_cccr(card);
err = sdio_read_cccr(card, ocr);
if (err)
goto remove;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册