summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/tcc780x/system-tcc780x.c
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2008-03-31 22:43:20 +0000
committerRob Purchase <shotofadds@rockbox.org>2008-03-31 22:43:20 +0000
commit6fd72c750faa878bfe4f1e4d05771d4c9c6ae340 (patch)
tree1583b2766552cc8f385f7cb9e1398cb952316707 /firmware/target/arm/tcc780x/system-tcc780x.c
parentb4c20ce1af42a710c6be0ffd2b170574d3341f0f (diff)
downloadrockbox-6fd72c750faa878bfe4f1e4d05771d4c9c6ae340.tar.gz
rockbox-6fd72c750faa878bfe4f1e4d05771d4c9c6ae340.zip
Introduce sanity check and extra nop to stabilise TCC780x set_cpu_frequency(). Re-enable HAVE_ADJUSTABLE_CPU_FREQ and kill a few warnings by setting HAVE_SW_TONE_CONTROLS.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16904 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc780x/system-tcc780x.c')
-rw-r--r--firmware/target/arm/tcc780x/system-tcc780x.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/arm/tcc780x/system-tcc780x.c b/firmware/target/arm/tcc780x/system-tcc780x.c
index f6392b023a..c109b8ddda 100644
--- a/firmware/target/arm/tcc780x/system-tcc780x.c
+++ b/firmware/target/arm/tcc780x/system-tcc780x.c
@@ -291,11 +291,11 @@ int system_memory_guard(int newmode)
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
-/* Note: This is not currently enabled because switching seems to
- cause an occasional freeze. To be investigated. */
-
void set_cpu_frequency(long frequency)
{
+ if (cpu_frequency == frequency)
+ return;
+
/* CPU/COP frequencies can be scaled between Fbus (min) and Fsys (max).
Fbus should not be set below ~32Mhz with LCD enabled or the display
will be garbled. */
@@ -327,6 +327,7 @@ void set_cpu_frequency(long frequency)
asm volatile (
"nop \n\t"
"nop \n\t"
+ "nop \n\t"
);
cpu_frequency = frequency;