Skip to content
Snippets Groups Projects
Commit 9d16c52f authored by Dirk Behme's avatar Dirk Behme Committed by Stefano Babic
Browse files

mx6: soc: Switch to cold reset


Disable the warm reset and enable the cold reset for a more reliable
restart ('reset'). This is taken from the Linux kernel, see imx_src_init()
in arch/arm/mach-imx/src.c.

Signed-off-by: default avatarDirk Behme <dirk.behme@de.bosch.com>
parent 0c1842a0
No related branches found
No related tags found
No related merge requests found
...@@ -288,6 +288,22 @@ static void set_preclk_from_osc(void) ...@@ -288,6 +288,22 @@ static void set_preclk_from_osc(void)
} }
#endif #endif
#define SRC_SCR_WARM_RESET_ENABLE 0
static void init_src(void)
{
struct src *src_regs = (struct src *)SRC_BASE_ADDR;
u32 val;
/*
* force warm reset sources to generate cold reset
* for a more reliable restart
*/
val = readl(&src_regs->scr);
val &= ~(1 << SRC_SCR_WARM_RESET_ENABLE);
writel(val, &src_regs->scr);
}
int arch_cpu_init(void) int arch_cpu_init(void)
{ {
init_aips(); init_aips();
...@@ -322,6 +338,8 @@ int arch_cpu_init(void) ...@@ -322,6 +338,8 @@ int arch_cpu_init(void)
mxs_dma_init(); mxs_dma_init();
#endif #endif
init_src();
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment