aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview/realview_pbx.c
diff options
context:
space:
mode:
authorColin Tuckley <colin.tuckley@arm.com>2010-01-11 05:09:15 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-01-11 10:39:21 -0500
commit4c9f8be7dab831c78b5f491739fc5cd01f2efb03 (patch)
treefa023e7c6a1d540b645f0d4d237f710a413058a9 /arch/arm/mach-realview/realview_pbx.c
parent62a8c5bcb547c0aca1c3af810695dfb9b25e5351 (diff)
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,
324#endif 324#endif
325} 325}
326 326
327static void realview_pbx_reset(char mode)
328{
329 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
330 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
331
332 /*
333 * To reset, we hit the on-board reset register
334 * in the system FPGA
335 */
336 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
337 __raw_writel(0x0000, reset_ctrl);
338 __raw_writel(0x0004, reset_ctrl);
339}
340
327static void __init realview_pbx_init(void) 341static void __init realview_pbx_init(void)
328{ 342{
329 int i; 343 int i;
@@ -358,6 +372,7 @@ static void __init realview_pbx_init(void)
358#ifdef CONFIG_LEDS 372#ifdef CONFIG_LEDS
359 leds_event = realview_leds_event; 373 leds_event = realview_leds_event;
360#endif 374#endif
375 realview_reset = realview_pbx_reset;
361} 376}
362 377
363MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") 378MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")