aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-11-03 10:00:13 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 07:57:18 -0500
commit47cacdd4ed95d18e5cc28b46d8835c96a9cadfb3 (patch)
treeff4e79d2644c0d78ba89f731477df121308844bc /arch
parent271a74fc875210d3dfcc03d557fb5d86d3990a0f (diff)
ARM: restart: realview: 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')
-rw-r--r--arch/arm/mach-realview/core.h1
-rw-r--r--arch/arm/mach-realview/include/mach/system.h13
-rw-r--r--arch/arm/mach-realview/realview_eb.c5
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c5
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c5
-rw-r--r--arch/arm/mach-realview/realview_pba8.c5
-rw-r--r--arch/arm/mach-realview/realview_pbx.c5
7 files changed, 15 insertions, 24 deletions
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 47259c89a75e..735b57aaf2d6 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -65,6 +65,5 @@ extern int realview_usb_register(struct resource *res);
65extern void realview_init_early(void); 65extern void realview_init_early(void);
66extern void realview_fixup(struct tag *tags, char **from, 66extern void realview_fixup(struct tag *tags, char **from,
67 struct meminfo *meminfo); 67 struct meminfo *meminfo);
68extern void (*realview_reset)(char);
69 68
70#endif 69#endif
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h
index 6657ff231161..1630766eeb5c 100644
--- a/arch/arm/mach-realview/include/mach/system.h
+++ b/arch/arm/mach-realview/include/mach/system.h
@@ -21,12 +21,6 @@
21#ifndef __ASM_ARCH_SYSTEM_H 21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H 22#define __ASM_ARCH_SYSTEM_H
23 23
24#include <linux/io.h>
25#include <mach/hardware.h>
26#include <mach/platform.h>
27
28void (*realview_reset)(char mode);
29
30static inline void arch_idle(void) 24static inline void arch_idle(void)
31{ 25{
32 /* 26 /*
@@ -38,13 +32,6 @@ static inline void arch_idle(void)
38 32
39static inline void arch_reset(char mode, const char *cmd) 33static inline void arch_reset(char mode, const char *cmd)
40{ 34{
41 /*
42 * To reset, we hit the on-board reset register
43 * in the system FPGA
44 */
45 if (realview_reset)
46 realview_reset(mode);
47 dsb();
48} 35}
49 36
50#endif 37#endif
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 026c66ad7ec2..4b796241dd76 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -415,7 +415,7 @@ static struct sys_timer realview_eb_timer = {
415 .init = realview_eb_timer_init, 415 .init = realview_eb_timer_init,
416}; 416};
417 417
418static void realview_eb_reset(char mode) 418static void realview_eb_restart(char mode, const char *cmd)
419{ 419{
420 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 420 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
421 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 421 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -427,6 +427,7 @@ static void realview_eb_reset(char mode)
427 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); 427 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
428 if (core_tile_eb11mp()) 428 if (core_tile_eb11mp())
429 __raw_writel(0x0008, reset_ctrl); 429 __raw_writel(0x0008, reset_ctrl);
430 dsb();
430} 431}
431 432
432static void __init realview_eb_init(void) 433static void __init realview_eb_init(void)
@@ -458,7 +459,6 @@ static void __init realview_eb_init(void)
458#ifdef CONFIG_LEDS 459#ifdef CONFIG_LEDS
459 leds_event = realview_leds_event; 460 leds_event = realview_leds_event;
460#endif 461#endif
461 realview_reset = realview_eb_reset;
462} 462}
463 463
464MACHINE_START(REALVIEW_EB, "ARM-RealView EB") 464MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
@@ -473,4 +473,5 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
473#ifdef CONFIG_ZONE_DMA 473#ifdef CONFIG_ZONE_DMA
474 .dma_zone_size = SZ_256M, 474 .dma_zone_size = SZ_256M,
475#endif 475#endif
476 .restart = realview_eb_restart,
476MACHINE_END 477MACHINE_END
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index c057540ec776..09e630bfa446 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -336,12 +336,13 @@ static struct sys_timer realview_pb1176_timer = {
336 .init = realview_pb1176_timer_init, 336 .init = realview_pb1176_timer_init,
337}; 337};
338 338
339static void realview_pb1176_reset(char mode) 339static void realview_pb1176_restart(char mode, const char *cmd)
340{ 340{
341 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 341 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
342 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 342 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
343 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); 343 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
344 __raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl); 344 __raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl);
345 dsb();
345} 346}
346 347
347static void realview_pb1176_fixup(struct tag *tags, char **from, 348static void realview_pb1176_fixup(struct tag *tags, char **from,
@@ -381,7 +382,6 @@ static void __init realview_pb1176_init(void)
381#ifdef CONFIG_LEDS 382#ifdef CONFIG_LEDS
382 leds_event = realview_leds_event; 383 leds_event = realview_leds_event;
383#endif 384#endif
384 realview_reset = realview_pb1176_reset;
385} 385}
386 386
387MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") 387MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
@@ -396,4 +396,5 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
396#ifdef CONFIG_ZONE_DMA 396#ifdef CONFIG_ZONE_DMA
397 .dma_zone_size = SZ_256M, 397 .dma_zone_size = SZ_256M,
398#endif 398#endif
399 .restart = realview_pb1176_restart,
399MACHINE_END 400MACHINE_END
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 671ad6d6ff00..e38e85b6472d 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -315,7 +315,7 @@ static struct sys_timer realview_pb11mp_timer = {
315 .init = realview_pb11mp_timer_init, 315 .init = realview_pb11mp_timer_init,
316}; 316};
317 317
318static void realview_pb11mp_reset(char mode) 318static void realview_pb11mp_restart(char mode, const char *cmd)
319{ 319{
320 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 320 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
321 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 321 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -327,6 +327,7 @@ static void realview_pb11mp_reset(char mode)
327 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); 327 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
328 __raw_writel(0x0000, reset_ctrl); 328 __raw_writel(0x0000, reset_ctrl);
329 __raw_writel(0x0004, reset_ctrl); 329 __raw_writel(0x0004, reset_ctrl);
330 dsb();
330} 331}
331 332
332static void __init realview_pb11mp_init(void) 333static void __init realview_pb11mp_init(void)
@@ -355,7 +356,6 @@ static void __init realview_pb11mp_init(void)
355#ifdef CONFIG_LEDS 356#ifdef CONFIG_LEDS
356 leds_event = realview_leds_event; 357 leds_event = realview_leds_event;
357#endif 358#endif
358 realview_reset = realview_pb11mp_reset;
359} 359}
360 360
361MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") 361MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
@@ -370,4 +370,5 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
370#ifdef CONFIG_ZONE_DMA 370#ifdef CONFIG_ZONE_DMA
371 .dma_zone_size = SZ_256M, 371 .dma_zone_size = SZ_256M,
372#endif 372#endif
373 .restart = realview_pb11mp_restart,
373MACHINE_END 374MACHINE_END
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index cbf22df4ad5b..04d1e4953090 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -271,7 +271,7 @@ static struct sys_timer realview_pba8_timer = {
271 .init = realview_pba8_timer_init, 271 .init = realview_pba8_timer_init,
272}; 272};
273 273
274static void realview_pba8_reset(char mode) 274static void realview_pba8_restart(char mode, const char *cmd)
275{ 275{
276 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 276 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
277 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 277 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -283,6 +283,7 @@ static void realview_pba8_reset(char mode)
283 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); 283 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
284 __raw_writel(0x0000, reset_ctrl); 284 __raw_writel(0x0000, reset_ctrl);
285 __raw_writel(0x0004, reset_ctrl); 285 __raw_writel(0x0004, reset_ctrl);
286 dsb();
286} 287}
287 288
288static void __init realview_pba8_init(void) 289static void __init realview_pba8_init(void)
@@ -305,7 +306,6 @@ static void __init realview_pba8_init(void)
305#ifdef CONFIG_LEDS 306#ifdef CONFIG_LEDS
306 leds_event = realview_leds_event; 307 leds_event = realview_leds_event;
307#endif 308#endif
308 realview_reset = realview_pba8_reset;
309} 309}
310 310
311MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") 311MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
@@ -320,4 +320,5 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
320#ifdef CONFIG_ZONE_DMA 320#ifdef CONFIG_ZONE_DMA
321 .dma_zone_size = SZ_256M, 321 .dma_zone_size = SZ_256M,
322#endif 322#endif
323 .restart = realview_pba8_restart,
323MACHINE_END 324MACHINE_END
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 63c4114afae9..d515452323ab 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -339,7 +339,7 @@ static void realview_pbx_fixup(struct tag *tags, char **from,
339#endif 339#endif
340} 340}
341 341
342static void realview_pbx_reset(char mode) 342static void realview_pbx_restart(char mode, const char *cmd)
343{ 343{
344 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 344 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
345 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 345 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -351,6 +351,7 @@ static void realview_pbx_reset(char mode)
351 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); 351 __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
352 __raw_writel(0x00F0, reset_ctrl); 352 __raw_writel(0x00F0, reset_ctrl);
353 __raw_writel(0x00F4, reset_ctrl); 353 __raw_writel(0x00F4, reset_ctrl);
354 dsb();
354} 355}
355 356
356static void __init realview_pbx_init(void) 357static void __init realview_pbx_init(void)
@@ -388,7 +389,6 @@ static void __init realview_pbx_init(void)
388#ifdef CONFIG_LEDS 389#ifdef CONFIG_LEDS
389 leds_event = realview_leds_event; 390 leds_event = realview_leds_event;
390#endif 391#endif
391 realview_reset = realview_pbx_reset;
392} 392}
393 393
394MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") 394MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
@@ -403,4 +403,5 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
403#ifdef CONFIG_ZONE_DMA 403#ifdef CONFIG_ZONE_DMA
404 .dma_zone_size = SZ_256M, 404 .dma_zone_size = SZ_256M,
405#endif 405#endif
406 .restart = realview_pbx_restart,
406MACHINE_END 407MACHINE_END