* [PATCH] mmc: core: UHS sdio card that fails should not exceed 50MHz
@ 2012-01-11 4:51 Philip Rakity
0 siblings, 0 replies; 3+ messages in thread
From: Philip Rakity @ 2012-01-11 4:51 UTC (permalink / raw)
To: linux-mmc@vger.kernel.org; +Cc: Chris Ball, Aaron Lu, Bing Zhao
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>
---
drivers/mmc/core/sdio.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index b77f770..8b626ad 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -97,10 +97,11 @@ fail:
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;
@@ -148,7 +149,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);
@@ -710,7 +711,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;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] mmc: core: UHS sdio card that fails should not exceed 50MHz
@ 2012-01-26 14:57 philipspatches
2012-01-26 15:02 ` Chris Ball
0 siblings, 1 reply; 3+ messages in thread
From: philipspatches @ 2012-01-26 14:57 UTC (permalink / raw)
To: cjb, linux-mmc; +Cc: Philip Rakity, Bing Zhao
From: Philip Rakity <prakity@marvell.com>
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>
---
drivers/mmc/core/sdio.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index b77f770..8b626ad 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -97,10 +97,11 @@ fail:
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;
@@ -148,7 +149,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);
@@ -710,7 +711,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;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: core: UHS sdio card that fails should not exceed 50MHz
2012-01-26 14:57 [PATCH] mmc: core: UHS sdio card that fails should not exceed 50MHz philipspatches
@ 2012-01-26 15:02 ` Chris Ball
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2012-01-26 15:02 UTC (permalink / raw)
To: philipspatches; +Cc: linux-mmc, Philip Rakity, Bing Zhao
Hi,
On Thu, Jan 26 2012, philipspatches@gmail.com wrote:
> From: Philip Rakity <prakity@marvell.com>
>
> 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>
Thanks, pushed to mmc-next for 3.3.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-26 15:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26 14:57 [PATCH] mmc: core: UHS sdio card that fails should not exceed 50MHz philipspatches
2012-01-26 15:02 ` Chris Ball
-- strict thread matches above, loose matches on Subject: below --
2012-01-11 4:51 Philip Rakity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).