summaryrefslogtreecommitdiff
path: root/arch/arm/mach-versatile/core.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-11-03 11:43:08 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 12:57:20 +0000
commitb56a7c6b36388b3eca887bd5d24f297e63e5bb5b (patch)
tree5f97c95382475d21a0f39d68f7b1be93c7dc6b22 /arch/arm/mach-versatile/core.c
parent7e3974b2f3e393abcf7934f020e26d3d22efa940 (diff)
ARM: restart: versatile: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-versatile/core.c')
-rw-r--r--arch/arm/mach-versatile/core.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index e340a54251df..b7a6a4b1a1de 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -745,6 +745,19 @@ static void versatile_leds_event(led_event_t ledevt)
}
#endif /* CONFIG_LEDS */
+void versatile_restart(char mode, const char *cmd)
+{
+ void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
+ u32 val;
+
+ val = __raw_readl(sys + VERSATILE_SYS_RESETCTL_OFFSET);
+ val |= 0x105;
+
+ __raw_writel(0xa05f, sys + VERSATILE_SYS_LOCK_OFFSET);
+ __raw_writel(val, sys + VERSATILE_SYS_RESETCTL_OFFSET);
+ __raw_writel(0, sys + VERSATILE_SYS_LOCK_OFFSET);
+}
+
/* Early initializations */
void __init versatile_init_early(void)
{