diff options
author | Paul Mackerras <paulus@samba.org> | 2008-09-21 19:17:25 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-09-21 19:17:25 -0400 |
commit | ff4be78bb70f5e8381fa68b374a506fecc17d833 (patch) | |
tree | 7be467d317a94048cbf15f398b7c26f3e5f5295d /arch | |
parent | a501d8f30e4fcca563e4ee462be00f96e51181d5 (diff) | |
parent | 423da26997497f5938c0b169f1cc9762b5f3fa9f (diff) |
Merge branch 'next' of ssh://master.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/boot/dts/glacier.dts | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/sequoia.dts | 9 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/yosemite.dts | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/Kconfig | 25 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/Makefile | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/bamboo.c | 62 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/canyonlands.c | 63 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/katmai.c | 62 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/ppc44x_simple.c | 87 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/rainier.c | 62 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/sequoia.c | 63 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/taishan.c | 72 | ||||
-rw-r--r-- | arch/powerpc/sysdev/ppc4xx_pci.c | 23 |
13 files changed, 135 insertions, 405 deletions
diff --git a/arch/powerpc/boot/dts/glacier.dts b/arch/powerpc/boot/dts/glacier.dts index 24cf0dba120c..f3787a27f634 100644 --- a/arch/powerpc/boot/dts/glacier.dts +++ b/arch/powerpc/boot/dts/glacier.dts | |||
@@ -14,7 +14,7 @@ | |||
14 | #address-cells = <2>; | 14 | #address-cells = <2>; |
15 | #size-cells = <1>; | 15 | #size-cells = <1>; |
16 | model = "amcc,glacier"; | 16 | model = "amcc,glacier"; |
17 | compatible = "amcc,glacier", "amcc,canyonlands"; | 17 | compatible = "amcc,glacier"; |
18 | dcr-parent = <&{/cpus/cpu@0}>; | 18 | dcr-parent = <&{/cpus/cpu@0}>; |
19 | 19 | ||
20 | aliases { | 20 | aliases { |
diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts index 72d15f075d34..3b295e8df53f 100644 --- a/arch/powerpc/boot/dts/sequoia.dts +++ b/arch/powerpc/boot/dts/sequoia.dts | |||
@@ -246,13 +246,22 @@ | |||
246 | }; | 246 | }; |
247 | 247 | ||
248 | IIC0: i2c@ef600700 { | 248 | IIC0: i2c@ef600700 { |
249 | #address-cells = <1>; | ||
250 | #size-cells = <0>; | ||
249 | compatible = "ibm,iic-440epx", "ibm,iic"; | 251 | compatible = "ibm,iic-440epx", "ibm,iic"; |
250 | reg = <0xef600700 0x00000014>; | 252 | reg = <0xef600700 0x00000014>; |
251 | interrupt-parent = <&UIC0>; | 253 | interrupt-parent = <&UIC0>; |
252 | interrupts = <0x2 0x4>; | 254 | interrupts = <0x2 0x4>; |
255 | |||
256 | hwmon@48 { | ||
257 | compatible = "adi,ad7414"; | ||
258 | reg = <0x48>; | ||
259 | }; | ||
253 | }; | 260 | }; |
254 | 261 | ||
255 | IIC1: i2c@ef600800 { | 262 | IIC1: i2c@ef600800 { |
263 | #address-cells = <1>; | ||
264 | #size-cells = <0>; | ||
256 | compatible = "ibm,iic-440epx", "ibm,iic"; | 265 | compatible = "ibm,iic-440epx", "ibm,iic"; |
257 | reg = <0xef600800 0x00000014>; | 266 | reg = <0xef600800 0x00000014>; |
258 | interrupt-parent = <&UIC0>; | 267 | interrupt-parent = <&UIC0>; |
diff --git a/arch/powerpc/boot/dts/yosemite.dts b/arch/powerpc/boot/dts/yosemite.dts index e39422aa0d85..1fa3cb4c4ebb 100644 --- a/arch/powerpc/boot/dts/yosemite.dts +++ b/arch/powerpc/boot/dts/yosemite.dts | |||
@@ -15,7 +15,7 @@ | |||
15 | #address-cells = <2>; | 15 | #address-cells = <2>; |
16 | #size-cells = <1>; | 16 | #size-cells = <1>; |
17 | model = "amcc,yosemite"; | 17 | model = "amcc,yosemite"; |
18 | compatible = "amcc,yosemite","amcc,bamboo"; | 18 | compatible = "amcc,yosemite"; |
19 | dcr-parent = <&{/cpus/cpu@0}>; | 19 | dcr-parent = <&{/cpus/cpu@0}>; |
20 | 20 | ||
21 | aliases { | 21 | aliases { |
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 249ba01c6674..f8ef279f3256 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig | |||
@@ -2,6 +2,7 @@ config BAMBOO | |||
2 | bool "Bamboo" | 2 | bool "Bamboo" |
3 | depends on 44x | 3 | depends on 44x |
4 | default n | 4 | default n |
5 | select PPC44x_SIMPLE | ||
5 | select 440EP | 6 | select 440EP |
6 | select PCI | 7 | select PCI |
7 | help | 8 | help |
@@ -30,6 +31,7 @@ config SEQUOIA | |||
30 | bool "Sequoia" | 31 | bool "Sequoia" |
31 | depends on 44x | 32 | depends on 44x |
32 | default n | 33 | default n |
34 | select PPC44x_SIMPLE | ||
33 | select 440EPX | 35 | select 440EPX |
34 | help | 36 | help |
35 | This option enables support for the AMCC PPC440EPX evaluation board. | 37 | This option enables support for the AMCC PPC440EPX evaluation board. |
@@ -38,6 +40,7 @@ config TAISHAN | |||
38 | bool "Taishan" | 40 | bool "Taishan" |
39 | depends on 44x | 41 | depends on 44x |
40 | default n | 42 | default n |
43 | select PPC44x_SIMPLE | ||
41 | select 440GX | 44 | select 440GX |
42 | select PCI | 45 | select PCI |
43 | help | 46 | help |
@@ -48,6 +51,7 @@ config KATMAI | |||
48 | bool "Katmai" | 51 | bool "Katmai" |
49 | depends on 44x | 52 | depends on 44x |
50 | default n | 53 | default n |
54 | select PPC44x_SIMPLE | ||
51 | select 440SPe | 55 | select 440SPe |
52 | select PCI | 56 | select PCI |
53 | select PPC4xx_PCI_EXPRESS | 57 | select PPC4xx_PCI_EXPRESS |
@@ -58,6 +62,7 @@ config RAINIER | |||
58 | bool "Rainier" | 62 | bool "Rainier" |
59 | depends on 44x | 63 | depends on 44x |
60 | default n | 64 | default n |
65 | select PPC44x_SIMPLE | ||
61 | select 440GRX | 66 | select 440GRX |
62 | select PCI | 67 | select PCI |
63 | help | 68 | help |
@@ -80,16 +85,29 @@ config CANYONLANDS | |||
80 | bool "Canyonlands" | 85 | bool "Canyonlands" |
81 | depends on 44x | 86 | depends on 44x |
82 | default n | 87 | default n |
88 | select PPC44x_SIMPLE | ||
83 | select 460EX | 89 | select 460EX |
84 | select PCI | 90 | select PCI |
85 | select PPC4xx_PCI_EXPRESS | 91 | select PPC4xx_PCI_EXPRESS |
86 | help | 92 | help |
87 | This option enables support for the AMCC PPC460EX evaluation board. | 93 | This option enables support for the AMCC PPC460EX evaluation board. |
88 | 94 | ||
95 | config GLACIER | ||
96 | bool "Glacier" | ||
97 | depends on 44x | ||
98 | default n | ||
99 | select PPC44x_SIMPLE | ||
100 | select 460EX # Odd since it uses 460GT but the effects are the same | ||
101 | select PCI | ||
102 | select PPC4xx_PCI_EXPRESS | ||
103 | help | ||
104 | This option enables support for the AMCC PPC460GT evaluation board. | ||
105 | |||
89 | config YOSEMITE | 106 | config YOSEMITE |
90 | bool "Yosemite" | 107 | bool "Yosemite" |
91 | depends on 44x | 108 | depends on 44x |
92 | default n | 109 | default n |
110 | select PPC44x_SIMPLE | ||
93 | select 440EP | 111 | select 440EP |
94 | select PCI | 112 | select PCI |
95 | help | 113 | help |
@@ -127,6 +145,13 @@ config XILINX_VIRTEX440_GENERIC_BOARD | |||
127 | Most Virtex 5 designs should use this unless it needs to do some | 145 | Most Virtex 5 designs should use this unless it needs to do some |
128 | special configuration at board probe time. | 146 | special configuration at board probe time. |
129 | 147 | ||
148 | config PPC44x_SIMPLE | ||
149 | bool "Simple PowerPC 44x board support" | ||
150 | depends on 44x | ||
151 | default n | ||
152 | help | ||
153 | This option enables the simple PowerPC 44x platform support. | ||
154 | |||
130 | # 44x specific CPU modules, selected based on the board above. | 155 | # 44x specific CPU modules, selected based on the board above. |
131 | config 440EP | 156 | config 440EP |
132 | bool | 157 | bool |
diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile index 8d0b1a192d62..698133180aee 100644 --- a/arch/powerpc/platforms/44x/Makefile +++ b/arch/powerpc/platforms/44x/Makefile | |||
@@ -1,13 +1,7 @@ | |||
1 | obj-$(CONFIG_44x) := misc_44x.o idle.o | 1 | obj-$(CONFIG_44x) := misc_44x.o idle.o |
2 | obj-$(CONFIG_PPC44x_SIMPLE) += ppc44x_simple.o | ||
2 | obj-$(CONFIG_EBONY) += ebony.o | 3 | obj-$(CONFIG_EBONY) += ebony.o |
3 | obj-$(CONFIG_TAISHAN) += taishan.o | ||
4 | obj-$(CONFIG_BAMBOO) += bamboo.o | ||
5 | obj-$(CONFIG_YOSEMITE) += bamboo.o | ||
6 | obj-$(CONFIG_SAM440EP) += sam440ep.o | 4 | obj-$(CONFIG_SAM440EP) += sam440ep.o |
7 | obj-$(CONFIG_SEQUOIA) += sequoia.o | ||
8 | obj-$(CONFIG_KATMAI) += katmai.o | ||
9 | obj-$(CONFIG_RAINIER) += rainier.o | ||
10 | obj-$(CONFIG_WARP) += warp.o | 5 | obj-$(CONFIG_WARP) += warp.o |
11 | obj-$(CONFIG_WARP) += warp-nand.o | 6 | obj-$(CONFIG_WARP) += warp-nand.o |
12 | obj-$(CONFIG_CANYONLANDS) += canyonlands.o | ||
13 | obj-$(CONFIG_XILINX_VIRTEX_5_FXT) += virtex.o | 7 | obj-$(CONFIG_XILINX_VIRTEX_5_FXT) += virtex.o |
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c deleted file mode 100644 index cef169e95156..000000000000 --- a/arch/powerpc/platforms/44x/bamboo.c +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * Bamboo board specific routines | ||
3 | * | ||
4 | * Wade Farnsworth <wfarnsworth@mvista.com> | ||
5 | * Copyright 2004 MontaVista Software Inc. | ||
6 | * | ||
7 | * Rewritten and ported to the merged powerpc tree: | ||
8 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
9 | * Copyright 2007 IBM Corporation | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | #include <asm/machdep.h> | ||
20 | #include <asm/prom.h> | ||
21 | #include <asm/udbg.h> | ||
22 | #include <asm/time.h> | ||
23 | #include <asm/uic.h> | ||
24 | #include <asm/pci-bridge.h> | ||
25 | #include <asm/ppc4xx.h> | ||
26 | |||
27 | static __initdata struct of_device_id bamboo_of_bus[] = { | ||
28 | { .compatible = "ibm,plb4", }, | ||
29 | { .compatible = "ibm,opb", }, | ||
30 | { .compatible = "ibm,ebc", }, | ||
31 | {}, | ||
32 | }; | ||
33 | |||
34 | static int __init bamboo_device_probe(void) | ||
35 | { | ||
36 | of_platform_bus_probe(NULL, bamboo_of_bus, NULL); | ||
37 | |||
38 | return 0; | ||
39 | } | ||
40 | machine_device_initcall(bamboo, bamboo_device_probe); | ||
41 | |||
42 | static int __init bamboo_probe(void) | ||
43 | { | ||
44 | unsigned long root = of_get_flat_dt_root(); | ||
45 | |||
46 | if (!of_flat_dt_is_compatible(root, "amcc,bamboo")) | ||
47 | return 0; | ||
48 | |||
49 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | ||
50 | |||
51 | return 1; | ||
52 | } | ||
53 | |||
54 | define_machine(bamboo) { | ||
55 | .name = "Bamboo", | ||
56 | .probe = bamboo_probe, | ||
57 | .progress = udbg_progress, | ||
58 | .init_IRQ = uic_init_tree, | ||
59 | .get_irq = uic_get_irq, | ||
60 | .restart = ppc4xx_reset_system, | ||
61 | .calibrate_decr = generic_calibrate_decr, | ||
62 | }; | ||
diff --git a/arch/powerpc/platforms/44x/canyonlands.c b/arch/powerpc/platforms/44x/canyonlands.c deleted file mode 100644 index 3949289f51df..000000000000 --- a/arch/powerpc/platforms/44x/canyonlands.c +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * Canyonlands board specific routines | ||
3 | * | ||
4 | * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> | ||
5 | * | ||
6 | * Based on the Katmai code by | ||
7 | * Benjamin Herrenschmidt <benh@kernel.crashing.org> | ||
8 | * Copyright 2007 IBM Corp. | ||
9 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
10 | * Copyright 2007 IBM Corporation | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/of_platform.h> | ||
19 | |||
20 | #include <asm/machdep.h> | ||
21 | #include <asm/prom.h> | ||
22 | #include <asm/udbg.h> | ||
23 | #include <asm/time.h> | ||
24 | #include <asm/uic.h> | ||
25 | #include <asm/pci-bridge.h> | ||
26 | #include <asm/ppc4xx.h> | ||
27 | |||
28 | static __initdata struct of_device_id canyonlands_of_bus[] = { | ||
29 | { .compatible = "ibm,plb4", }, | ||
30 | { .compatible = "ibm,opb", }, | ||
31 | { .compatible = "ibm,ebc", }, | ||
32 | {}, | ||
33 | }; | ||
34 | |||
35 | static int __init canyonlands_device_probe(void) | ||
36 | { | ||
37 | of_platform_bus_probe(NULL, canyonlands_of_bus, NULL); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | machine_device_initcall(canyonlands, canyonlands_device_probe); | ||
42 | |||
43 | static int __init canyonlands_probe(void) | ||
44 | { | ||
45 | unsigned long root = of_get_flat_dt_root(); | ||
46 | |||
47 | if (!of_flat_dt_is_compatible(root, "amcc,canyonlands")) | ||
48 | return 0; | ||
49 | |||
50 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | ||
51 | |||
52 | return 1; | ||
53 | } | ||
54 | |||
55 | define_machine(canyonlands) { | ||
56 | .name = "Canyonlands", | ||
57 | .probe = canyonlands_probe, | ||
58 | .progress = udbg_progress, | ||
59 | .init_IRQ = uic_init_tree, | ||
60 | .get_irq = uic_get_irq, | ||
61 | .restart = ppc4xx_reset_system, | ||
62 | .calibrate_decr = generic_calibrate_decr, | ||
63 | }; | ||
diff --git a/arch/powerpc/platforms/44x/katmai.c b/arch/powerpc/platforms/44x/katmai.c deleted file mode 100644 index 44f4b3a00ced..000000000000 --- a/arch/powerpc/platforms/44x/katmai.c +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * Katmai board specific routines | ||
3 | * | ||
4 | * Benjamin Herrenschmidt <benh@kernel.crashing.org> | ||
5 | * Copyright 2007 IBM Corp. | ||
6 | * | ||
7 | * Based on the Bamboo code by | ||
8 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
9 | * Copyright 2007 IBM Corporation | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | #include <asm/machdep.h> | ||
20 | #include <asm/prom.h> | ||
21 | #include <asm/udbg.h> | ||
22 | #include <asm/time.h> | ||
23 | #include <asm/uic.h> | ||
24 | #include <asm/pci-bridge.h> | ||
25 | #include <asm/ppc4xx.h> | ||
26 | |||
27 | static __initdata struct of_device_id katmai_of_bus[] = { | ||
28 | { .compatible = "ibm,plb4", }, | ||
29 | { .compatible = "ibm,opb", }, | ||
30 | { .compatible = "ibm,ebc", }, | ||
31 | {}, | ||
32 | }; | ||
33 | |||
34 | static int __init katmai_device_probe(void) | ||
35 | { | ||
36 | of_platform_bus_probe(NULL, katmai_of_bus, NULL); | ||
37 | |||
38 | return 0; | ||
39 | } | ||
40 | machine_device_initcall(katmai, katmai_device_probe); | ||
41 | |||
42 | static int __init katmai_probe(void) | ||
43 | { | ||
44 | unsigned long root = of_get_flat_dt_root(); | ||
45 | |||
46 | if (!of_flat_dt_is_compatible(root, "amcc,katmai")) | ||
47 | return 0; | ||
48 | |||
49 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | ||
50 | |||
51 | return 1; | ||
52 | } | ||
53 | |||
54 | define_machine(katmai) { | ||
55 | .name = "Katmai", | ||
56 | .probe = katmai_probe, | ||
57 | .progress = udbg_progress, | ||
58 | .init_IRQ = uic_init_tree, | ||
59 | .get_irq = uic_get_irq, | ||
60 | .restart = ppc4xx_reset_system, | ||
61 | .calibrate_decr = generic_calibrate_decr, | ||
62 | }; | ||
diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c b/arch/powerpc/platforms/44x/ppc44x_simple.c new file mode 100644 index 000000000000..57e71203d0f8 --- /dev/null +++ b/arch/powerpc/platforms/44x/ppc44x_simple.c | |||
@@ -0,0 +1,87 @@ | |||
1 | /* | ||
2 | * Generic PowerPC 44x platform support | ||
3 | * | ||
4 | * Copyright 2008 IBM Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This implements simple platform support for PowerPC 44x chips. This is | ||
11 | * mostly used for eval boards or other simple and "generic" 44x boards. If | ||
12 | * your board has custom functions or hardware, then you will likely want to | ||
13 | * implement your own board.c file to accommodate it. | ||
14 | */ | ||
15 | |||
16 | #include <asm/machdep.h> | ||
17 | #include <asm/pci-bridge.h> | ||
18 | #include <asm/ppc4xx.h> | ||
19 | #include <asm/prom.h> | ||
20 | #include <asm/time.h> | ||
21 | #include <asm/udbg.h> | ||
22 | #include <asm/uic.h> | ||
23 | |||
24 | #include <linux/init.h> | ||
25 | #include <linux/of_platform.h> | ||
26 | |||
27 | static __initdata struct of_device_id ppc44x_of_bus[] = { | ||
28 | { .compatible = "ibm,plb4", }, | ||
29 | { .compatible = "ibm,opb", }, | ||
30 | { .compatible = "ibm,ebc", }, | ||
31 | { .compatible = "simple-bus", }, | ||
32 | {}, | ||
33 | }; | ||
34 | |||
35 | static int __init ppc44x_device_probe(void) | ||
36 | { | ||
37 | of_platform_bus_probe(NULL, ppc44x_of_bus, NULL); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | machine_device_initcall(ppc44x_simple, ppc44x_device_probe); | ||
42 | |||
43 | /* This is the list of boards that can be supported by this simple | ||
44 | * platform code. This does _not_ mean the boards are compatible, | ||
45 | * as they most certainly are not from a device tree perspective. | ||
46 | * However, their differences are handled by the device tree and the | ||
47 | * drivers and therefore they don't need custom board support files. | ||
48 | * | ||
49 | * Again, if your board needs to do things differently then create a | ||
50 | * board.c file for it rather than adding it to this list. | ||
51 | */ | ||
52 | static char *board[] __initdata = { | ||
53 | "amcc,bamboo", | ||
54 | "amcc,cayonlands", | ||
55 | "amcc,glacier", | ||
56 | "ibm,ebony", | ||
57 | "amcc,katmai", | ||
58 | "amcc,rainier", | ||
59 | "amcc,sequoia", | ||
60 | "amcc,taishan", | ||
61 | "amcc,yosemite" | ||
62 | }; | ||
63 | |||
64 | static int __init ppc44x_probe(void) | ||
65 | { | ||
66 | unsigned long root = of_get_flat_dt_root(); | ||
67 | int i = 0; | ||
68 | |||
69 | for (i = 0; i < ARRAY_SIZE(board); i++) { | ||
70 | if (of_flat_dt_is_compatible(root, board[i])) { | ||
71 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | ||
72 | return 1; | ||
73 | } | ||
74 | } | ||
75 | |||
76 | return 0; | ||
77 | } | ||
78 | |||
79 | define_machine(ppc44x_simple) { | ||
80 | .name = "PowerPC 44x Platform", | ||
81 | .probe = ppc44x_probe, | ||
82 | .progress = udbg_progress, | ||
83 | .init_IRQ = uic_init_tree, | ||
84 | .get_irq = uic_get_irq, | ||
85 | .restart = ppc4xx_reset_system, | ||
86 | .calibrate_decr = generic_calibrate_decr, | ||
87 | }; | ||
diff --git a/arch/powerpc/platforms/44x/rainier.c b/arch/powerpc/platforms/44x/rainier.c deleted file mode 100644 index 4f1ff84c4b63..000000000000 --- a/arch/powerpc/platforms/44x/rainier.c +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * Rainier board specific routines | ||
3 | * | ||
4 | * Valentine Barshak <vbarshak@ru.mvista.com> | ||
5 | * Copyright 2007 MontaVista Software Inc. | ||
6 | * | ||
7 | * Based on the Bamboo code by | ||
8 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
9 | * Copyright 2007 IBM Corporation | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | #include <asm/machdep.h> | ||
20 | #include <asm/prom.h> | ||
21 | #include <asm/udbg.h> | ||
22 | #include <asm/time.h> | ||
23 | #include <asm/uic.h> | ||
24 | #include <asm/pci-bridge.h> | ||
25 | #include <asm/ppc4xx.h> | ||
26 | |||
27 | static __initdata struct of_device_id rainier_of_bus[] = { | ||
28 | { .compatible = "ibm,plb4", }, | ||
29 | { .compatible = "ibm,opb", }, | ||
30 | { .compatible = "ibm,ebc", }, | ||
31 | {}, | ||
32 | }; | ||
33 | |||
34 | static int __init rainier_device_probe(void) | ||
35 | { | ||
36 | of_platform_bus_probe(NULL, rainier_of_bus, NULL); | ||
37 | |||
38 | return 0; | ||
39 | } | ||
40 | machine_device_initcall(rainier, rainier_device_probe); | ||
41 | |||
42 | static int __init rainier_probe(void) | ||
43 | { | ||
44 | unsigned long root = of_get_flat_dt_root(); | ||
45 | |||
46 | if (!of_flat_dt_is_compatible(root, "amcc,rainier")) | ||
47 | return 0; | ||
48 | |||
49 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | ||
50 | |||
51 | return 1; | ||
52 | } | ||
53 | |||
54 | define_machine(rainier) { | ||
55 | .name = "Rainier", | ||
56 | .probe = rainier_probe, | ||
57 | .progress = udbg_progress, | ||
58 | .init_IRQ = uic_init_tree, | ||
59 | .get_irq = uic_get_irq, | ||
60 | .restart = ppc4xx_reset_system, | ||
61 | .calibrate_decr = generic_calibrate_decr, | ||
62 | }; | ||
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c deleted file mode 100644 index 49eb73daacdf..000000000000 --- a/arch/powerpc/platforms/44x/sequoia.c +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * Sequoia board specific routines | ||
3 | * | ||
4 | * Valentine Barshak <vbarshak@ru.mvista.com> | ||
5 | * Copyright 2007 MontaVista Software Inc. | ||
6 | * | ||
7 | * Based on the Bamboo code by | ||
8 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
9 | * Copyright 2007 IBM Corporation | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | #include <asm/machdep.h> | ||
20 | #include <asm/prom.h> | ||
21 | #include <asm/udbg.h> | ||
22 | #include <asm/time.h> | ||
23 | #include <asm/uic.h> | ||
24 | #include <asm/pci-bridge.h> | ||
25 | |||
26 | #include <asm/ppc4xx.h> | ||
27 | |||
28 | static __initdata struct of_device_id sequoia_of_bus[] = { | ||
29 | { .compatible = "ibm,plb4", }, | ||
30 | { .compatible = "ibm,opb", }, | ||
31 | { .compatible = "ibm,ebc", }, | ||
32 | {}, | ||
33 | }; | ||
34 | |||
35 | static int __init sequoia_device_probe(void) | ||
36 | { | ||
37 | of_platform_bus_probe(NULL, sequoia_of_bus, NULL); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | machine_device_initcall(sequoia, sequoia_device_probe); | ||
42 | |||
43 | static int __init sequoia_probe(void) | ||
44 | { | ||
45 | unsigned long root = of_get_flat_dt_root(); | ||
46 | |||
47 | if (!of_flat_dt_is_compatible(root, "amcc,sequoia")) | ||
48 | return 0; | ||
49 | |||
50 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | ||
51 | |||
52 | return 1; | ||
53 | } | ||
54 | |||
55 | define_machine(sequoia) { | ||
56 | .name = "Sequoia", | ||
57 | .probe = sequoia_probe, | ||
58 | .progress = udbg_progress, | ||
59 | .init_IRQ = uic_init_tree, | ||
60 | .get_irq = uic_get_irq, | ||
61 | .restart = ppc4xx_reset_system, | ||
62 | .calibrate_decr = generic_calibrate_decr, | ||
63 | }; | ||
diff --git a/arch/powerpc/platforms/44x/taishan.c b/arch/powerpc/platforms/44x/taishan.c deleted file mode 100644 index 49c78b2098b4..000000000000 --- a/arch/powerpc/platforms/44x/taishan.c +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * Taishan board specific routines based off ebony.c code | ||
3 | * original copyrights below | ||
4 | * | ||
5 | * Matt Porter <mporter@kernel.crashing.org> | ||
6 | * Copyright 2002-2005 MontaVista Software Inc. | ||
7 | * | ||
8 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | ||
9 | * Copyright (c) 2003-2005 Zultys Technologies | ||
10 | * | ||
11 | * Rewritten and ported to the merged powerpc tree: | ||
12 | * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation. | ||
13 | * | ||
14 | * Modified from ebony.c for taishan: | ||
15 | * Copyright 2007 Hugh Blemings <hugh@au.ibm.com>, IBM Corporation. | ||
16 | * | ||
17 | * This program is free software; you can redistribute it and/or modify it | ||
18 | * under the terms of the GNU General Public License as published by the | ||
19 | * Free Software Foundation; either version 2 of the License, or (at your | ||
20 | * option) any later version. | ||
21 | */ | ||
22 | |||
23 | #include <linux/init.h> | ||
24 | #include <linux/of_platform.h> | ||
25 | |||
26 | #include <asm/machdep.h> | ||
27 | #include <asm/prom.h> | ||
28 | #include <asm/udbg.h> | ||
29 | #include <asm/time.h> | ||
30 | #include <asm/uic.h> | ||
31 | #include <asm/pci-bridge.h> | ||
32 | #include <asm/ppc4xx.h> | ||
33 | |||
34 | static __initdata struct of_device_id taishan_of_bus[] = { | ||
35 | { .compatible = "ibm,plb4", }, | ||
36 | { .compatible = "ibm,opb", }, | ||
37 | { .compatible = "ibm,ebc", }, | ||
38 | {}, | ||
39 | }; | ||
40 | |||
41 | static int __init taishan_device_probe(void) | ||
42 | { | ||
43 | of_platform_bus_probe(NULL, taishan_of_bus, NULL); | ||
44 | |||
45 | return 0; | ||
46 | } | ||
47 | machine_device_initcall(taishan, taishan_device_probe); | ||
48 | |||
49 | /* | ||
50 | * Called very early, MMU is off, device-tree isn't unflattened | ||
51 | */ | ||
52 | static int __init taishan_probe(void) | ||
53 | { | ||
54 | unsigned long root = of_get_flat_dt_root(); | ||
55 | |||
56 | if (!of_flat_dt_is_compatible(root, "amcc,taishan")) | ||
57 | return 0; | ||
58 | |||
59 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | ||
60 | |||
61 | return 1; | ||
62 | } | ||
63 | |||
64 | define_machine(taishan) { | ||
65 | .name = "Taishan", | ||
66 | .probe = taishan_probe, | ||
67 | .progress = udbg_progress, | ||
68 | .init_IRQ = uic_init_tree, | ||
69 | .get_irq = uic_get_irq, | ||
70 | .restart = ppc4xx_reset_system, | ||
71 | .calibrate_decr = generic_calibrate_decr, | ||
72 | }; | ||
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index fb368dfde5d4..5da8a44ea2f6 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c | |||
@@ -30,14 +30,12 @@ | |||
30 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
31 | #include <asm/dcr.h> | 31 | #include <asm/dcr.h> |
32 | #include <asm/dcr-regs.h> | 32 | #include <asm/dcr-regs.h> |
33 | #include <mm/mmu_decl.h> | ||
33 | 34 | ||
34 | #include "ppc4xx_pci.h" | 35 | #include "ppc4xx_pci.h" |
35 | 36 | ||
36 | static int dma_offset_set; | 37 | static int dma_offset_set; |
37 | 38 | ||
38 | /* Move that to a useable header */ | ||
39 | extern unsigned long total_memory; | ||
40 | |||
41 | #define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL)) | 39 | #define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL)) |
42 | #define U64_TO_U32_HIGH(val) ((u32)((val) >> 32)) | 40 | #define U64_TO_U32_HIGH(val) ((u32)((val) >> 32)) |
43 | 41 | ||
@@ -105,7 +103,8 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose, | |||
105 | 103 | ||
106 | /* Default */ | 104 | /* Default */ |
107 | res->start = 0; | 105 | res->start = 0; |
108 | res->end = size = 0x80000000; | 106 | size = 0x80000000; |
107 | res->end = size - 1; | ||
109 | res->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH; | 108 | res->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH; |
110 | 109 | ||
111 | /* Get dma-ranges property */ | 110 | /* Get dma-ranges property */ |
@@ -167,13 +166,13 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose, | |||
167 | */ | 166 | */ |
168 | if (size < total_memory) { | 167 | if (size < total_memory) { |
169 | printk(KERN_ERR "%s: dma-ranges too small " | 168 | printk(KERN_ERR "%s: dma-ranges too small " |
170 | "(size=%llx total_memory=%lx)\n", | 169 | "(size=%llx total_memory=%llx)\n", |
171 | hose->dn->full_name, size, total_memory); | 170 | hose->dn->full_name, size, (u64)total_memory); |
172 | return -ENXIO; | 171 | return -ENXIO; |
173 | } | 172 | } |
174 | 173 | ||
175 | /* Check we are a power of 2 size and that base is a multiple of size*/ | 174 | /* Check we are a power of 2 size and that base is a multiple of size*/ |
176 | if (!is_power_of_2(size) || | 175 | if ((size & (size - 1)) != 0 || |
177 | (res->start & (size - 1)) != 0) { | 176 | (res->start & (size - 1)) != 0) { |
178 | printk(KERN_ERR "%s: dma-ranges unaligned\n", | 177 | printk(KERN_ERR "%s: dma-ranges unaligned\n", |
179 | hose->dn->full_name); | 178 | hose->dn->full_name); |
@@ -810,7 +809,7 @@ static int ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) | |||
810 | switch (port->index) { | 809 | switch (port->index) { |
811 | case 0: | 810 | case 0: |
812 | mtdcri(SDR0, PESDR0_460EX_L0CDRCTL, 0x00003230); | 811 | mtdcri(SDR0, PESDR0_460EX_L0CDRCTL, 0x00003230); |
813 | mtdcri(SDR0, PESDR0_460EX_L0DRV, 0x00000136); | 812 | mtdcri(SDR0, PESDR0_460EX_L0DRV, 0x00000130); |
814 | mtdcri(SDR0, PESDR0_460EX_L0CLK, 0x00000006); | 813 | mtdcri(SDR0, PESDR0_460EX_L0CLK, 0x00000006); |
815 | 814 | ||
816 | mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST,0x10000000); | 815 | mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST,0x10000000); |
@@ -821,10 +820,10 @@ static int ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) | |||
821 | mtdcri(SDR0, PESDR1_460EX_L1CDRCTL, 0x00003230); | 820 | mtdcri(SDR0, PESDR1_460EX_L1CDRCTL, 0x00003230); |
822 | mtdcri(SDR0, PESDR1_460EX_L2CDRCTL, 0x00003230); | 821 | mtdcri(SDR0, PESDR1_460EX_L2CDRCTL, 0x00003230); |
823 | mtdcri(SDR0, PESDR1_460EX_L3CDRCTL, 0x00003230); | 822 | mtdcri(SDR0, PESDR1_460EX_L3CDRCTL, 0x00003230); |
824 | mtdcri(SDR0, PESDR1_460EX_L0DRV, 0x00000136); | 823 | mtdcri(SDR0, PESDR1_460EX_L0DRV, 0x00000130); |
825 | mtdcri(SDR0, PESDR1_460EX_L1DRV, 0x00000136); | 824 | mtdcri(SDR0, PESDR1_460EX_L1DRV, 0x00000130); |
826 | mtdcri(SDR0, PESDR1_460EX_L2DRV, 0x00000136); | 825 | mtdcri(SDR0, PESDR1_460EX_L2DRV, 0x00000130); |
827 | mtdcri(SDR0, PESDR1_460EX_L3DRV, 0x00000136); | 826 | mtdcri(SDR0, PESDR1_460EX_L3DRV, 0x00000130); |
828 | mtdcri(SDR0, PESDR1_460EX_L0CLK, 0x00000006); | 827 | mtdcri(SDR0, PESDR1_460EX_L0CLK, 0x00000006); |
829 | mtdcri(SDR0, PESDR1_460EX_L1CLK, 0x00000006); | 828 | mtdcri(SDR0, PESDR1_460EX_L1CLK, 0x00000006); |
830 | mtdcri(SDR0, PESDR1_460EX_L2CLK, 0x00000006); | 829 | mtdcri(SDR0, PESDR1_460EX_L2CLK, 0x00000006); |