mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
imx233: always disable watchdog on boot
Change-Id: I2e81b038b783968aa18ef3398d6e2aa66a2fee7c
This commit is contained in:
parent
0ba4c3b078
commit
55877f442a
1 changed files with 19 additions and 5 deletions
|
|
@ -37,11 +37,6 @@ struct imx233_rtc_info_t
|
|||
bool alarm_en, alarm_wake_en, alarm_wake, alarm_irq;
|
||||
};
|
||||
|
||||
static inline void imx233_rtc_init(void)
|
||||
{
|
||||
BF_CLR(RTC_CTRL, CLKGATE);
|
||||
}
|
||||
|
||||
static inline uint32_t imx233_rtc_read_seconds(void)
|
||||
{
|
||||
return HW_RTC_SECONDS;
|
||||
|
|
@ -71,6 +66,25 @@ static inline uint32_t imx233_rtc_read_alarm(void)
|
|||
return HW_RTC_ALARM;
|
||||
}
|
||||
|
||||
static inline void imx233_rtc_enable_watchdog(bool en)
|
||||
{
|
||||
if(en)
|
||||
BF_SET(RTC_CTRL, WATCHDOGEN);
|
||||
else
|
||||
BF_CLR(RTC_CTRL, WATCHDOGEN);
|
||||
}
|
||||
|
||||
static inline void imx233_rtc_reset_watchdog(uint32_t ms)
|
||||
{
|
||||
HW_RTC_WATCHDOG = ms;
|
||||
}
|
||||
|
||||
static inline void imx233_rtc_init(void)
|
||||
{
|
||||
BF_CLR(RTC_CTRL, CLKGATE);
|
||||
imx233_rtc_enable_watchdog(false);
|
||||
}
|
||||
|
||||
void imx233_rtc_write_seconds(uint32_t seconds);
|
||||
void imx233_rtc_write_persistent(int idx, uint32_t val);
|
||||
void imx233_rtc_write_alarm(uint32_t seconds);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue