diff options
author | Stefan Roese <sr@denx.de> | 2008-03-27 10:43:31 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2008-04-02 21:44:56 -0400 |
commit | 93173ce272e54f81460986ff5040d16ab79488a9 (patch) | |
tree | 7bb4e15ac4cf3853f81e358fb1b21aa2fef6b4ce | |
parent | d2477b5cc8ca95b8c15133ffbbebf0bd9783f560 (diff) |
[POWERPC] 4xx: Create common ppc4xx_reset_system() in ppc4xx_soc.c
This patch creates a common system reset routine for all 40x and 44x
systems. Previously only a 44x routine existed. But since this system
reset via the debug control register is common for 40x and 44x let's
share this code for all those platforms in ppc4xx_soc.c.
This patch also enables CONFIG_4xx_SOC for all 40x and 44x platforms.
Tested on Kilauea (405EX) and Canyonlands (440EX).
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
-rw-r--r-- | arch/powerpc/platforms/40x/ep405.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/40x/kilauea.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/40x/makalu.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/40x/virtex.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/40x/walnut.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/44x.h | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/bamboo.c | 15 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/canyonlands.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/ebony.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/katmai.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/misc_44x.S | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/rainier.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/sequoia.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/taishan.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/warp.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/Kconfig.cputype | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/ppc4xx_soc.c | 11 | ||||
-rw-r--r-- | include/asm-powerpc/ppc4xx.h | 18 |
19 files changed, 64 insertions, 43 deletions
diff --git a/arch/powerpc/platforms/40x/ep405.c b/arch/powerpc/platforms/40x/ep405.c index 13d1345026da..ae2e7f67c18e 100644 --- a/arch/powerpc/platforms/40x/ep405.c +++ b/arch/powerpc/platforms/40x/ep405.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/time.h> | 29 | #include <asm/time.h> |
30 | #include <asm/uic.h> | 30 | #include <asm/uic.h> |
31 | #include <asm/pci-bridge.h> | 31 | #include <asm/pci-bridge.h> |
32 | #include <asm/ppc4xx.h> | ||
32 | 33 | ||
33 | static struct device_node *bcsr_node; | 34 | static struct device_node *bcsr_node; |
34 | static void __iomem *bcsr_regs; | 35 | static void __iomem *bcsr_regs; |
@@ -119,5 +120,6 @@ define_machine(ep405) { | |||
119 | .progress = udbg_progress, | 120 | .progress = udbg_progress, |
120 | .init_IRQ = uic_init_tree, | 121 | .init_IRQ = uic_init_tree, |
121 | .get_irq = uic_get_irq, | 122 | .get_irq = uic_get_irq, |
123 | .restart = ppc4xx_reset_system, | ||
122 | .calibrate_decr = generic_calibrate_decr, | 124 | .calibrate_decr = generic_calibrate_decr, |
123 | }; | 125 | }; |
diff --git a/arch/powerpc/platforms/40x/kilauea.c b/arch/powerpc/platforms/40x/kilauea.c index f9206a7fede0..1dd24ffc0dc1 100644 --- a/arch/powerpc/platforms/40x/kilauea.c +++ b/arch/powerpc/platforms/40x/kilauea.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Kilauea board specific routines | 2 | * Kilauea board specific routines |
3 | * | 3 | * |
4 | * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de> | 4 | * Copyright 2007-2008 DENX Software Engineering, Stefan Roese <sr@denx.de> |
5 | * | 5 | * |
6 | * Based on the Walnut code by | 6 | * Based on the Walnut code by |
7 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | 7 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> |
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/time.h> | 20 | #include <asm/time.h> |
21 | #include <asm/uic.h> | 21 | #include <asm/uic.h> |
22 | #include <asm/pci-bridge.h> | 22 | #include <asm/pci-bridge.h> |
23 | #include <asm/ppc4xx.h> | ||
23 | 24 | ||
24 | static __initdata struct of_device_id kilauea_of_bus[] = { | 25 | static __initdata struct of_device_id kilauea_of_bus[] = { |
25 | { .compatible = "ibm,plb4", }, | 26 | { .compatible = "ibm,plb4", }, |
@@ -54,5 +55,6 @@ define_machine(kilauea) { | |||
54 | .progress = udbg_progress, | 55 | .progress = udbg_progress, |
55 | .init_IRQ = uic_init_tree, | 56 | .init_IRQ = uic_init_tree, |
56 | .get_irq = uic_get_irq, | 57 | .get_irq = uic_get_irq, |
58 | .restart = ppc4xx_reset_system, | ||
57 | .calibrate_decr = generic_calibrate_decr, | 59 | .calibrate_decr = generic_calibrate_decr, |
58 | }; | 60 | }; |
diff --git a/arch/powerpc/platforms/40x/makalu.c b/arch/powerpc/platforms/40x/makalu.c index 4e4df72fc9cd..a6a1d6017b71 100644 --- a/arch/powerpc/platforms/40x/makalu.c +++ b/arch/powerpc/platforms/40x/makalu.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/time.h> | 20 | #include <asm/time.h> |
21 | #include <asm/uic.h> | 21 | #include <asm/uic.h> |
22 | #include <asm/pci-bridge.h> | 22 | #include <asm/pci-bridge.h> |
23 | #include <asm/ppc4xx.h> | ||
23 | 24 | ||
24 | static __initdata struct of_device_id makalu_of_bus[] = { | 25 | static __initdata struct of_device_id makalu_of_bus[] = { |
25 | { .compatible = "ibm,plb4", }, | 26 | { .compatible = "ibm,plb4", }, |
@@ -54,5 +55,6 @@ define_machine(makalu) { | |||
54 | .progress = udbg_progress, | 55 | .progress = udbg_progress, |
55 | .init_IRQ = uic_init_tree, | 56 | .init_IRQ = uic_init_tree, |
56 | .get_irq = uic_get_irq, | 57 | .get_irq = uic_get_irq, |
58 | .restart = ppc4xx_reset_system, | ||
57 | .calibrate_decr = generic_calibrate_decr, | 59 | .calibrate_decr = generic_calibrate_decr, |
58 | }; | 60 | }; |
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c index 0422590040db..fc7fb001276c 100644 --- a/arch/powerpc/platforms/40x/virtex.c +++ b/arch/powerpc/platforms/40x/virtex.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/prom.h> | 14 | #include <asm/prom.h> |
15 | #include <asm/time.h> | 15 | #include <asm/time.h> |
16 | #include <asm/xilinx_intc.h> | 16 | #include <asm/xilinx_intc.h> |
17 | #include <asm/ppc4xx.h> | ||
17 | 18 | ||
18 | static struct of_device_id xilinx_of_bus_ids[] __initdata = { | 19 | static struct of_device_id xilinx_of_bus_ids[] __initdata = { |
19 | { .compatible = "xlnx,plb-v46-1.00.a", }, | 20 | { .compatible = "xlnx,plb-v46-1.00.a", }, |
@@ -48,5 +49,6 @@ define_machine(virtex) { | |||
48 | .probe = virtex_probe, | 49 | .probe = virtex_probe, |
49 | .init_IRQ = xilinx_intc_init_tree, | 50 | .init_IRQ = xilinx_intc_init_tree, |
50 | .get_irq = xilinx_intc_get_irq, | 51 | .get_irq = xilinx_intc_get_irq, |
52 | .restart = ppc4xx_reset_system, | ||
51 | .calibrate_decr = generic_calibrate_decr, | 53 | .calibrate_decr = generic_calibrate_decr, |
52 | }; | 54 | }; |
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c index b8b257efeb77..335df91fbee5 100644 --- a/arch/powerpc/platforms/40x/walnut.c +++ b/arch/powerpc/platforms/40x/walnut.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/time.h> | 26 | #include <asm/time.h> |
27 | #include <asm/uic.h> | 27 | #include <asm/uic.h> |
28 | #include <asm/pci-bridge.h> | 28 | #include <asm/pci-bridge.h> |
29 | #include <asm/ppc4xx.h> | ||
29 | 30 | ||
30 | static __initdata struct of_device_id walnut_of_bus[] = { | 31 | static __initdata struct of_device_id walnut_of_bus[] = { |
31 | { .compatible = "ibm,plb3", }, | 32 | { .compatible = "ibm,plb3", }, |
@@ -61,5 +62,6 @@ define_machine(walnut) { | |||
61 | .progress = udbg_progress, | 62 | .progress = udbg_progress, |
62 | .init_IRQ = uic_init_tree, | 63 | .init_IRQ = uic_init_tree, |
63 | .get_irq = uic_get_irq, | 64 | .get_irq = uic_get_irq, |
64 | .calibrate_decr = generic_calibrate_decr, | 65 | .restart = ppc4xx_reset_system, |
66 | .calibrate_decr = generic_calibrate_decr, | ||
65 | }; | 67 | }; |
diff --git a/arch/powerpc/platforms/44x/44x.h b/arch/powerpc/platforms/44x/44x.h index 42eabf87fea3..dbc4d2b4301a 100644 --- a/arch/powerpc/platforms/44x/44x.h +++ b/arch/powerpc/platforms/44x/44x.h | |||
@@ -3,6 +3,5 @@ | |||
3 | 3 | ||
4 | extern u8 as1_readb(volatile u8 __iomem *addr); | 4 | extern u8 as1_readb(volatile u8 __iomem *addr); |
5 | extern void as1_writeb(u8 data, volatile u8 __iomem *addr); | 5 | extern void as1_writeb(u8 data, volatile u8 __iomem *addr); |
6 | extern void ppc44x_reset_system(char *cmd); | ||
7 | 6 | ||
8 | #endif /* __POWERPC_PLATFORMS_44X_44X_H */ | 7 | #endif /* __POWERPC_PLATFORMS_44X_44X_H */ |
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 5fc28aa459e3..6abe91357eee 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig | |||
@@ -129,7 +129,6 @@ config 440GP | |||
129 | 129 | ||
130 | config 440GX | 130 | config 440GX |
131 | bool | 131 | bool |
132 | select 4xx_SOC | ||
133 | select IBM_NEW_EMAC_EMAC4 | 132 | select IBM_NEW_EMAC_EMAC4 |
134 | select IBM_NEW_EMAC_RGMII | 133 | select IBM_NEW_EMAC_RGMII |
135 | select IBM_NEW_EMAC_ZMII #test only | 134 | select IBM_NEW_EMAC_ZMII #test only |
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c index fb9a22a7e8d0..cef169e95156 100644 --- a/arch/powerpc/platforms/44x/bamboo.c +++ b/arch/powerpc/platforms/44x/bamboo.c | |||
@@ -22,8 +22,7 @@ | |||
22 | #include <asm/time.h> | 22 | #include <asm/time.h> |
23 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | 25 | #include <asm/ppc4xx.h> | |
26 | #include "44x.h" | ||
27 | 26 | ||
28 | static __initdata struct of_device_id bamboo_of_bus[] = { | 27 | static __initdata struct of_device_id bamboo_of_bus[] = { |
29 | { .compatible = "ibm,plb4", }, | 28 | { .compatible = "ibm,plb4", }, |
@@ -53,11 +52,11 @@ static int __init bamboo_probe(void) | |||
53 | } | 52 | } |
54 | 53 | ||
55 | define_machine(bamboo) { | 54 | define_machine(bamboo) { |
56 | .name = "Bamboo", | 55 | .name = "Bamboo", |
57 | .probe = bamboo_probe, | 56 | .probe = bamboo_probe, |
58 | .progress = udbg_progress, | 57 | .progress = udbg_progress, |
59 | .init_IRQ = uic_init_tree, | 58 | .init_IRQ = uic_init_tree, |
60 | .get_irq = uic_get_irq, | 59 | .get_irq = uic_get_irq, |
61 | .restart = ppc44x_reset_system, | 60 | .restart = ppc4xx_reset_system, |
62 | .calibrate_decr = generic_calibrate_decr, | 61 | .calibrate_decr = generic_calibrate_decr, |
63 | }; | 62 | }; |
diff --git a/arch/powerpc/platforms/44x/canyonlands.c b/arch/powerpc/platforms/44x/canyonlands.c index dac5b3203696..3949289f51df 100644 --- a/arch/powerpc/platforms/44x/canyonlands.c +++ b/arch/powerpc/platforms/44x/canyonlands.c | |||
@@ -23,8 +23,7 @@ | |||
23 | #include <asm/time.h> | 23 | #include <asm/time.h> |
24 | #include <asm/uic.h> | 24 | #include <asm/uic.h> |
25 | #include <asm/pci-bridge.h> | 25 | #include <asm/pci-bridge.h> |
26 | 26 | #include <asm/ppc4xx.h> | |
27 | #include "44x.h" | ||
28 | 27 | ||
29 | static __initdata struct of_device_id canyonlands_of_bus[] = { | 28 | static __initdata struct of_device_id canyonlands_of_bus[] = { |
30 | { .compatible = "ibm,plb4", }, | 29 | { .compatible = "ibm,plb4", }, |
@@ -59,6 +58,6 @@ define_machine(canyonlands) { | |||
59 | .progress = udbg_progress, | 58 | .progress = udbg_progress, |
60 | .init_IRQ = uic_init_tree, | 59 | .init_IRQ = uic_init_tree, |
61 | .get_irq = uic_get_irq, | 60 | .get_irq = uic_get_irq, |
62 | .restart = ppc44x_reset_system, | 61 | .restart = ppc4xx_reset_system, |
63 | .calibrate_decr = generic_calibrate_decr, | 62 | .calibrate_decr = generic_calibrate_decr, |
64 | }; | 63 | }; |
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c index 1a8d467bff85..a0e8fe4662f6 100644 --- a/arch/powerpc/platforms/44x/ebony.c +++ b/arch/powerpc/platforms/44x/ebony.c | |||
@@ -26,8 +26,7 @@ | |||
26 | #include <asm/time.h> | 26 | #include <asm/time.h> |
27 | #include <asm/uic.h> | 27 | #include <asm/uic.h> |
28 | #include <asm/pci-bridge.h> | 28 | #include <asm/pci-bridge.h> |
29 | 29 | #include <asm/ppc4xx.h> | |
30 | #include "44x.h" | ||
31 | 30 | ||
32 | static __initdata struct of_device_id ebony_of_bus[] = { | 31 | static __initdata struct of_device_id ebony_of_bus[] = { |
33 | { .compatible = "ibm,plb4", }, | 32 | { .compatible = "ibm,plb4", }, |
@@ -66,6 +65,6 @@ define_machine(ebony) { | |||
66 | .progress = udbg_progress, | 65 | .progress = udbg_progress, |
67 | .init_IRQ = uic_init_tree, | 66 | .init_IRQ = uic_init_tree, |
68 | .get_irq = uic_get_irq, | 67 | .get_irq = uic_get_irq, |
69 | .restart = ppc44x_reset_system, | 68 | .restart = ppc4xx_reset_system, |
70 | .calibrate_decr = generic_calibrate_decr, | 69 | .calibrate_decr = generic_calibrate_decr, |
71 | }; | 70 | }; |
diff --git a/arch/powerpc/platforms/44x/katmai.c b/arch/powerpc/platforms/44x/katmai.c index 11134121f272..44f4b3a00ced 100644 --- a/arch/powerpc/platforms/44x/katmai.c +++ b/arch/powerpc/platforms/44x/katmai.c | |||
@@ -22,8 +22,7 @@ | |||
22 | #include <asm/time.h> | 22 | #include <asm/time.h> |
23 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | 25 | #include <asm/ppc4xx.h> | |
26 | #include "44x.h" | ||
27 | 26 | ||
28 | static __initdata struct of_device_id katmai_of_bus[] = { | 27 | static __initdata struct of_device_id katmai_of_bus[] = { |
29 | { .compatible = "ibm,plb4", }, | 28 | { .compatible = "ibm,plb4", }, |
@@ -58,6 +57,6 @@ define_machine(katmai) { | |||
58 | .progress = udbg_progress, | 57 | .progress = udbg_progress, |
59 | .init_IRQ = uic_init_tree, | 58 | .init_IRQ = uic_init_tree, |
60 | .get_irq = uic_get_irq, | 59 | .get_irq = uic_get_irq, |
61 | .restart = ppc44x_reset_system, | 60 | .restart = ppc4xx_reset_system, |
62 | .calibrate_decr = generic_calibrate_decr, | 61 | .calibrate_decr = generic_calibrate_decr, |
63 | }; | 62 | }; |
diff --git a/arch/powerpc/platforms/44x/misc_44x.S b/arch/powerpc/platforms/44x/misc_44x.S index 3bce71d5d756..dc12b8009e48 100644 --- a/arch/powerpc/platforms/44x/misc_44x.S +++ b/arch/powerpc/platforms/44x/misc_44x.S | |||
@@ -44,14 +44,3 @@ _GLOBAL(as1_writeb) | |||
44 | sync | 44 | sync |
45 | isync | 45 | isync |
46 | blr | 46 | blr |
47 | |||
48 | /* | ||
49 | * void ppc44x_reset_system(char *cmd) | ||
50 | * | ||
51 | * At present, this routine just applies a system reset. | ||
52 | */ | ||
53 | _GLOBAL(ppc44x_reset_system) | ||
54 | mfspr r13,SPRN_DBCR0 | ||
55 | oris r13,r13,DBCR0_RST_SYSTEM@h | ||
56 | mtspr SPRN_DBCR0,r13 | ||
57 | b . /* Just in case the reset doesn't work */ | ||
diff --git a/arch/powerpc/platforms/44x/rainier.c b/arch/powerpc/platforms/44x/rainier.c index a7fae1cf69c1..4f1ff84c4b63 100644 --- a/arch/powerpc/platforms/44x/rainier.c +++ b/arch/powerpc/platforms/44x/rainier.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/time.h> | 22 | #include <asm/time.h> |
23 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | #include "44x.h" | 25 | #include <asm/ppc4xx.h> |
26 | 26 | ||
27 | static __initdata struct of_device_id rainier_of_bus[] = { | 27 | static __initdata struct of_device_id rainier_of_bus[] = { |
28 | { .compatible = "ibm,plb4", }, | 28 | { .compatible = "ibm,plb4", }, |
@@ -57,6 +57,6 @@ define_machine(rainier) { | |||
57 | .progress = udbg_progress, | 57 | .progress = udbg_progress, |
58 | .init_IRQ = uic_init_tree, | 58 | .init_IRQ = uic_init_tree, |
59 | .get_irq = uic_get_irq, | 59 | .get_irq = uic_get_irq, |
60 | .restart = ppc44x_reset_system, | 60 | .restart = ppc4xx_reset_system, |
61 | .calibrate_decr = generic_calibrate_decr, | 61 | .calibrate_decr = generic_calibrate_decr, |
62 | }; | 62 | }; |
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c index d279db42c896..49eb73daacdf 100644 --- a/arch/powerpc/platforms/44x/sequoia.c +++ b/arch/powerpc/platforms/44x/sequoia.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | 25 | ||
26 | #include "44x.h" | 26 | #include <asm/ppc4xx.h> |
27 | 27 | ||
28 | static __initdata struct of_device_id sequoia_of_bus[] = { | 28 | static __initdata struct of_device_id sequoia_of_bus[] = { |
29 | { .compatible = "ibm,plb4", }, | 29 | { .compatible = "ibm,plb4", }, |
@@ -58,6 +58,6 @@ define_machine(sequoia) { | |||
58 | .progress = udbg_progress, | 58 | .progress = udbg_progress, |
59 | .init_IRQ = uic_init_tree, | 59 | .init_IRQ = uic_init_tree, |
60 | .get_irq = uic_get_irq, | 60 | .get_irq = uic_get_irq, |
61 | .restart = ppc44x_reset_system, | 61 | .restart = ppc4xx_reset_system, |
62 | .calibrate_decr = generic_calibrate_decr, | 62 | .calibrate_decr = generic_calibrate_decr, |
63 | }; | 63 | }; |
diff --git a/arch/powerpc/platforms/44x/taishan.c b/arch/powerpc/platforms/44x/taishan.c index 28ab7e2e02c3..49c78b2098b4 100644 --- a/arch/powerpc/platforms/44x/taishan.c +++ b/arch/powerpc/platforms/44x/taishan.c | |||
@@ -29,8 +29,7 @@ | |||
29 | #include <asm/time.h> | 29 | #include <asm/time.h> |
30 | #include <asm/uic.h> | 30 | #include <asm/uic.h> |
31 | #include <asm/pci-bridge.h> | 31 | #include <asm/pci-bridge.h> |
32 | 32 | #include <asm/ppc4xx.h> | |
33 | #include "44x.h" | ||
34 | 33 | ||
35 | static __initdata struct of_device_id taishan_of_bus[] = { | 34 | static __initdata struct of_device_id taishan_of_bus[] = { |
36 | { .compatible = "ibm,plb4", }, | 35 | { .compatible = "ibm,plb4", }, |
@@ -68,6 +67,6 @@ define_machine(taishan) { | |||
68 | .progress = udbg_progress, | 67 | .progress = udbg_progress, |
69 | .init_IRQ = uic_init_tree, | 68 | .init_IRQ = uic_init_tree, |
70 | .get_irq = uic_get_irq, | 69 | .get_irq = uic_get_irq, |
71 | .restart = ppc44x_reset_system, | 70 | .restart = ppc4xx_reset_system, |
72 | .calibrate_decr = generic_calibrate_decr, | 71 | .calibrate_decr = generic_calibrate_decr, |
73 | }; | 72 | }; |
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c index da5b7b7599db..39cf6150a72b 100644 --- a/arch/powerpc/platforms/44x/warp.c +++ b/arch/powerpc/platforms/44x/warp.c | |||
@@ -18,9 +18,7 @@ | |||
18 | #include <asm/udbg.h> | 18 | #include <asm/udbg.h> |
19 | #include <asm/time.h> | 19 | #include <asm/time.h> |
20 | #include <asm/uic.h> | 20 | #include <asm/uic.h> |
21 | 21 | #include <asm/ppc4xx.h> | |
22 | #include "44x.h" | ||
23 | |||
24 | 22 | ||
25 | static __initdata struct of_device_id warp_of_bus[] = { | 23 | static __initdata struct of_device_id warp_of_bus[] = { |
26 | { .compatible = "ibm,plb4", }, | 24 | { .compatible = "ibm,plb4", }, |
@@ -49,7 +47,7 @@ define_machine(warp) { | |||
49 | .progress = udbg_progress, | 47 | .progress = udbg_progress, |
50 | .init_IRQ = uic_init_tree, | 48 | .init_IRQ = uic_init_tree, |
51 | .get_irq = uic_get_irq, | 49 | .get_irq = uic_get_irq, |
52 | .restart = ppc44x_reset_system, | 50 | .restart = ppc4xx_reset_system, |
53 | .calibrate_decr = generic_calibrate_decr, | 51 | .calibrate_decr = generic_calibrate_decr, |
54 | }; | 52 | }; |
55 | 53 | ||
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 0c3face0ddbb..5fc7fac10e93 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -41,11 +41,13 @@ config 40x | |||
41 | bool "AMCC 40x" | 41 | bool "AMCC 40x" |
42 | select PPC_DCR_NATIVE | 42 | select PPC_DCR_NATIVE |
43 | select PPC_UDBG_16550 | 43 | select PPC_UDBG_16550 |
44 | select 4xx_SOC | ||
44 | 45 | ||
45 | config 44x | 46 | config 44x |
46 | bool "AMCC 44x" | 47 | bool "AMCC 44x" |
47 | select PPC_DCR_NATIVE | 48 | select PPC_DCR_NATIVE |
48 | select PPC_UDBG_16550 | 49 | select PPC_UDBG_16550 |
50 | select 4xx_SOC | ||
49 | 51 | ||
50 | config E200 | 52 | config E200 |
51 | bool "Freescale e200" | 53 | bool "Freescale e200" |
diff --git a/arch/powerpc/sysdev/ppc4xx_soc.c b/arch/powerpc/sysdev/ppc4xx_soc.c index 4b8617e44314..5b32adc9a9b2 100644 --- a/arch/powerpc/sysdev/ppc4xx_soc.c +++ b/arch/powerpc/sysdev/ppc4xx_soc.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <asm/dcr.h> | 24 | #include <asm/dcr.h> |
25 | #include <asm/dcr-regs.h> | 25 | #include <asm/dcr-regs.h> |
26 | #include <asm/reg.h> | ||
26 | 27 | ||
27 | static u32 dcrbase_l2c; | 28 | static u32 dcrbase_l2c; |
28 | 29 | ||
@@ -187,3 +188,13 @@ static int __init ppc4xx_l2c_probe(void) | |||
187 | return 0; | 188 | return 0; |
188 | } | 189 | } |
189 | arch_initcall(ppc4xx_l2c_probe); | 190 | arch_initcall(ppc4xx_l2c_probe); |
191 | |||
192 | /* | ||
193 | * At present, this routine just applies a system reset. | ||
194 | */ | ||
195 | void ppc4xx_reset_system(char *cmd) | ||
196 | { | ||
197 | mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_RST_SYSTEM); | ||
198 | while (1) | ||
199 | ; /* Just in case the reset doesn't work */ | ||
200 | } | ||
diff --git a/include/asm-powerpc/ppc4xx.h b/include/asm-powerpc/ppc4xx.h new file mode 100644 index 000000000000..033039a80c42 --- /dev/null +++ b/include/asm-powerpc/ppc4xx.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * PPC4xx Prototypes and definitions | ||
3 | * | ||
4 | * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> | ||
5 | * | ||
6 | * This is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_POWERPC_PPC4xx_H__ | ||
14 | #define __ASM_POWERPC_PPC4xx_H__ | ||
15 | |||
16 | extern void ppc4xx_reset_system(char *cmd); | ||
17 | |||
18 | #endif /* __ASM_POWERPC_PPC4xx_H__ */ | ||