summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/emi-imx233.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/emi-imx233.c')
-rw-r--r--firmware/target/arm/imx233/emi-imx233.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/emi-imx233.c b/firmware/target/arm/imx233/emi-imx233.c
index 259ada0e94..fcdb6d2353 100644
--- a/firmware/target/arm/imx233/emi-imx233.c
+++ b/firmware/target/arm/imx233/emi-imx233.c
@@ -135,6 +135,12 @@ void imx233_emi_set_frequency(unsigned long freq)
* WARNING DANGER don't call any external function when sdram is disabled
* otherwise you'll poke sdram and trigger a fatal data abort ! */
+ static unsigned long cur_freq = -1;
+ /* avoid changes if unneeded */
+ if(cur_freq == freq)
+ return;
+ cur_freq = freq;
+
/* first disable all interrupts */
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
/* flush the cache */