mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 11:53:01 +00:00
mmc: sdhci: add a quirk to define non standard tuning
Some controllers need SW to compare the data received from the card for a tuning command. Add a quirk for such non standard controllers so that they can read the data from the controller using ADMA/PIO and do the tuning sequence from SW to determine the appropriate phase. Change-Id: I15edfdf0442e3ac678c70df29482b3304cf1215a Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
This commit is contained in:
parent
ed0562e7de
commit
65c147711b
|
@ -3160,9 +3160,10 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
|
|||
|
||||
/* CMD19 generates _only_ Buffer Read Ready interrupt */
|
||||
if (intmask & SDHCI_INT_DATA_AVAIL) {
|
||||
if (command == MMC_SEND_TUNING_BLOCK ||
|
||||
command == MMC_SEND_TUNING_BLOCK_HS200 ||
|
||||
command == MMC_SEND_TUNING_BLOCK_HS400) {
|
||||
if (!(host->quirks2 & SDHCI_QUIRK2_NON_STANDARD_TUNING) &&
|
||||
(command == MMC_SEND_TUNING_BLOCK ||
|
||||
command == MMC_SEND_TUNING_BLOCK_HS200 ||
|
||||
command == MMC_SEND_TUNING_BLOCK_HS400)) {
|
||||
host->tuning_done = 1;
|
||||
wake_up(&host->buf_ready_int);
|
||||
return;
|
||||
|
|
|
@ -191,6 +191,12 @@ struct sdhci_host {
|
|||
#define SDHCI_QUIRK2_BROKEN_LED_CONTROL (1 << 14)
|
||||
/* Use reset workaround in case sdhci reset timeouts */
|
||||
#define SDHCI_QUIRK2_USE_RESET_WORKAROUND (1 << 15)
|
||||
/*
|
||||
* Some controllers doesn't follow the tuning procedure as defined in spec.
|
||||
* The tuning data has to be compared from SW driver to validate the correct
|
||||
* phase.
|
||||
*/
|
||||
#define SDHCI_QUIRK2_NON_STANDARD_TUNING (1 << 16)
|
||||
|
||||
int irq; /* Device IRQ */
|
||||
void __iomem *ioaddr; /* Mapped address */
|
||||
|
|
Loading…
Reference in a new issue