diff options
-rw-r--r-- | arch/arm/mach-realview/include/mach/board-pb1176.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/platform.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb1176.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb11mp.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pba8.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pbx.c | 15 |
7 files changed, 57 insertions, 15 deletions
diff --git a/arch/arm/mach-realview/include/mach/board-pb1176.h b/arch/arm/mach-realview/include/mach/board-pb1176.h index 34b80b7d40b8..2f5ccb298858 100644 --- a/arch/arm/mach-realview/include/mach/board-pb1176.h +++ b/arch/arm/mach-realview/include/mach/board-pb1176.h | |||
@@ -74,8 +74,8 @@ | |||
74 | #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */ | 74 | #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */ |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * Control register SYS_RESETCTL is set to 1 to force a soft reset | 77 | * Control register SYS_RESETCTL Bit 8 is set to 1 to force a soft reset |
78 | */ | 78 | */ |
79 | #define REALVIEW_PB1176_SYS_LOCKVAL_RSTCTL 0x0100 | 79 | #define REALVIEW_PB1176_SYS_SOFT_RESET 0x0100 |
80 | 80 | ||
81 | #endif /* __ASM_ARCH_BOARD_PB1176_H */ | 81 | #endif /* __ASM_ARCH_BOARD_PB1176_H */ |
diff --git a/arch/arm/mach-realview/include/mach/platform.h b/arch/arm/mach-realview/include/mach/platform.h index 4f46bf71e752..86c0c4435a46 100644 --- a/arch/arm/mach-realview/include/mach/platform.h +++ b/arch/arm/mach-realview/include/mach/platform.h | |||
@@ -140,7 +140,7 @@ | |||
140 | * SYS_CLD, SYS_BOOTCS | 140 | * SYS_CLD, SYS_BOOTCS |
141 | */ | 141 | */ |
142 | #define REALVIEW_SYS_LOCK_LOCKED (1 << 16) | 142 | #define REALVIEW_SYS_LOCK_LOCKED (1 << 16) |
143 | #define REALVIEW_SYS_LOCKVAL_MASK 0xA05F /* Enable write access */ | 143 | #define REALVIEW_SYS_LOCK_VAL 0xA05F /* Enable write access */ |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * REALVIEW_SYS_FLASH | 146 | * REALVIEW_SYS_FLASH |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 917f8ca3abff..7d857d300558 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -381,6 +381,20 @@ static struct sys_timer realview_eb_timer = { | |||
381 | .init = realview_eb_timer_init, | 381 | .init = realview_eb_timer_init, |
382 | }; | 382 | }; |
383 | 383 | ||
384 | static void realview_eb_reset(char mode) | ||
385 | { | ||
386 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | ||
387 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | ||
388 | |||
389 | /* | ||
390 | * To reset, we hit the on-board reset register | ||
391 | * in the system FPGA | ||
392 | */ | ||
393 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); | ||
394 | if (core_tile_eb11mp()) | ||
395 | __raw_writel(0x0008, reset_ctrl); | ||
396 | } | ||
397 | |||
384 | static void __init realview_eb_init(void) | 398 | static void __init realview_eb_init(void) |
385 | { | 399 | { |
386 | int i; | 400 | int i; |
@@ -408,6 +422,7 @@ static void __init realview_eb_init(void) | |||
408 | #ifdef CONFIG_LEDS | 422 | #ifdef CONFIG_LEDS |
409 | leds_event = realview_leds_event; | 423 | leds_event = realview_leds_event; |
410 | #endif | 424 | #endif |
425 | realview_reset = realview_eb_reset; | ||
411 | } | 426 | } |
412 | 427 | ||
413 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | 428 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 7fb726d5f8b9..44392e51dd50 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -292,12 +292,10 @@ static struct sys_timer realview_pb1176_timer = { | |||
292 | 292 | ||
293 | static void realview_pb1176_reset(char mode) | 293 | static void realview_pb1176_reset(char mode) |
294 | { | 294 | { |
295 | void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + | 295 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); |
296 | REALVIEW_SYS_RESETCTL_OFFSET; | 296 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); |
297 | void __iomem *rst_hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + | 297 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); |
298 | REALVIEW_SYS_LOCK_OFFSET; | 298 | __raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl); |
299 | __raw_writel(REALVIEW_SYS_LOCKVAL_MASK, rst_hdr_ctrl); | ||
300 | __raw_writel(REALVIEW_PB1176_SYS_LOCKVAL_RSTCTL, hdr_ctrl); | ||
301 | } | 299 | } |
302 | 300 | ||
303 | static void realview_pb1176_fixup(struct machine_desc *mdesc, | 301 | static void realview_pb1176_fixup(struct machine_desc *mdesc, |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 9bbbfc05f225..3e02731af959 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -301,17 +301,16 @@ static struct sys_timer realview_pb11mp_timer = { | |||
301 | 301 | ||
302 | static void realview_pb11mp_reset(char mode) | 302 | static void realview_pb11mp_reset(char mode) |
303 | { | 303 | { |
304 | void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + | 304 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); |
305 | REALVIEW_SYS_RESETCTL_OFFSET; | 305 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); |
306 | unsigned int val; | ||
307 | 306 | ||
308 | /* | 307 | /* |
309 | * To reset, we hit the on-board reset register | 308 | * To reset, we hit the on-board reset register |
310 | * in the system FPGA | 309 | * in the system FPGA |
311 | */ | 310 | */ |
312 | val = __raw_readl(hdr_ctrl); | 311 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); |
313 | val |= REALVIEW_PB11MP_SYS_CTRL_RESET_CONFIGCLR; | 312 | __raw_writel(0x0000, reset_ctrl); |
314 | __raw_writel(val, hdr_ctrl); | 313 | __raw_writel(0x0004, reset_ctrl); |
315 | } | 314 | } |
316 | 315 | ||
317 | static void __init realview_pb11mp_init(void) | 316 | static void __init realview_pb11mp_init(void) |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index fe861e96c566..fe4e25c4201a 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -272,6 +272,20 @@ static struct sys_timer realview_pba8_timer = { | |||
272 | .init = realview_pba8_timer_init, | 272 | .init = realview_pba8_timer_init, |
273 | }; | 273 | }; |
274 | 274 | ||
275 | static void realview_pba8_reset(char mode) | ||
276 | { | ||
277 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | ||
278 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | ||
279 | |||
280 | /* | ||
281 | * To reset, we hit the on-board reset register | ||
282 | * in the system FPGA | ||
283 | */ | ||
284 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); | ||
285 | __raw_writel(0x0000, reset_ctrl); | ||
286 | __raw_writel(0x0004, reset_ctrl); | ||
287 | } | ||
288 | |||
275 | static void __init realview_pba8_init(void) | 289 | static void __init realview_pba8_init(void) |
276 | { | 290 | { |
277 | int i; | 291 | int i; |
@@ -291,6 +305,7 @@ static void __init realview_pba8_init(void) | |||
291 | #ifdef CONFIG_LEDS | 305 | #ifdef CONFIG_LEDS |
292 | leds_event = realview_leds_event; | 306 | leds_event = realview_leds_event; |
293 | #endif | 307 | #endif |
308 | realview_reset = realview_pba8_reset; | ||
294 | } | 309 | } |
295 | 310 | ||
296 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") | 311 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") |
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 | ||
327 | static 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 | |||
327 | static void __init realview_pbx_init(void) | 341 | static 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 | ||
363 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") | 378 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") |