History

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).

Dave Liu committed 17 years ago

Commit fbf6a5f1 parent a6d297f1 file · +7 −1Browse files

Unified · Split

drivers/mmc/host/sdhci-of.c+7−1
@@ -55,7 +55,13 @@ static u32 esdhc_readl(struct sdhci_host *host, int reg) · 54 unmodified lines
5555
5656 static u16 esdhc_readw(struct sdhci_host *host, int reg)
5757 {
58− return in_be16(host->ioaddr + (reg ^ 0x2));
58+ u16 ret;
59+
60+ if (unlikely(reg == SDHCI_HOST_VERSION))
61+ ret = in_be16(host->ioaddr + reg);
62+ else
63+ ret = in_be16(host->ioaddr + (reg ^ 0x2));
64+ return ret;
5965 }
6066
6167 static u8 esdhc_readb(struct sdhci_host *host, int reg)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t