diff options
author | Rafaël Carré <funman@videolan.org> | 2012-11-12 21:52:55 +0100 |
---|---|---|
committer | Rafaël Carré <funman@videolan.org> | 2012-11-12 21:52:55 +0100 |
commit | 5ce81fde37b3223236ba69ebeddbe40567e5130e (patch) | |
tree | 81a768199df73f574f80561c4257be2cc154f4c3 /firmware/target | |
parent | 1272e8529956e0e4c73ee9cd61a401bdd20dc2d7 (diff) | |
download | rockbox-5ce81fde37b3223236ba69ebeddbe40567e5130e.tar.gz rockbox-5ce81fde37b3223236ba69ebeddbe40567e5130e.zip |
AMS: make sure ROM clock is always on
Change-Id: Ib73b21b944cb609cc26f7f6955d2c894628f65ad
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 80d21b2d0b..f128ef68be 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c | |||
@@ -272,10 +272,6 @@ void system_init(void) | |||
272 | CGU_PERI &= ~0x7f; /* pclk 24 MHz */ | 272 | CGU_PERI &= ~0x7f; /* pclk 24 MHz */ |
273 | #endif | 273 | #endif |
274 | 274 | ||
275 | /*this saves a tiny bit of power but seems to leave the processor in | ||
276 | a bad state if it manages to reboot without the clock reenabled*/ | ||
277 | /*CGU_PERI &= ~CGU_ROM_ENABLE;*/ /*disable built in boot rom clock*/ | ||
278 | |||
279 | /* bits 31:30 should be set to 0 in arm926-ejs */ | 275 | /* bits 31:30 should be set to 0 in arm926-ejs */ |
280 | asm volatile( | 276 | asm volatile( |
281 | "mrc p15, 0, r0, c1, c0 \n" /* control register */ | 277 | "mrc p15, 0, r0, c1, c0 \n" /* control register */ |
@@ -308,6 +304,8 @@ void system_init(void) | |||
308 | #endif | 304 | #endif |
309 | AS3525_PCLK_SEL); | 305 | AS3525_PCLK_SEL); |
310 | 306 | ||
307 | CGU_PERI |= CGU_ROM_ENABLE; /* needed for rebooting */ | ||
308 | |||
311 | set_cpu_frequency(CPUFREQ_DEFAULT); | 309 | set_cpu_frequency(CPUFREQ_DEFAULT); |
312 | 310 | ||
313 | #if 0 /* the GPIO clock is already enabled by the dualboot function */ | 311 | #if 0 /* the GPIO clock is already enabled by the dualboot function */ |
@@ -366,9 +364,6 @@ void system_reboot(void) | |||
366 | 364 | ||
367 | disable_irq(); | 365 | disable_irq(); |
368 | 366 | ||
369 | /* re-enable internal ROM so that we don't hard lock on power up*/ | ||
370 | CGU_PERI |= CGU_ROM_ENABLE; /*should always be on, but to be safe...*/ | ||
371 | |||
372 | /* use watchdog to reset */ | 367 | /* use watchdog to reset */ |
373 | CGU_PERI |= (CGU_WDOCNT_CLOCK_ENABLE | CGU_WDOIF_CLOCK_ENABLE); | 368 | CGU_PERI |= (CGU_WDOCNT_CLOCK_ENABLE | CGU_WDOIF_CLOCK_ENABLE); |
374 | WDT_LOAD = 1; /* set counter to 1 */ | 369 | WDT_LOAD = 1; /* set counter to 1 */ |