mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
imx233/emi: cleanup and don't change emi freq if not needed
Change-Id: I19f633a85bb12f880215905482934e34da549a13
This commit is contained in:
parent
32219513aa
commit
55c5c7ea66
2 changed files with 6 additions and 2 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue