From 0c1842a01f2b5383064b81862fcbc438146497fa Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 4 Mar 2015 21:33:15 +0800 Subject: imx:mx6 remove duplicated includes There is no need to include asm/bootm.h twice, so remove one. Signed-off-by: Peng Fan --- arch/arm/cpu/armv7/mx6/soc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/cpu') diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index ef029722b4..b354f700e7 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include -- cgit From 9d16c52f62a4cd017ac3530002ccc8ea9ffde58f Mon Sep 17 00:00:00 2001 From: Dirk Behme Date: Mon, 9 Mar 2015 14:48:48 +0100 Subject: 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: Dirk Behme --- arch/arm/cpu/armv7/mx6/soc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'arch/arm/cpu') diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index b354f700e7..dd34138896 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -288,6 +288,22 @@ static void set_preclk_from_osc(void) } #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) { init_aips(); @@ -322,6 +338,8 @@ int arch_cpu_init(void) mxs_dma_init(); #endif + init_src(); + return 0; } -- cgit