From 5ce81fde37b3223236ba69ebeddbe40567e5130e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Mon, 12 Nov 2012 21:52:55 +0100 Subject: [PATCH] AMS: make sure ROM clock is always on Change-Id: Ib73b21b944cb609cc26f7f6955d2c894628f65ad --- firmware/target/arm/as3525/system-as3525.c | 9 ++------- 1 file 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) CGU_PERI &= ~0x7f; /* pclk 24 MHz */ #endif - /*this saves a tiny bit of power but seems to leave the processor in - a bad state if it manages to reboot without the clock reenabled*/ - /*CGU_PERI &= ~CGU_ROM_ENABLE;*/ /*disable built in boot rom clock*/ - /* bits 31:30 should be set to 0 in arm926-ejs */ asm volatile( "mrc p15, 0, r0, c1, c0 \n" /* control register */ @@ -308,6 +304,8 @@ void system_init(void) #endif AS3525_PCLK_SEL); + CGU_PERI |= CGU_ROM_ENABLE; /* needed for rebooting */ + set_cpu_frequency(CPUFREQ_DEFAULT); #if 0 /* the GPIO clock is already enabled by the dualboot function */ @@ -366,9 +364,6 @@ void system_reboot(void) disable_irq(); - /* re-enable internal ROM so that we don't hard lock on power up*/ - CGU_PERI |= CGU_ROM_ENABLE; /*should always be on, but to be safe...*/ - /* use watchdog to reset */ CGU_PERI |= (CGU_WDOCNT_CLOCK_ENABLE | CGU_WDOIF_CLOCK_ENABLE); WDT_LOAD = 1; /* set counter to 1 */