Changeset 0e24873 in umon


Ignore:
Timestamp:
Aug 4, 2015, 6:03:22 PM (4 years ago)
Author:
Jarielle Catbagan <jcatbagan93@…>
Branches:
master
Children:
04903c8
Parents:
7e4e58e
git-author:
Jarielle Catbagan <jcatbagan93@…> (08/04/15 18:03:22)
git-committer:
Ed Sutter <edsutterjr@…> (08/04/15 22:45:33)
Message:

BBB: Migrate MMC0 clock enable from am335x_sd.c:sdInit() to cpuio.c:initCPUio()

The reason why the MMC0 clock enable has to be executed much earlier is a result of the invocation
of sdInstalled() in sd.h before sdInit(). Without this migration, an exception occurs since the
MMC0 interface has not been enabled before it is accessed by sdInstalled().

Location:
ports/beagleboneblack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ports/beagleboneblack/am335x_sd.c

    r7e4e58e r0e24873  
    4747{
    4848        uint32_t cmd, arg, resp[4];
    49 
    50         /* Enable MMC0 clocks */
    51         CM_PER_REG(CM_PER_MMC0_CLKCTRL) |= CM_PER_MMC0_CLKCTRL_MODULEMODE_ENABLE;
    52         while (CM_PER_REG(CM_PER_MMC0_CLKCTRL) & CM_PER_MMC0_CLKCTRL_IDLEST);
    5349
    5450        /* Reset the MMC/SD controller */
  • ports/beagleboneblack/cpuio.c

    r7e4e58e r0e24873  
    205205        // Enable clock for GPIO1:
    206206        CM_PER_REG(CM_PER_GPIO1_CLKCTRL) |= 2;
     207
     208        /* Enable MMC0 clocks */
     209        CM_PER_REG(CM_PER_MMC0_CLKCTRL) |= CM_PER_MMC0_CLKCTRL_MODULEMODE_ENABLE;
     210        while (CM_PER_REG(CM_PER_MMC0_CLKCTRL) & CM_PER_MMC0_CLKCTRL_IDLEST);
    207211
    208212        pinMuxInit();
Note: See TracChangeset for help on using the changeset viewer.