aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-footbridge
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-footbridge')
-rw-r--r--arch/arm/mach-footbridge/cats-hw.c3
-rw-r--r--arch/arm/mach-footbridge/common.c27
-rw-r--r--arch/arm/mach-footbridge/common.h1
-rw-r--r--arch/arm/mach-footbridge/ebsa285.c1
-rw-r--r--arch/arm/mach-footbridge/include/mach/system.h56
-rw-r--r--arch/arm/mach-footbridge/include/mach/vmalloc.h10
-rw-r--r--arch/arm/mach-footbridge/netwinder-hw.c27
-rw-r--r--arch/arm/mach-footbridge/personal.c1
8 files changed, 59 insertions, 67 deletions
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c
index d5f17854092..25b453601ac 100644
--- a/arch/arm/mach-footbridge/cats-hw.c
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -86,9 +86,10 @@ fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)
86MACHINE_START(CATS, "Chalice-CATS") 86MACHINE_START(CATS, "Chalice-CATS")
87 /* Maintainer: Philip Blundell */ 87 /* Maintainer: Philip Blundell */
88 .atag_offset = 0x100, 88 .atag_offset = 0x100,
89 .soft_reboot = 1, 89 .restart_mode = 's',
90 .fixup = fixup_cats, 90 .fixup = fixup_cats,
91 .map_io = footbridge_map_io, 91 .map_io = footbridge_map_io,
92 .init_irq = footbridge_init_irq, 92 .init_irq = footbridge_init_irq,
93 .timer = &isa_timer, 93 .timer = &isa_timer,
94 .restart = footbridge_restart,
94MACHINE_END 95MACHINE_END
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index 38a44f9b9da..41978ee4f9d 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -199,6 +199,33 @@ void __init footbridge_map_io(void)
199 iotable_init(ebsa285_host_io_desc, ARRAY_SIZE(ebsa285_host_io_desc)); 199 iotable_init(ebsa285_host_io_desc, ARRAY_SIZE(ebsa285_host_io_desc));
200} 200}
201 201
202void footbridge_restart(char mode, const char *cmd)
203{
204 if (mode == 's') {
205 /* Jump into the ROM */
206 soft_restart(0x41000000);
207 } else {
208 /*
209 * Force the watchdog to do a CPU reset.
210 *
211 * After making sure that the watchdog is disabled
212 * (so we can change the timer registers) we first
213 * enable the timer to autoreload itself. Next, the
214 * timer interval is set really short and any
215 * current interrupt request is cleared (so we can
216 * see an edge transition). Finally, TIMER4 is
217 * enabled as the watchdog.
218 */
219 *CSR_SA110_CNTL &= ~(1 << 13);
220 *CSR_TIMER4_CNTL = TIMER_CNTL_ENABLE |
221 TIMER_CNTL_AUTORELOAD |
222 TIMER_CNTL_DIV16;
223 *CSR_TIMER4_LOAD = 0x2;
224 *CSR_TIMER4_CLR = 0;
225 *CSR_SA110_CNTL |= (1 << 13);
226 }
227}
228
202#ifdef CONFIG_FOOTBRIDGE_ADDIN 229#ifdef CONFIG_FOOTBRIDGE_ADDIN
203 230
204static inline unsigned long fb_bus_sdram_offset(void) 231static inline unsigned long fb_bus_sdram_offset(void)
diff --git a/arch/arm/mach-footbridge/common.h b/arch/arm/mach-footbridge/common.h
index b05e662d21a..c9767b892cb 100644
--- a/arch/arm/mach-footbridge/common.h
+++ b/arch/arm/mach-footbridge/common.h
@@ -8,3 +8,4 @@ extern void footbridge_map_io(void);
8extern void footbridge_init_irq(void); 8extern void footbridge_init_irq(void);
9 9
10extern void isa_init_irq(unsigned int irq); 10extern void isa_init_irq(unsigned int irq);
11extern void footbridge_restart(char, const char *);
diff --git a/arch/arm/mach-footbridge/ebsa285.c b/arch/arm/mach-footbridge/ebsa285.c
index 012210cf7d1..27716a7e5fc 100644
--- a/arch/arm/mach-footbridge/ebsa285.c
+++ b/arch/arm/mach-footbridge/ebsa285.c
@@ -21,5 +21,6 @@ MACHINE_START(EBSA285, "EBSA285")
21 .map_io = footbridge_map_io, 21 .map_io = footbridge_map_io,
22 .init_irq = footbridge_init_irq, 22 .init_irq = footbridge_init_irq,
23 .timer = &footbridge_timer, 23 .timer = &footbridge_timer,
24 .restart = footbridge_restart,
24MACHINE_END 25MACHINE_END
25 26
diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
index 0b293156620..a174a5841bc 100644
--- a/arch/arm/mach-footbridge/include/mach/system.h
+++ b/arch/arm/mach-footbridge/include/mach/system.h
@@ -7,63 +7,7 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/io.h>
11#include <asm/hardware/dec21285.h>
12#include <mach/hardware.h>
13#include <asm/leds.h>
14#include <asm/mach-types.h>
15
16static inline void arch_idle(void) 10static inline void arch_idle(void)
17{ 11{
18 cpu_do_idle(); 12 cpu_do_idle();
19} 13}
20
21static inline void arch_reset(char mode, const char *cmd)
22{
23 if (mode == 's') {
24 /*
25 * Jump into the ROM
26 */
27 cpu_reset(0x41000000);
28 } else {
29 if (machine_is_netwinder()) {
30 /* open up the SuperIO chip
31 */
32 outb(0x87, 0x370);
33 outb(0x87, 0x370);
34
35 /* aux function group 1 (logical device 7)
36 */
37 outb(0x07, 0x370);
38 outb(0x07, 0x371);
39
40 /* set GP16 for WD-TIMER output
41 */
42 outb(0xe6, 0x370);
43 outb(0x00, 0x371);
44
45 /* set a RED LED and toggle WD_TIMER for rebooting
46 */
47 outb(0xc4, 0x338);
48 } else {
49 /*
50 * Force the watchdog to do a CPU reset.
51 *
52 * After making sure that the watchdog is disabled
53 * (so we can change the timer registers) we first
54 * enable the timer to autoreload itself. Next, the
55 * timer interval is set really short and any
56 * current interrupt request is cleared (so we can
57 * see an edge transition). Finally, TIMER4 is
58 * enabled as the watchdog.
59 */
60 *CSR_SA110_CNTL &= ~(1 << 13);
61 *CSR_TIMER4_CNTL = TIMER_CNTL_ENABLE |
62 TIMER_CNTL_AUTORELOAD |
63 TIMER_CNTL_DIV16;
64 *CSR_TIMER4_LOAD = 0x2;
65 *CSR_TIMER4_CLR = 0;
66 *CSR_SA110_CNTL |= (1 << 13);
67 }
68 }
69}
diff --git a/arch/arm/mach-footbridge/include/mach/vmalloc.h b/arch/arm/mach-footbridge/include/mach/vmalloc.h
deleted file mode 100644
index 40ba78e5782..00000000000
--- a/arch/arm/mach-footbridge/include/mach/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/vmalloc.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9
10#define VMALLOC_END 0xf0000000UL
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c
index 0d3846f3b60..80a1c5cc907 100644
--- a/arch/arm/mach-footbridge/netwinder-hw.c
+++ b/arch/arm/mach-footbridge/netwinder-hw.c
@@ -645,6 +645,32 @@ fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi)
645#endif 645#endif
646} 646}
647 647
648static void netwinder_restart(char mode, const char *cmd)
649{
650 if (mode == 's') {
651 /* Jump into the ROM */
652 soft_restart(0x41000000);
653 } else {
654 local_irq_disable();
655 local_fiq_disable();
656
657 /* open up the SuperIO chip */
658 outb(0x87, 0x370);
659 outb(0x87, 0x370);
660
661 /* aux function group 1 (logical device 7) */
662 outb(0x07, 0x370);
663 outb(0x07, 0x371);
664
665 /* set GP16 for WD-TIMER output */
666 outb(0xe6, 0x370);
667 outb(0x00, 0x371);
668
669 /* set a RED LED and toggle WD_TIMER for rebooting */
670 outb(0xc4, 0x338);
671 }
672}
673
648MACHINE_START(NETWINDER, "Rebel-NetWinder") 674MACHINE_START(NETWINDER, "Rebel-NetWinder")
649 /* Maintainer: Russell King/Rebel.com */ 675 /* Maintainer: Russell King/Rebel.com */
650 .atag_offset = 0x100, 676 .atag_offset = 0x100,
@@ -656,4 +682,5 @@ MACHINE_START(NETWINDER, "Rebel-NetWinder")
656 .map_io = footbridge_map_io, 682 .map_io = footbridge_map_io,
657 .init_irq = footbridge_init_irq, 683 .init_irq = footbridge_init_irq,
658 .timer = &isa_timer, 684 .timer = &isa_timer,
685 .restart = netwinder_restart,
659MACHINE_END 686MACHINE_END
diff --git a/arch/arm/mach-footbridge/personal.c b/arch/arm/mach-footbridge/personal.c
index f41dba39b32..e1e9990fa95 100644
--- a/arch/arm/mach-footbridge/personal.c
+++ b/arch/arm/mach-footbridge/personal.c
@@ -19,5 +19,6 @@ MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer")
19 .map_io = footbridge_map_io, 19 .map_io = footbridge_map_io,
20 .init_irq = footbridge_init_irq, 20 .init_irq = footbridge_init_irq,
21 .timer = &footbridge_timer, 21 .timer = &footbridge_timer,
22 .restart = footbridge_restart,
22MACHINE_END 23MACHINE_END
23 24