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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to the IMX25RMAD:
   eSDHC version      value
       1.0            0x00
       2.0            0x10
       2.1            0x11
       2.2            0x12

Signed-off-by: Zhang Xinlin <zhangxinlin@xxxxxxxxx>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 4b976f0..1a0eb92 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -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);
-- 
1.7.8.rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux