forked from len0rd/rockbox
hwstub/stmp: disable watchdog
Some targets like Sony NWZ use a watchdog, so we must disable it to prevent spurious reboot when we take over Change-Id: I138a8d7f9a1b089acb2d08d7f6c4a58e8b088b3a
This commit is contained in:
parent
3bbe52bb85
commit
8666871cb3
1 changed files with 11 additions and 0 deletions
|
|
@ -168,6 +168,15 @@ void clkctrl_reset(void)
|
||||||
|
|
||||||
#define HW_USBPHY_CTRL (*(volatile uint32_t *)(HW_USBPHY_BASE + 0x30))
|
#define HW_USBPHY_CTRL (*(volatile uint32_t *)(HW_USBPHY_BASE + 0x30))
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* RTC
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define HW_RTC_BASE 0x8005C000
|
||||||
|
#define HW_RTC_CTRL (*(volatile uint32_t *)(HW_RTC_BASE + 0))
|
||||||
|
#define HW_RTC_CTRL__WATCHDOGEN (1 << 4)
|
||||||
|
|
||||||
void target_init(void)
|
void target_init(void)
|
||||||
{
|
{
|
||||||
/* detect family */
|
/* detect family */
|
||||||
|
|
@ -194,6 +203,8 @@ void target_init(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
logf("cannot identify family: 0x%x\n", product_code);
|
logf("cannot identify family: 0x%x\n", product_code);
|
||||||
|
/* disable watchdog */
|
||||||
|
__REG_CLR(HW_RTC_CTRL) = HW_RTC_CTRL__WATCHDOGEN;
|
||||||
|
|
||||||
if(g_stmp_family == STMP3600)
|
if(g_stmp_family == STMP3600)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue