summaryrefslogtreecommitdiff
path: root/arch/arm/mach-realview/realview_pbx.c
diff options
context:
space:
mode:
authorColin Tuckley <colin.tuckley@arm.com>2010-01-11 11:09:15 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-01-11 15:39:21 +0000
commit4c9f8be7dab831c78b5f491739fc5cd01f2efb03 (patch)
treefa023e7c6a1d540b645f0d4d237f710a413058a9 /arch/arm/mach-realview/realview_pbx.c
parent62a8c5bcb547c0aca1c3af810695dfb9b25e5351 (diff)
downloadlinux-rt-4c9f8be7dab831c78b5f491739fc5cd01f2efb03.tar.gz
ARM: 5873/1: ARM: Fix the reset logic for ARM RealView boards
Extend the patch from Philby John to the other "RealView" boards. Rename the constants and offsets to reflect their actual functions. Cc: Philby John <pjohn@in.mvista.com> Signed-off-by: Colin Tuckley <colin.tuckley@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview/realview_pbx.c')
-rw-r--r--arch/arm/mach-realview/realview_pbx.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index ec39488e2b42..a21a4b395f73 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -324,6 +324,20 @@ static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags,
#endif
}
+static void realview_pbx_reset(char mode)
+{
+ void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
+ void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
+
+ /*
+ * To reset, we hit the on-board reset register
+ * in the system FPGA
+ */
+ __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
+ __raw_writel(0x0000, reset_ctrl);
+ __raw_writel(0x0004, reset_ctrl);
+}
+
static void __init realview_pbx_init(void)
{
int i;
@@ -358,6 +372,7 @@ static void __init realview_pbx_init(void)
#ifdef CONFIG_LEDS
leds_event = realview_leds_event;
#endif
+ realview_reset = realview_pbx_reset;
}
MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")