From 6a7d2c625656df5f8ad6e33aa3d164eefb1df8dc Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 27 Aug 2013 21:15:02 +0100 Subject: ARM: 7828/1: ARMv7-M: implement restart routine common to all v7-M machines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The newly introduced function is to be used as .restart callback for ARMv7-M machines. The used register is architecturally defined, so it should work for all M-class machines. Acked-by: Jonathan Austin Signed-off-by: Uwe Kleine-König Signed-off-by: Russell King --- arch/arm/include/asm/v7m.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/include/asm') diff --git a/arch/arm/include/asm/v7m.h b/arch/arm/include/asm/v7m.h index fa88d09fa3d..615781c6162 100644 --- a/arch/arm/include/asm/v7m.h +++ b/arch/arm/include/asm/v7m.h @@ -15,6 +15,10 @@ #define V7M_SCB_VTOR 0x08 +#define V7M_SCB_AIRCR 0x0c +#define V7M_SCB_AIRCR_VECTKEY (0x05fa << 16) +#define V7M_SCB_AIRCR_SYSRESETREQ (1 << 2) + #define V7M_SCB_SCR 0x10 #define V7M_SCB_SCR_SLEEPDEEP (1 << 2) @@ -42,3 +46,11 @@ */ #define EXC_RET_STACK_MASK 0x00000004 #define EXC_RET_THREADMODE_PROCESSSTACK 0xfffffffd + +#ifndef __ASSEMBLY__ + +enum reboot_mode; + +void armv7m_restart(enum reboot_mode mode, const char *cmd); + +#endif /* __ASSEMBLY__ */ -- cgit v1.2.3-70-g09d2