forked from len0rd/rockbox
imx233: stop the watchdog before loading main firmware
Change-Id: I0a13444d6788a09b0fc04ed1a5115cb2e5fe6f57
This commit is contained in:
parent
34fb6906dd
commit
935c0ad14a
3 changed files with 10 additions and 0 deletions
|
@ -209,6 +209,8 @@ void main(uint32_t arg, uint32_t addr)
|
|||
|
||||
kernel_entry = (void*) loadbuffer;
|
||||
printf("Executing");
|
||||
/* stop what was initialized to start from clean state */
|
||||
system_prepare_fw_start();
|
||||
disable_interrupt(IRQ_FIQ_STATUS);
|
||||
commit_discard_idcache();
|
||||
kernel_entry();
|
||||
|
|
|
@ -197,6 +197,13 @@ void system_init(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void system_prepare_fw_start(void)
|
||||
{
|
||||
/* keep alive to get enough time, stop watchdog */
|
||||
imx233_keep_alive();
|
||||
imx233_rtc_enable_watchdog(false);
|
||||
}
|
||||
|
||||
bool imx233_us_elapsed(uint32_t ref, unsigned us_delay)
|
||||
{
|
||||
uint32_t cur = HW_DIGCTL_MICROSECONDS;
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#define CPUFREQ_MAX IMX233_CPUFREQ_454_MHz
|
||||
#define CPUFREQ_SLEEP IMX233_CPUFREQ_64_MHz
|
||||
|
||||
void system_prepare_fw_start(void);
|
||||
void udelay(unsigned us);
|
||||
bool imx233_us_elapsed(uint32_t ref, unsigned us_delay);
|
||||
void imx233_reset_block(volatile uint32_t *block_reg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue