summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDave Liu <daveliu@freescale.com>2009-05-06 18:40:07 +0800
committerPierre Ossman <pierre@ossman.eu>2009-06-03 21:56:22 +0200
commitfbf6a5fcbcc2248f1e676f7a0a7d49cd4b535d2a (patch)
tree5bfd0c1d39e0f65a61f8dd78ea755c86973ba61b /drivers
parenta6d297f008e124d0bb4312369191b012c10a1a4e (diff)
sdhci-of: Fix the wrong accessor to HOSTVER register
Freescale eSDHC controller has the special order for the HOST version register. that is not same as the other's registers. The address of HOSTVER in spec is 0xFE, and we need use the in_be16(0xFE) to access it, not in_be16(0xFC). Signed-off-by: Dave Liu <daveliu@freescale.com> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-of.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-of.c b/drivers/mmc/host/sdhci-of.c
index 09cc597c6316..128c614d11aa 100644
--- a/drivers/mmc/host/sdhci-of.c
+++ b/drivers/mmc/host/sdhci-of.c
@@ -55,7 +55,13 @@ static u32 esdhc_readl(struct sdhci_host *host, int reg)
static u16 esdhc_readw(struct sdhci_host *host, int reg)
{
- return in_be16(host->ioaddr + (reg ^ 0x2));
+ u16 ret;
+
+ if (unlikely(reg == SDHCI_HOST_VERSION))
+ ret = in_be16(host->ioaddr + reg);
+ else
+ ret = in_be16(host->ioaddr + (reg ^ 0x2));
+ return ret;
}
static u8 esdhc_readb(struct sdhci_host *host, int reg)