mmc: Fix the wrong accessor to HOSTVER register
PATCH 1/1 mmc: 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).
--- drivers/mmc/host/sdhci-of.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci-of.c +7 -1
@@ -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)
Signature · 1 line
1.5.4
Quoted 7 lines · On Wed, 6 May 2009 18:40:07 +0800 Dave Liu <[email protected]> wrote:
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 thein_be16(0xFE)to access it, notin_be16(0xFC).Signed-off-by Dave Liu <[email protected]>---
Any objections, Anton?
Rgds
Signature · 6 lines
-- Pierre Ossman WARNING: This correspondence is being monitored by the Swedish government. Make sure your server uses encryption for SMTP traffic and consider using PGP for end-to-end encryption.
Quoted 6 lines · Dave Liu
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 thein_be16(0xFE)to access it, notin_be16(0xFC).Signed-off-by Dave Liu <[email protected]>
Sorry for the delay Dave. This patch is surely
Quoted 25 lines
--- drivers/mmc/host/sdhci-of.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)drivers/mmc/host/sdhci-of.c +7
-1@@ -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)Signature · 1 line
1.5.4
Thanks,
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2
Quoted 6 lines · On Tue, 2 Jun 2009 21:26:44 +0400 Anton Vorontsov <[email protected]>…
Quoted 5 lines · Dave Liu
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 thein_be16(0xFE)to access it, notin_be16(0xFC).
Quoted 6 lines
Quoted 1 line
Signed-off-by Dave Liu <[email protected]>Sorry for the delay Dave. This patch is surely
Acked-by Anton Vorontsov <[email protected]>
Queued.
Rgds
Signature · 6 lines
-- Pierre Ossman WARNING: This correspondence is being monitored by the Swedish government. Make sure your server uses encryption for SMTP traffic and consider using PGP for end-to-end encryption.