]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mmc: sdhci-of-esdhc: avoid writing power control register
authoryangbo lu <yangbo.lu@freescale.com>
Fri, 16 Oct 2015 07:44:03 +0000 (15:44 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 26 Oct 2015 15:00:15 +0000 (16:00 +0100)
The eSDHC doesn't have a standard power control register, so when
writing this register in stack we should do nothing to avoid
incorrect operation.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-of-esdhc.c

index 7b9282b6eac9c91bdde1d2df2c208818d34c3487..90e94a028a49a39169b754d43050d4937d4b52eb 100644 (file)
@@ -182,6 +182,12 @@ static u32 esdhc_writeb_fixup(struct sdhci_host *host,
        u8 tmp;
        int shift = (spec_reg & 0x3) * 8;
 
+       /*
+        * eSDHC doesn't have a standard power control register, so we do
+        * nothing here to avoid incorrect operation.
+        */
+       if (spec_reg == SDHCI_POWER_CONTROL)
+               return old_value;
        /*
         * "DMA select" location is offset 0x28 in SD specification, but on
         * P5020 or P3041, it's located at 0x29.