mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-13 21:36:57 +00:00
imx8m: restrict reset_cpu
Make reset_cpu only visible when CONFIG_SYSRESET not defined or CONFIG_SPL_BUILD. Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
0528ba0e1c
commit
d2041725e8
1 changed files with 13 additions and 8 deletions
|
@ -301,16 +301,21 @@ int ft_system_setup(void *blob, bd_t *bd)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SYSRESET)
|
||||
void reset_cpu(ulong addr)
|
||||
{
|
||||
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
|
||||
struct watchdog_regs *wdog = (struct watchdog_regs *)addr;
|
||||
|
||||
/* Clear WDA to trigger WDOG_B immediately */
|
||||
writew((WCR_WDE | WCR_SRS), &wdog->wcr);
|
||||
if (!addr)
|
||||
wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
|
||||
|
||||
while (1) {
|
||||
/*
|
||||
* spin for .5 seconds before reset
|
||||
*/
|
||||
}
|
||||
/* Clear WDA to trigger WDOG_B immediately */
|
||||
writew((WCR_WDE | WCR_SRS), &wdog->wcr);
|
||||
|
||||
while (1) {
|
||||
/*
|
||||
* spin for .5 seconds before reset
|
||||
*/
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue