Skip to contentSkip to conversation

mmc: esdhc-imx: fix reading of SDHCI_HOST_VERSION when controller version isn't 3.

PATCH New Zhang Xinlin 1 participant 1 message Dec 10, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: esdhc-imx: fix reading of SDHCI_HOST_VERSION when controller version isn't 3.

According to the IMX25RMAD:

   eSDHC version      value
       1.0            0x00
       2.0            0x10
       2.1            0x11
       2.2            0x12
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +2 -1
index 4b976f0..1a0eb92 100644
@@ -240,7 +240,8 @@ static u16 esdhc_readw_le(struct sdhci_host *host, int reg)
 		 * SDHCI_SPEC_300 definition.  Work it around here.
 		 */
 		if ((val & SDHCI_SPEC_VER_MASK) == 3)
-			return --val;
+			--val;
+		return val;
 	}
 
 	return readw(host->ioaddr + reg);
Signature · 1 line
1.7.8.rc1