summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/as3525/system-as3525.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/system-as3525.c')
-rw-r--r--firmware/target/arm/as3525/system-as3525.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index 4e1714b8aa..41cc54301b 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -254,11 +254,14 @@ void system_init(void)
CCU_SCON = 1; /* AHB master's priority configuration :
TIC (Test Interface Controller) > DMA > USB > IDE > ARM */
-#if CONFIG_CPU == AS3525
- CGU_PROC = 0; /* fclk 24 MHz */
-#endif
CGU_PERI &= ~0x7f; /* pclk 24 MHz */
+ asm volatile(
+ "mrc p15, 0, r0, c1, c0 \n" /* control register */
+ "bic r0, r0, #3<<30 \n" /* clears bus bits : sets fastbus */
+ "mcr p15, 0, r0, c1, c0 \n"
+ : : : "r0" );
+
CGU_PLLASUP = 0; /* enable PLLA */
CGU_PLLA = AS3525_PLLA_SETTING;
while(!(CGU_INTCTRL & (1<<0))); /* wait until PLLA is locked */
@@ -269,12 +272,10 @@ void system_init(void)
while(!(CGU_INTCTRL & (1<<1))); /* wait until PLLB is locked */
#endif
-#if CONFIG_CPU == AS3525
/* Set FCLK frequency */
CGU_PROC = ((AS3525_FCLK_POSTDIV << 4) |
(AS3525_FCLK_PREDIV << 2) |
AS3525_FCLK_SEL);
-#endif
/* Set PCLK frequency */
CGU_PERI = ((CGU_PERI & ~0x7F) | /* reset divider & clksel bits */
@@ -282,12 +283,6 @@ void system_init(void)
(AS3525_PCLK_DIV1 << 6) |
AS3525_PCLK_SEL);
- asm volatile(
- "mrc p15, 0, r0, c1, c0 \n" /* control register */
- "bic r0, r0, #3<<30 \n" /* clears bus bits : sets fastbus */
- "mcr p15, 0, r0, c1, c0 \n"
- : : : "r0" );
-
#ifdef BOOTLOADER
sdram_init();
#endif /* BOOTLOADER */