[PATCH] ARM omap hsmmc: Fix adding iobase for OMAP3

Juergen Kilb J.Kilb at phytec.de
Fri Jan 4 11:13:12 EST 2013


Only the OMAP4 hsmmc module has an offset of 0x100 from its register
base address. With commit 416a991 the offset was added for all SOCs
which use the omap_hsmmc driver.
This has broken the driver for OMAP3/AM33xx platforms.

Signed-off-by: Juergen Kilb <J.Kilb at phytec.de>
---
 drivers/mci/omap_hsmmc.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c
index 6471ea6..68fb3e1 100644
--- a/drivers/mci/omap_hsmmc.c
+++ b/drivers/mci/omap_hsmmc.c
@@ -577,8 +577,12 @@ static int omap_mmc_probe(struct device_d *dev)
 	hsmmc->mci.hw_dev = dev;
 
 	hsmmc->iobase = dev_request_mem_region(dev, 0);
-	hsmmc->base = hsmmc->iobase + 0x100;
 
+#if defined(CONFIG_ARCH_OMAP4)
+	hsmmc->base = hsmmc->iobase + 0x100;
+#else
+	hsmmc->base = hsmmc->iobase;
+#endif
 	hsmmc->mci.voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
 
 	hsmmc->mci.f_min = 400000;
-- 
1.7.0.4




More information about the barebox mailing list