Skip to content
Snippets Groups Projects
Commit bbdcc113 authored by Peng Fan's avatar Peng Fan Committed by Troy Kisky
Browse files

imx8m: restrict reset_cpu


Make reset_cpu only visible when CONFIG_SYSRESET not defined
or CONFIG_SPL_BUILD.

Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
parent 96083820
No related branches found
No related tags found
No related merge requests found
......@@ -471,19 +471,24 @@ usb_modify_speed:
}
#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
#if defined(CONFIG_ARCH_MISC_INIT)
#define FSL_SIP_BUILDINFO 0xC2000003
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment