Skip to content

Commit

Permalink
sdhci-of: Fix the wrong accessor to HOSTVER register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Liu authored and Pierre Ossman committed Jun 3, 2009
1 parent a6d297f commit fbf6a5f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/mmc/host/sdhci-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fbf6a5f

Please sign in to comment.