summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAjay Bhargav <ajay.bhargav@einfochips.com>2011-11-13 23:43:12 +0000
committerAndy Fleming <afleming@freescale.com>2011-11-25 17:43:05 -0600
commit5af9a56999c3c7ec827447d0b957e3e234f5d9a4 (patch)
treed08219d7cfdc7b39a2bb76e85a8bdd5c29faf7c7 /drivers
parentfdbe8b9a2d1858ba35dd6214315563ad44d4a0e3 (diff)
downloadu-boot-imx-5af9a56999c3c7ec827447d0b957e3e234f5d9a4.zip
u-boot-imx-5af9a56999c3c7ec827447d0b957e3e234f5d9a4.tar.gz
u-boot-imx-5af9a56999c3c7ec827447d0b957e3e234f5d9a4.tar.bz2
mmc: mv_sdhci: Fix host version read for Armada100
sdhci_readw does not work for host version read in Armada100 series SoCs. This patch fix this issue by making a sdhci_readl call to get host version. Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mv_sdhci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index f92caeb..1501974 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -48,7 +48,10 @@ int mv_sdh_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks)
mv_ops.write_b = mv_sdhci_writeb;
host->ops = &mv_ops;
#endif
- host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
+ if (quirks & SDHCI_QUIRK_REG32_RW)
+ host->version = sdhci_readl(host, SDHCI_HOST_VERSION - 2) >> 16;
+ else
+ host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
add_sdhci(host, max_clk, min_clk);
return 0;
}