summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-08 13:59:01 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-08 13:59:01 +0000
commitb269b7854ff80d470da53ac048f4f19012e43520 (patch)
tree198b085b27f5ed5ee81d008fdd5a4a94eed67076
parentfe29ad2edd58d674d6924a6d3dc412e30e7ab41c (diff)
downloadrockbox-b269b7854ff80d470da53ac048f4f19012e43520.tar.gz
rockbox-b269b7854ff80d470da53ac048f4f19012e43520.zip
as3525*: stop MPMCCLKOUT when all SDRAMs are idle
Get a bit more battery life (between 30 minutes and 2 hours) as3525v2: only enabled in bootloader, we need a new binary release anwyway as3525v1: enabled in rockbox.sansa as well, so we can continue using the current bootloaders Flyspray: FS#11246 Author: myself git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25900 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/as3525/system-as3525.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index 47cb465c62..51fcd97980 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -279,7 +279,8 @@ static void sdram_init(void)
279 "ldr r4, [%0]\n" 279 "ldr r4, [%0]\n"
280 : : "p"(0x30000000+0x2300*MEM) : "r4"); 280 : : "p"(0x30000000+0x2300*MEM) : "r4");
281 281
282 MPMC_DYNAMIC_CONTROL = 0x2; /* SDRAM NORMAL, MPMCCLKOUT runs continuously */ 282 /* SDRAM NORMAL, MPMCCLKOUT stopped when SDRAM is idle */
283 MPMC_DYNAMIC_CONTROL = 0x0;
283 284
284 MPMC_DYNAMIC_CONFIG_0 |= (1<<19); /* buffer enable */ 285 MPMC_DYNAMIC_CONFIG_0 |= (1<<19); /* buffer enable */
285} 286}
@@ -343,8 +344,10 @@ void system_init(void)
343#endif 344#endif
344 AS3525_PCLK_SEL); 345 AS3525_PCLK_SEL);
345 346
346#ifdef BOOTLOADER 347#if defined(BOOTLOADER)
347 sdram_init(); 348 sdram_init();
349#elif CONFIG_CPU == AS3525 /* XXX: remove me when we have a new bootloader */
350 MPMC_DYNAMIC_CONTROL = 0x0; /* MPMCCLKOUT stops when all SDRAMs are idle */
348#endif /* BOOTLOADER */ 351#endif /* BOOTLOADER */
349 352
350#if 0 /* the GPIO clock is already enabled by the dualboot function */ 353#if 0 /* the GPIO clock is already enabled by the dualboot function */