summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-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;