as3525*: set up CGU_COUNT register before turning on / modifying PLLs

Write the setting before enabling the PLL
Fix booting problem (black screen) with Clip+

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25415 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-04-01 03:22:49 +00:00
parent d5e6bc7a8c
commit f4dcc69b51

View file

@ -262,13 +262,15 @@ void system_init(void)
"mcr p15, 0, r0, c1, c0 \n"
: : : "r0" );
CGU_PLLASUP = 0; /* enable PLLA */
CGU_COUNTA = 0xff;
CGU_PLLA = AS3525_PLLA_SETTING;
CGU_PLLASUP = 0; /* enable PLLA */
while(!(CGU_INTCTRL & (1<<0))); /* wait until PLLA is locked */
#if (AS3525_MCLK_SEL == AS3525_CLK_PLLB)
CGU_PLLBSUP = 0; /* enable PLLB */
CGU_COUNTB = 0xff;
CGU_PLLB = AS3525_PLLB_SETTING;
CGU_PLLBSUP = 0; /* enable PLLB */
while(!(CGU_INTCTRL & (1<<1))); /* wait until PLLB is locked */
#endif