From 1f36c4ba53f83d3cde486bd4165ed81e07c0fec3 Mon Sep 17 00:00:00 2001 From: Barry Wardell Date: Sat, 19 Apr 2008 16:30:17 +0000 Subject: [PATCH] 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 --- firmware/target/arm/system-pp502x.c | 11 +++++++++-- 1 file 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 */ }