MMC host:

- sdhci-of-esdhc: Fix card detection
  - dw_mmc: Fix DMA error path
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYNwBsAAoJEP4mhCVzWIwpZUAQAJifMRCRqT1ZfK4stBQ+ifhB
 gnrn2DDBh6rxVraKtPf0LdIdDh4Krmf2mTbDC3ADvdFcM67+4zcqJkZzfFqabvmU
 BgoDHAPtsAnBn0fo/SC0neCg6c5/0bJsHsdM6ZD1rC89CSqpvgKJ7+n6H6TJy93P
 HAuhB3Nj9YSRXjOdEjNjTYrzmrs0GBQCbUrl0obgCyujlI8v6rPOE4260MIti9RM
 ZFqgDoA9kiYVYDImIyTqaFBf9gn9t955lQbbUWgdx+aHY4lsCfiSxxf3Q56zA96T
 H/1Qipvclvn7cbWI/QIMAMbG/o4F2oltufDUQlAcpTbJSzgueDxpBtA1ZvJm5alW
 GMqVEJomqndhLvsnb7eOS5ZF7cC74OqR7P43JmzgcyweZR5g1QPas2ZwclxNU6Eq
 I2Af8eo1ml+lb8ng3MYHRxmSlC9abLnFMkBs3srBBTwfRjadgPg00FppifS4btnU
 6S5BiCuF5SXWXHQT7UPz906olq3w2LHB/soU6Ol7gsByfvEr/RtYM4ym9yI3izqZ
 6cmIAgxk0r/jfd2rRjAchqWpfgs24CXD59E+aT3ID8O0WamhVJGqn/GqwDfaIfnA
 hGYQZetJbORr63pefVj+GLPQ1Uu90QZNakeRWpAc5kxw3iflA/3GeIjf7CIrZyjN
 hwqhbusNMED9wQalCBzz
 =nh9i
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:
 "MMC host:

   - sdhci-of-esdhc: Fix card detection
   - dw_mmc: Fix DMA error path"

* tag 'mmc-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: dw_mmc: fix the error handling for dma operation
  mmc: sdhci-of-esdhc: fixup PRESENT_STATE read
This commit is contained in:
Linus Torvalds 2016-11-24 10:51:18 -08:00
commit 16ae16c6e5
3 changed files with 16 additions and 0 deletions

View File

@ -1058,6 +1058,7 @@ static int dw_mci_submit_data_dma(struct dw_mci *host, struct mmc_data *data)
spin_unlock_irqrestore(&host->irq_lock, irqflags);
if (host->dma_ops->start(host, sg_len)) {
host->dma_ops->stop(host);
/* We can't do DMA, try PIO for this one */
dev_dbg(host->dev,
"%s: fall back to PIO mode for current transfer\n",

View File

@ -66,6 +66,20 @@ static u32 esdhc_readl_fixup(struct sdhci_host *host,
return ret;
}
}
/*
* The DAT[3:0] line signal levels and the CMD line signal level are
* not compatible with standard SDHC register. The line signal levels
* DAT[7:0] are at bits 31:24 and the command line signal level is at
* bit 23. All other bits are the same as in the standard SDHC
* register.
*/
if (spec_reg == SDHCI_PRESENT_STATE) {
ret = value & 0x000fffff;
ret |= (value >> 4) & SDHCI_DATA_LVL_MASK;
ret |= (value << 1) & SDHCI_CMD_LVL;
return ret;
}
ret = value;
return ret;
}

View File

@ -73,6 +73,7 @@
#define SDHCI_DATA_LVL_MASK 0x00F00000
#define SDHCI_DATA_LVL_SHIFT 20
#define SDHCI_DATA_0_LVL_MASK 0x00100000
#define SDHCI_CMD_LVL 0x01000000
#define SDHCI_HOST_CONTROL 0x28
#define SDHCI_CTRL_LED 0x01