summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-12-10 11:28:00 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-12-10 11:28:00 +0000
commit75f2e4551cae45e1c3c5a9e499412db081b43ba7 (patch)
treeb52f52182c9703403dd1521d2f119e98e671d7f5
parentc9a8031695de392e229fdb389ca4a99421e02bdd (diff)
downloadrockbox-75f2e4551cae45e1c3c5a9e499412db081b43ba7.tar.gz
rockbox-75f2e4551cae45e1c3c5a9e499412db081b43ba7.zip
AMS(v2): fix system_reboot by re-enabling the internal ROM clock just before rebooting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31196 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/as3525.h1
-rw-r--r--firmware/target/arm/as3525/system-as3525.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/firmware/export/as3525.h b/firmware/export/as3525.h
index c5e01d5bc8..bad88a20e3 100644
--- a/firmware/export/as3525.h
+++ b/firmware/export/as3525.h
@@ -223,6 +223,7 @@ CE lines
223/* --- are disabled after reset --- */ 223/* --- are disabled after reset --- */
224#define CGU_EXTMEM_CLOCK_ENABLE ( 1 << 27 ) /* external memory */ 224#define CGU_EXTMEM_CLOCK_ENABLE ( 1 << 27 ) /* external memory */
225#define CGU_EXTMEMIF_CLOCK_ENABLE ( 1 << 26 ) /* ext mem AHB IF */ 225#define CGU_EXTMEMIF_CLOCK_ENABLE ( 1 << 26 ) /* ext mem AHB IF */
226#define CGU_ROM_ENABLE ( 1 << 24 ) /* internal ROM */
226#define CGU_DMA_CLOCK_ENABLE ( 1 << 22 ) /* dma */ 227#define CGU_DMA_CLOCK_ENABLE ( 1 << 22 ) /* dma */
227#define CGU_USB_CLOCK_ENABLE ( 1 << 21 ) /* usb */ 228#define CGU_USB_CLOCK_ENABLE ( 1 << 21 ) /* usb */
228#define CGU_I2SOUT_APB_CLOCK_ENABLE ( 1 << 20 ) /* i2sout */ 229#define CGU_I2SOUT_APB_CLOCK_ENABLE ( 1 << 20 ) /* i2sout */
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index 31d6fb6ae6..dcea7a2a2e 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -224,7 +224,7 @@ void system_init(void)
224 CGU_PERI &= ~0x7f; /* pclk 24 MHz */ 224 CGU_PERI &= ~0x7f; /* pclk 24 MHz */
225#endif 225#endif
226 226
227 CGU_PERI &= ~(1<<24); /*disable built in boot rom clock*/ 227 CGU_PERI &= ~CGU_ROM_ENABLE; /*disable built in boot rom clock*/
228 228
229 /* bits 31:30 should be set to 0 in arm926-ejs */ 229 /* bits 31:30 should be set to 0 in arm926-ejs */
230 asm volatile( 230 asm volatile(
@@ -316,6 +316,9 @@ void system_reboot(void)
316 316
317 disable_irq(); 317 disable_irq();
318 318
319 /* re-enable internal ROM */
320 CGU_PERI |= CGU_ROM_ENABLE;
321
319 /* use watchdog to reset */ 322 /* use watchdog to reset */
320 CGU_PERI |= (CGU_WDOCNT_CLOCK_ENABLE | CGU_WDOIF_CLOCK_ENABLE); 323 CGU_PERI |= (CGU_WDOCNT_CLOCK_ENABLE | CGU_WDOIF_CLOCK_ENABLE);
321 WDT_LOAD = 1; /* set counter to 1 */ 324 WDT_LOAD = 1; /* set counter to 1 */