Skip to contentSkip to conversation

mmc: CMD7:MMC_CMD_SELECT_CARD response fix

PATCH New Ajay Bhargav 2 participants 4 messages Oct 5, 2011 – Oct 11, 2011 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: CMD7:MMC_CMD_SELECT_CARD response fix

As per JEDEC document JESD84-A441 (page 105) response for CMD7 (MMC_CMD_SELECT_CARD) response should be R1 instead of R1b. In uboot we never take MMC to disconnected state and on powerup its always ideal state which later goes to stand-by state.

from document footnote:
R1 while selecting from Stand-By State to Transfer State; R1b while selecting from Disconnected State to Programming State.

---
 drivers/mmc/mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/mmc.c +1 -1
index e384399..79d00f6 100644
@@ -987,7 +987,7 @@ int mmc_startup(struct mmc *mmc)
 	/* Select the card, and put it into Transfer Mode */
 	if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */
 		cmd.cmdidx = MMC_CMD_SELECT_CARD;
-		cmd.resp_type = MMC_RSP_R1b;
+		cmd.resp_type = MMC_RSP_R1;
 		cmd.cmdarg = mmc->rca << 16;
 		cmd.flags = 0;
 		err = mmc_send_cmd(mmc, &cmd, NULL);
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 mmc: CMD7:MMC_CMD_SELECT_CARD response fix

Quoted 30 lines · ----- "Ajay Bhargav

As per JEDEC document JESD84-A441 (page 105) response for CMD7 (MMC_CMD_SELECT_CARD) response should be R1 instead of R1b. In uboot we
never take MMC to disconnected state and on powerup its always ideal state which later goes to stand-by state.

from document footnote:
R1 while selecting from Stand-By State to Transfer State; R1b while selecting from Disconnected State to Programming State.

---
 drivers/mmc/mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/mmc.c +1 -1
index e384399..79d00f6 100644
@@ -987,7 +987,7 @@ int mmc_startup(struct mmc *mmc)
 	/* Select the card, and put it into Transfer Mode */
 	if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */
 		cmd.cmdidx = MMC_CMD_SELECT_CARD;
-		cmd.resp_type = MMC_RSP_R1b;
+		cmd.resp_type = MMC_RSP_R1;
 		cmd.cmdarg = mmc->rca << 16;
 		cmd.flags = 0;
 		err = mmc_send_cmd(mmc, &cmd, NULL);
Signature · 1 line
1.7.0.4

any comments on this patch??

Regards,
Ajay Bhargav

#2 lore raw

PATCH 1/1 mmc: CMD7:MMC_CMD_SELECT_CARD response fix

In reply to Ajay Bhargav
Quoted 30 lines · ----- "Ajay Bhargav

As per JEDEC document JESD84-A441 (page 105) response for CMD7 (MMC_CMD_SELECT_CARD) response should be R1 instead of R1b. In uboot we
never take MMC to disconnected state and on powerup its always ideal state which later goes to stand-by state.

from document footnote:
R1 while selecting from Stand-By State to Transfer State; R1b while selecting from Disconnected State to Programming State.

---
 drivers/mmc/mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/mmc.c +1 -1
index e384399..79d00f6 100644
@@ -987,7 +987,7 @@ int mmc_startup(struct mmc *mmc)
 	/* Select the card, and put it into Transfer Mode */
 	if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */
 		cmd.cmdidx = MMC_CMD_SELECT_CARD;
-		cmd.resp_type = MMC_RSP_R1b;
+		cmd.resp_type = MMC_RSP_R1;
 		cmd.cmdarg = mmc->rca << 16;
 		cmd.flags = 0;
 		err = mmc_send_cmd(mmc, &cmd, NULL);
Signature · 1 line
1.7.0.4

any comments?

Regards,
Ajay Bhargav

#3 lore raw

PATCH 1/1 mmc: CMD7:MMC_CMD_SELECT_CARD response fix

Quoted 27 lines · Ajay Bhargav
Quoted 24 lines · ----- "Ajay Bhargav

As per JEDEC document JESD84-A441 (page 105) response for CMD7 (MMC_CMD_SELECT_CARD) response should be R1 instead of R1b. In uboot we
never take MMC to disconnected state and on powerup its always ideal state which later goes to stand-by state.

from document footnote:
R1 while selecting from Stand-By State to Transfer State; R1b while selecting from Disconnected State to Programming State.

---
?drivers/mmc/mmc.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)

drivers/mmc/mmc.c +0 -0
index e384399..79d00f6 100644
@@ -987,7 +987,7 @@ int mmc_startup(struct mmc *mmc)

? ? ? /* Select the card, and put it into Transfer Mode */ ? ? ? if (!mmc_host_is_spi(mmc)) { /* cmd not supported in spi */ ? ? ? ? ? ? ? cmd.cmdidx = MMC_CMD_SELECT_CARD;
- ? ? ? ? ? ? cmd.resp_type = MMC_RSP_R1b;

Quoted 8 lines
Quoted 6 lines

+ ? ? ? ? ? ? cmd.resp_type = MMC_RSP_R1; ? ? ? ? ? ? ? cmd.cmdarg = mmc->rca << 16; ? ? ? ? ? ? ? cmd.flags = 0;
? ? ? ? ? ? ? err = mmc_send_cmd(mmc, &cmd, NULL); --
1.7.0.4

any comments?

I need to think about this. Was this causing you a problem? What were the symptoms?