From b269b7854ff80d470da53ac048f4f19012e43520 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Sat, 8 May 2010 13:59:01 +0000 Subject: 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 --- firmware/target/arm/as3525/system-as3525.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'firmware/target/arm/as3525') 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) "ldr r4, [%0]\n" : : "p"(0x30000000+0x2300*MEM) : "r4"); - MPMC_DYNAMIC_CONTROL = 0x2; /* SDRAM NORMAL, MPMCCLKOUT runs continuously */ + /* SDRAM NORMAL, MPMCCLKOUT stopped when SDRAM is idle */ + MPMC_DYNAMIC_CONTROL = 0x0; MPMC_DYNAMIC_CONFIG_0 |= (1<<19); /* buffer enable */ } @@ -343,8 +344,10 @@ void system_init(void) #endif AS3525_PCLK_SEL); -#ifdef BOOTLOADER +#if defined(BOOTLOADER) sdram_init(); +#elif CONFIG_CPU == AS3525 /* XXX: remove me when we have a new bootloader */ + MPMC_DYNAMIC_CONTROL = 0x0; /* MPMCCLKOUT stops when all SDRAMs are idle */ #endif /* BOOTLOADER */ #if 0 /* the GPIO clock is already enabled by the dualboot function */ -- cgit v1.2.3