Skip to content

Commit 1284c24

Browse files
kishonstorulf
authored andcommitted
mmc: sdhci: Add quirk to indicate MMC_RSP_136 has CRC
TI's implementation of sdhci controller used in DRA7 SoC's has CRC in responses with length 136 bits. Add quirk to indicate the controller has CRC in MMC_RSP_136. If this quirk is set sdhci library shouldn't shift the response present in SDHCI_RESPONSE register. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent 4a5fc11 commit 1284c24

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/mmc/host/sdhci.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,9 @@ static void sdhci_read_rsp_136(struct sdhci_host *host, struct mmc_command *cmd)
11821182
cmd->resp[i] = sdhci_readl(host, reg);
11831183
}
11841184

1185+
if (host->quirks2 & SDHCI_QUIRK2_RSP_136_HAS_CRC)
1186+
return;
1187+
11851188
/* CRC is stripped so we need to do some shifting */
11861189
for (i = 0; i < 4; i++) {
11871190
cmd->resp[i] <<= 8;

drivers/mmc/host/sdhci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,8 @@ struct sdhci_host {
435435
#define SDHCI_QUIRK2_ACMD23_BROKEN (1<<14)
436436
/* Broken Clock divider zero in controller */
437437
#define SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN (1<<15)
438+
/* Controller has CRC in 136 bit Command Response */
439+
#define SDHCI_QUIRK2_RSP_136_HAS_CRC (1<<16)
438440

439441
int irq; /* Device IRQ */
440442
void __iomem *ioaddr; /* Mapped address */

0 commit comments

Comments
 (0)