summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/mv_sdhci.c5
-rw-r--r--include/sdhci.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index f92caeb8fd..1501974e2f 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;
}
diff --git a/include/sdhci.h b/include/sdhci.h
index 0690938046..800f9d9c07 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -215,6 +215,7 @@
* quirks
*/
#define SDHCI_QUIRK_32BIT_DMA_ADDR (1 << 0)
+#define SDHCI_QUIRK_REG32_RW (1 << 1)
/* to make gcc happy */
struct sdhci_host;