forked from len0rd/rockbox
imx233: move power init to system init
Do low level power init in system_init(). This can be needed since imx233 must be able to frequecy scale atfer system_init() and kernel_init() and this is only possible if power system was initialised. Change-Id: I27c66ec0dccd60bda26a45be24683c0bfe72c6da
This commit is contained in:
parent
f7132e4044
commit
2b1159dda0
3 changed files with 18 additions and 5 deletions
|
@ -101,6 +101,10 @@ void memory_init(void)
|
|||
|
||||
void system_init(void)
|
||||
{
|
||||
/* NOTE: don't use anything here that might require tick task !
|
||||
* It is initialized by kernel_init *after* system_init().
|
||||
* The main() will naturally set cpu speed to normal after kernel_init()
|
||||
* so don't bother if the cpu is running at 24MHz here. */
|
||||
imx233_clkctrl_enable_clock(CLK_PLL, true);
|
||||
imx233_rtc_init();
|
||||
imx233_icoll_init();
|
||||
|
@ -111,11 +115,9 @@ void system_init(void)
|
|||
imx233_dcp_init();
|
||||
imx233_pwm_init();
|
||||
imx233_lradc_init();
|
||||
imx233_power_init();
|
||||
imx233_i2c_init();
|
||||
#if !defined(BOOTLOADER) &&(defined(SANSA_FUZEPLUS) || \
|
||||
defined(CREATIVE_ZENXFI3) || defined(CREATIVE_ZENXFI2))
|
||||
fmradio_i2c_init();
|
||||
#endif
|
||||
|
||||
imx233_clkctrl_enable_auto_slow_monitor(AS_CPU_INSTR, true);
|
||||
imx233_clkctrl_enable_auto_slow_monitor(AS_CPU_DATA, true);
|
||||
imx233_clkctrl_enable_auto_slow_monitor(AS_TRAFFIC, true);
|
||||
|
@ -124,6 +126,11 @@ void system_init(void)
|
|||
imx233_clkctrl_enable_auto_slow_monitor(AS_APBHDMA, true);
|
||||
imx233_clkctrl_set_auto_slow_divisor(AS_DIV_8);
|
||||
imx233_clkctrl_enable_auto_slow(true);
|
||||
|
||||
#if !defined(BOOTLOADER) &&(defined(SANSA_FUZEPLUS) || \
|
||||
defined(CREATIVE_ZENXFI3) || defined(CREATIVE_ZENXFI2))
|
||||
fmradio_i2c_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool imx233_us_elapsed(uint32_t ref, unsigned us_delay)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue