mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-27 17:05:20 +02:00
libubb/mmcclk.c (mmcclk_start): also reset the MMC controller
This commit is contained in:
parent
a5fbf55419
commit
72f2125287
@ -60,6 +60,10 @@ void mmcclk_start(struct mmcclk *dsc)
|
|||||||
{
|
{
|
||||||
MSCCDR = dsc->clkdiv; /* set controller clock */
|
MSCCDR = dsc->clkdiv; /* set controller clock */
|
||||||
CLKGR &= ~(1 << 7); /* enable MSC clock */
|
CLKGR &= ~(1 << 7); /* enable MSC clock */
|
||||||
|
|
||||||
|
MSC_STRPCL = 1 << 3; /* reset the MSC */
|
||||||
|
while (MSC_STAT & (1 << 15)); /* wait until reset finishes */
|
||||||
|
|
||||||
MSC_CLKRT = dsc->clkrt; /* set bus clock */
|
MSC_CLKRT = dsc->clkrt; /* set bus clock */
|
||||||
MSC_STRPCL = 2; /* start MMC bus clock output */
|
MSC_STRPCL = 2; /* start MMC bus clock output */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user