summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarielle Catbagan <jcatbagan93@gmail.com>2015-08-04 11:03:28 -0700
committerEd Sutter <edsutterjr@gmail.com>2015-08-04 18:45:34 -0400
commit426fc7180a423644964ad79441040bf7e5673ba6 (patch)
treedb8d581dc4a54a6a9104b9b8182544393d79af97
parentBBB: Makefile: Compile am335x_mmc.c (diff)
downloadumon-426fc7180a423644964ad79441040bf7e5673ba6.tar.bz2
BBB: Migrate MMC1 clock enable from am335x_mmc.c:mmcInit() to cpuio.c:initCPUio()
-rw-r--r--ports/beagleboneblack/am335x_mmc.c4
-rw-r--r--ports/beagleboneblack/cpuio.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/ports/beagleboneblack/am335x_mmc.c b/ports/beagleboneblack/am335x_mmc.c
index 10aef23..bba60a2 100644
--- a/ports/beagleboneblack/am335x_mmc.c
+++ b/ports/beagleboneblack/am335x_mmc.c
@@ -135,10 +135,6 @@ mmcInit(int interface, int verbose)
{
uint32_t cmd, arg, resp[4];
- /* Enable MMC1 clocks */
- CM_PER_REG(CM_PER_MMC1_CLKCTRL) |= CM_PER_MMC1_CLKCTRL_MODULEMODE_ENABLE;
- while (CM_PER_REG(CM_PER_MMC1_CLKCTRL) & CM_PER_MMC0_CLKCTRL_IDLEST);
-
/* Reset the MMC1 Controller */
MMC1_REG(SD_SYSCONFIG) = SD_SYSCONFIG_SOFTRESET;
while (!(MMC1_REG(SD_SYSSTATUS) & SD_SYSSTATUS_RESETDONE));
diff --git a/ports/beagleboneblack/cpuio.c b/ports/beagleboneblack/cpuio.c
index 1579fb0..a8a901d 100644
--- a/ports/beagleboneblack/cpuio.c
+++ b/ports/beagleboneblack/cpuio.c
@@ -241,6 +241,10 @@ initCPUio(void)
CM_PER_REG(CM_PER_MMC0_CLKCTRL) |= CM_PER_MMC0_CLKCTRL_MODULEMODE_ENABLE;
while (CM_PER_REG(CM_PER_MMC0_CLKCTRL) & CM_PER_MMC0_CLKCTRL_IDLEST);
+ /* Enable MMC1 clocks */
+ CM_PER_REG(CM_PER_MMC1_CLKCTRL) |= CM_PER_MMC1_CLKCTRL_MODULEMODE_ENABLE;
+ while (CM_PER_REG(CM_PER_MMC1_CLKCTRL) & CM_PER_MMC0_CLKCTRL_IDLEST);
+
pinMuxInit();
InitUART(DEFAULT_BAUD_RATE);