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 */
|
||||
|
|
|
|||
|
|
@ -46,9 +46,7 @@ struct imx233_emi_info_t
|
|||
* Absolute minimum CPU speed: 24 MHz */
|
||||
#define IMX233_EMIFREQ_151_MHz 151580
|
||||
#define IMX233_EMIFREQ_130_MHz 130910
|
||||
#define IMX233_EMIFREQ_120_MHz 120000
|
||||
#define IMX233_EMIFREQ_64_MHz 64000
|
||||
#define IMX233_EMIFREQ_24_MHz 24000
|
||||
|
||||
void imx233_emi_set_frequency(unsigned long freq);
|
||||
struct imx233_emi_info_t imx233_emi_get_info(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue