summaryrefslogtreecommitdiff
path: root/drivers/mmc/omap3_mmc.c
diff options
context:
space:
mode:
authorSteve Sakoman <steve@sakoman.com>2010-06-09 12:54:58 -0700
committerSandeep Paulraj <s-paulraj@ti.com>2010-07-05 20:00:05 -0400
commitbec3dc75996abf3cd878e54462708b1d9255bdc9 (patch)
tree70fbb4676b09fa3241032e59b99130519b9fb039 /drivers/mmc/omap3_mmc.c
parentd34efc767d26d353e0257042080eec7012e5440f (diff)
downloadu-boot-imx-bec3dc75996abf3cd878e54462708b1d9255bdc9.zip
u-boot-imx-bec3dc75996abf3cd878e54462708b1d9255bdc9.tar.gz
u-boot-imx-bec3dc75996abf3cd878e54462708b1d9255bdc9.tar.bz2
ARMV7: Restructure OMAP mmc driver to allow code sharing between OMAP3 and OMAP4
The architecture independent header is moved to drivers/mmc, and the architecture dependent headers reside in asm/arch-omap3 and asm/arch-omap4 Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'drivers/mmc/omap3_mmc.c')
-rw-r--r--drivers/mmc/omap3_mmc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/mmc/omap3_mmc.c b/drivers/mmc/omap3_mmc.c
index 25b66f2..4eda216 100644
--- a/drivers/mmc/omap3_mmc.c
+++ b/drivers/mmc/omap3_mmc.c
@@ -30,7 +30,8 @@
#include <i2c.h>
#include <twl4030.h>
#include <asm/io.h>
-#include <asm/arch/mmc.h>
+
+#include "omap3_mmc.h"
const unsigned short mmc_transspeed_val[15][4] = {
{CLKD(10, 1), CLKD(10, 10), CLKD(10, 100), CLKD(10, 1000)},
@@ -81,13 +82,14 @@ block_dev_desc_t *mmc_get_dev(int dev)
unsigned char mmc_board_init(void)
{
- t2_t *t2_base = (t2_t *)T2_BASE;
- struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
-
#if defined(CONFIG_TWL4030_POWER)
twl4030_power_mmc_init();
#endif
+#if defined(CONFIG_OMAP34XX)
+ t2_t *t2_base = (t2_t *)T2_BASE;
+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
+
writel(readl(&t2_base->pbias_lite) | PBIASLITEPWRDNZ1 |
PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0,
&t2_base->pbias_lite);
@@ -105,6 +107,9 @@ unsigned char mmc_board_init(void)
writel(readl(&prcm_base->iclken1_core) |
EN_MMC1 | EN_MMC2 | EN_MMC3,
&prcm_base->iclken1_core);
+#endif
+
+/* TODO add appropriate OMAP4 init */
return 1;
}