mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-11 14:12:26 -05:00
jz74x0: MSC clock needs to be divided from PLL clock.
Change-Id: I0cf2f0d55e0859f896afef289e833935d7c5a599
This commit is contained in:
parent
72820d8b2d
commit
679a0bd193
2 changed files with 7 additions and 2 deletions
|
|
@ -612,8 +612,10 @@ static inline unsigned int jz_sd_calc_clkrt(unsigned int rate)
|
|||
static inline void cpm_select_msc_clk(unsigned int rate)
|
||||
{
|
||||
unsigned int div = __cpm_get_pllout2() / rate;
|
||||
if (div == 0)
|
||||
div = 1;
|
||||
|
||||
REG_CPM_MSCCDR = div - 1;
|
||||
REG_CPM_MSCCDR = MSCCDR_MCS | (div - 1);
|
||||
}
|
||||
|
||||
/* Set the MMC clock frequency */
|
||||
|
|
|
|||
|
|
@ -647,8 +647,11 @@ static inline unsigned int jz_sd_calc_clkrt(const int drive, unsigned int rate)
|
|||
static inline void cpm_select_msc_clk(unsigned int rate)
|
||||
{
|
||||
unsigned int div = __cpm_get_pllout2() / rate;
|
||||
if (div == 0)
|
||||
div = 1;
|
||||
|
||||
REG_CPM_MSCCDR = div - 1;
|
||||
REG_CPM_MSCCDR = MSCCDR_MCS | (div - 1);
|
||||
DEBUG("MSCCLK == %x\n", REG_CPM_MSCCDR);
|
||||
}
|
||||
|
||||
/* Set the MMC clock frequency */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue