summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorBarry Wardell <rockbox@barrywardell.net>2008-04-19 16:30:17 +0000
committerBarry Wardell <rockbox@barrywardell.net>2008-04-19 16:30:17 +0000
commit1f36c4ba53f83d3cde486bd4165ed81e07c0fec3 (patch)
tree59244d41e9a017d4b2b1050e8a27dec3a84d65a5 /firmware
parent79fb077933350494b1734622a8b7d3008c898820 (diff)
downloadrockbox-1f36c4ba53f83d3cde486bd4165ed81e07c0fec3.tar.gz
rockbox-1f36c4ba53f83d3cde486bd4165ed81e07c0fec3.tar.bz2
rockbox-1f36c4ba53f83d3cde486bd4165ed81e07c0fec3.zip
FS#8642: Improve boot time on Sansa bootloaders by boosting the CPU. This only has any noticable effect if the OF bootloader is fully replaced with the RB BL.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17172 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/system-pp502x.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/firmware/target/arm/system-pp502x.c b/firmware/target/arm/system-pp502x.c
index a699b3a38a..be781f2198 100644
--- a/firmware/target/arm/system-pp502x.c
+++ b/firmware/target/arm/system-pp502x.c
@@ -138,8 +138,8 @@ static void init_cache(void)
CACHE_CTL |= CACHE_CTL_INIT | CACHE_CTL_ENABLE | CACHE_CTL_RUN;
nop; nop; nop; nop;
}
+#endif /* !BOOTLOADER */
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
void scale_suspend_core(bool suspend) ICODE_ATTR;
void scale_suspend_core(bool suspend)
{
@@ -161,6 +161,7 @@ void scale_suspend_core(bool suspend)
}
}
+#ifdef HAVE_ADJUSTABLE_CPU_FREQ
void set_cpu_frequency(long frequency) ICODE_ATTR;
void set_cpu_frequency(long frequency)
#else
@@ -282,7 +283,6 @@ static void pp_set_cpu_frequency(long frequency)
spinlock_unlock(&boostctrl_spin);
#endif
}
-#endif /* !BOOTLOADER */
void system_init(void)
{
@@ -415,6 +415,13 @@ void system_init(void)
}
init_cache();
+#else /* BOOTLOADER */
+ if (CURRENT_CORE == CPU)
+ {
+#if defined(SANSA_C200) || defined (SANSA_E200)
+ pp_set_cpu_frequency(CPUFREQ_MAX);
+#endif
+ }
#endif /* BOOTLOADER */
}