summaryrefslogtreecommitdiffstats
path: root/drivers/mci/omap_hsmmc.c
diff options
context:
space:
mode:
authorAlexander Aring <a.aring@phytec.de>2011-12-21 08:50:30 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-12-21 12:48:08 +0100
commit659f150e90d8bfcf8aa4c51bd3ab552f42e288f0 (patch)
tree20f239795617794eaca566b321825d0b7da36283 /drivers/mci/omap_hsmmc.c
parent8658e6a9528c7e65bf7a3732d815f662c9c8ed11 (diff)
downloadbarebox-659f150e90d8bfcf8aa4c51bd3ab552f42e288f0.tar.gz
barebox-659f150e90d8bfcf8aa4c51bd3ab552f42e288f0.tar.xz
omap_hsmmc: setup mmc voltage on twl6030
Support the setup of the mmc voltage, when booting OMAP4 with twl6030 from nand. Signed-off-by: Alexander Aring <a.aring@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/omap_hsmmc.c')
-rw-r--r--drivers/mci/omap_hsmmc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c
index d171c1dcf7..e671bbea73 100644
--- a/drivers/mci/omap_hsmmc.c
+++ b/drivers/mci/omap_hsmmc.c
@@ -33,6 +33,12 @@
#include <mach/omap_hsmmc.h>
+#if defined(CONFIG_I2C_TWL6030) && \
+ defined(CONFIG_MCI_OMAP_HSMMC) && \
+ defined(CONFIG_ARCH_OMAP4)
+#include <mach/omap4_twl6030_mmc.h>
+#endif
+
struct hsmmc {
unsigned char res1[0x10];
unsigned int sysconfig; /* 0x10 */
@@ -215,6 +221,17 @@ static int mmc_init_setup(struct mci_host *mci, struct device_d *dev)
unsigned int dsor;
uint64_t start;
+/*
+ * Fix voltage for mmc, if booting from nand.
+ * It's necessary to do this here, because
+ * you need to set up this at probetime.
+ */
+#if defined(CONFIG_I2C_TWL6030) && \
+ defined(CONFIG_MCI_OMAP_HSMMC) && \
+ defined(CONFIG_ARCH_OMAP4)
+ set_up_mmc_voltage_omap4();
+#endif
+
writel(readl(&mmc_base->sysconfig) | MMC_SOFTRESET,
&mmc_base->sysconfig);