Add a new SDHCI_QUIRK_DONT_SHIFT_RESPONSE for hardware that pre-shifts
the response bits the way we do in software. While the hardware is just doing the sensible thing rather than leaving it to the software, it's in violation of the spec by doing so. Grrrr.
This commit is contained in:
parent
eb608cee63
commit
2fe1b528a9
@ -835,8 +835,13 @@ sdhci_finish_command(struct sdhci_slot *slot)
|
||||
uint8_t extra = 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
uint32_t val = RD4(slot, SDHCI_RESPONSE + i * 4);
|
||||
slot->curcmd->resp[3 - i] = (val << 8) + extra;
|
||||
extra = val >> 24;
|
||||
if (slot->quirks & SDHCI_QUIRK_DONT_SHIFT_RESPONSE)
|
||||
slot->curcmd->resp[3 - i] = val;
|
||||
else {
|
||||
slot->curcmd->resp[3 - i] =
|
||||
(val << 8) | extra;
|
||||
extra = val >> 24;
|
||||
}
|
||||
}
|
||||
} else
|
||||
slot->curcmd->resp[0] = RD4(slot, SDHCI_RESPONSE);
|
||||
|
@ -57,6 +57,8 @@
|
||||
#define SDHCI_QUIRK_BROKEN_TIMEOUT_VAL (1<<11)
|
||||
/* SDHCI_CAPABILITIES is invalid */
|
||||
#define SDHCI_QUIRK_MISSING_CAPS (1<<12)
|
||||
/* Hardware shifts the 136-bit response, don't do it in software. */
|
||||
#define SDHCI_QUIRK_DONT_SHIFT_RESPONSE (1<<13)
|
||||
|
||||
/*
|
||||
* Controller registers
|
||||
|
Loading…
Reference in New Issue
Block a user