From: yangbo lu Date: Fri, 16 Oct 2015 07:44:03 +0000 (+0800) Subject: mmc: sdhci-of-esdhc: avoid writing power control register X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9e4703df3aa9829a84d6ccf19c6062ba19a8de71;p=linux-beck.git mmc: sdhci-of-esdhc: avoid writing power control register 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 Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 7b9282b6eac9..90e94a028a49 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -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.