mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-16 18:45:54 +02:00
libubb/mmcclk.c: use symbolic bit/field definitions for MSC_*
This commit is contained in:
parent
8509c1f7b9
commit
4cb68b7ece
@ -70,15 +70,16 @@ void mmcclk_start(struct mmcclk *dsc)
|
||||
MSCCDR = dsc->clkdiv; /* set controller clock */
|
||||
CLKGR &= ~(1 << 7); /* enable MSC clock */
|
||||
|
||||
MSC_STRPCL = 1 << 3; /* reset the MSC */
|
||||
while (MSC_STAT & (1 << 15)); /* wait until reset finishes */
|
||||
MSC_STRPCL = MSC_STRPCRL_RESET; /* reset the MSC */
|
||||
while (MSC_STAT & MSC_STAT_IS_RESETTING);
|
||||
/* wait until reset finishes */
|
||||
|
||||
MSC_CLKRT = dsc->clkrt; /* set bus clock */
|
||||
MSC_STRPCL = 2; /* start MMC bus clock output */
|
||||
MSC_STRPCL = MSC_STRPCRL_START_CLOCK;
|
||||
}
|
||||
|
||||
|
||||
void mmcclk_stop(void)
|
||||
{
|
||||
MSC_STRPCL = 1; /* stop MMC bus clock output */
|
||||
MSC_STRPCL = MSC_STRPCRL_STOP_CLOCK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user