diff options
Diffstat (limited to 'drivers/mmc/host/sdhci-of.c')
-rw-r--r-- | drivers/mmc/host/sdhci-of.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-of.c b/drivers/mmc/host/sdhci-of.c index 3ff4ac3abe8b..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) | |||
55 | 55 | ||
56 | static u16 esdhc_readw(struct sdhci_host *host, int reg) | 56 | static u16 esdhc_readw(struct sdhci_host *host, int reg) |
57 | { | 57 | { |
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; | ||
59 | } | 65 | } |
60 | 66 | ||
61 | static u8 esdhc_readb(struct sdhci_host *host, int reg) | 67 | static u8 esdhc_readb(struct sdhci_host *host, int reg) |
@@ -277,6 +283,7 @@ static int __devexit sdhci_of_remove(struct of_device *ofdev) | |||
277 | static const struct of_device_id sdhci_of_match[] = { | 283 | static const struct of_device_id sdhci_of_match[] = { |
278 | { .compatible = "fsl,mpc8379-esdhc", .data = &sdhci_esdhc, }, | 284 | { .compatible = "fsl,mpc8379-esdhc", .data = &sdhci_esdhc, }, |
279 | { .compatible = "fsl,mpc8536-esdhc", .data = &sdhci_esdhc, }, | 285 | { .compatible = "fsl,mpc8536-esdhc", .data = &sdhci_esdhc, }, |
286 | { .compatible = "fsl,esdhc", .data = &sdhci_esdhc, }, | ||
280 | { .compatible = "generic-sdhci", }, | 287 | { .compatible = "generic-sdhci", }, |
281 | {}, | 288 | {}, |
282 | }; | 289 | }; |