Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24117def authored by Pierre Ossman's avatar Pierre Ossman Committed by Russell King
Browse files

[MMC] Fix protocol errors



A review against MMC/SD specifications found some errors in the current
implementation.

Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 458af543
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -816,7 +816,7 @@ static void mmc_discover_cards(struct mmc_host *host)


			cmd.opcode = SD_SEND_RELATIVE_ADDR;
			cmd.opcode = SD_SEND_RELATIVE_ADDR;
			cmd.arg = 0;
			cmd.arg = 0;
			cmd.flags = MMC_RSP_R1;
			cmd.flags = MMC_RSP_R6;


			err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES);
			err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES);
			if (err != MMC_ERR_NONE)
			if (err != MMC_ERR_NONE)
+2 −2
Original line number Original line Diff line number Diff line
@@ -63,7 +63,7 @@
  /* class 5 */
  /* class 5 */
#define MMC_ERASE_GROUP_START    35   /* ac   [31:0] data addr   R1  */
#define MMC_ERASE_GROUP_START    35   /* ac   [31:0] data addr   R1  */
#define MMC_ERASE_GROUP_END      36   /* ac   [31:0] data addr   R1  */
#define MMC_ERASE_GROUP_END      36   /* ac   [31:0] data addr   R1  */
#define MMC_ERASE                37   /* ac                      R1b */
#define MMC_ERASE                38   /* ac                      R1b */


  /* class 9 */
  /* class 9 */
#define MMC_FAST_IO              39   /* ac   <Complex>          R4  */
#define MMC_FAST_IO              39   /* ac   <Complex>          R4  */
@@ -74,7 +74,7 @@


  /* class 8 */
  /* class 8 */
#define MMC_APP_CMD              55   /* ac   [31:16] RCA        R1  */
#define MMC_APP_CMD              55   /* ac   [31:16] RCA        R1  */
#define MMC_GEN_CMD              56   /* adtc [0] RD/WR          R1b */
#define MMC_GEN_CMD              56   /* adtc [0] RD/WR          R1  */


/* SD commands                           type  argument     response */
/* SD commands                           type  argument     response */
  /* class 8 */
  /* class 8 */