diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/boot/dts/mpc8610_hpcd.dts | 32 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pci.h | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 40 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/maple/setup.c | 59 |
5 files changed, 135 insertions, 13 deletions
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index cfc2c60d1f5f..f468d215f716 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts | |||
@@ -100,8 +100,18 @@ | |||
100 | }; | 100 | }; |
101 | 101 | ||
102 | board-control@3,0 { | 102 | board-control@3,0 { |
103 | #address-cells = <1>; | ||
104 | #size-cells = <1>; | ||
103 | compatible = "fsl,fpga-pixis"; | 105 | compatible = "fsl,fpga-pixis"; |
104 | reg = <3 0 0x20>; | 106 | reg = <3 0 0x20>; |
107 | ranges = <0 3 0 0x20>; | ||
108 | |||
109 | sdcsr_pio: gpio-controller@a { | ||
110 | #gpio-cells = <2>; | ||
111 | compatible = "fsl,fpga-pixis-gpio-bank"; | ||
112 | reg = <0xa 1>; | ||
113 | gpio-controller; | ||
114 | }; | ||
105 | }; | 115 | }; |
106 | }; | 116 | }; |
107 | 117 | ||
@@ -176,6 +186,28 @@ | |||
176 | interrupt-parent = <&mpic>; | 186 | interrupt-parent = <&mpic>; |
177 | }; | 187 | }; |
178 | 188 | ||
189 | spi@7000 { | ||
190 | #address-cells = <1>; | ||
191 | #size-cells = <0>; | ||
192 | compatible = "fsl,mpc8610-spi", "fsl,spi"; | ||
193 | reg = <0x7000 0x40>; | ||
194 | cell-index = <0>; | ||
195 | interrupts = <59 2>; | ||
196 | interrupt-parent = <&mpic>; | ||
197 | mode = "cpu"; | ||
198 | gpios = <&sdcsr_pio 7 0>; | ||
199 | |||
200 | mmc-slot@0 { | ||
201 | compatible = "fsl,mpc8610hpcd-mmc-slot", | ||
202 | "mmc-spi-slot"; | ||
203 | reg = <0>; | ||
204 | gpios = <&sdcsr_pio 0 1 /* nCD */ | ||
205 | &sdcsr_pio 1 0>; /* WP */ | ||
206 | voltage-ranges = <3300 3300>; | ||
207 | spi-max-frequency = <50000000>; | ||
208 | }; | ||
209 | }; | ||
210 | |||
179 | display@2c000 { | 211 | display@2c000 { |
180 | compatible = "fsl,diu"; | 212 | compatible = "fsl,diu"; |
181 | reg = <0x2c000 100>; | 213 | reg = <0x2c000 100>; |
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h index ba17d5d90a49..d9483c504d2d 100644 --- a/arch/powerpc/include/asm/pci.h +++ b/arch/powerpc/include/asm/pci.h | |||
@@ -195,19 +195,6 @@ extern void pcibios_bus_to_resource(struct pci_dev *dev, | |||
195 | struct resource *res, | 195 | struct resource *res, |
196 | struct pci_bus_region *region); | 196 | struct pci_bus_region *region); |
197 | 197 | ||
198 | static inline struct resource *pcibios_select_root(struct pci_dev *pdev, | ||
199 | struct resource *res) | ||
200 | { | ||
201 | struct resource *root = NULL; | ||
202 | |||
203 | if (res->flags & IORESOURCE_IO) | ||
204 | root = &ioport_resource; | ||
205 | if (res->flags & IORESOURCE_MEM) | ||
206 | root = &iomem_resource; | ||
207 | |||
208 | return root; | ||
209 | } | ||
210 | |||
211 | extern void pcibios_claim_one_bus(struct pci_bus *b); | 198 | extern void pcibios_claim_one_bus(struct pci_bus *b); |
212 | 199 | ||
213 | extern void pcibios_finish_adding_to_bus(struct pci_bus *bus); | 200 | extern void pcibios_finish_adding_to_bus(struct pci_bus *bus); |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index ef6f64950e9b..a538824616fd 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1947,8 +1947,47 @@ static void __init fixup_device_tree_maple(void) | |||
1947 | prom_setprop(isa, name, "ranges", | 1947 | prom_setprop(isa, name, "ranges", |
1948 | isa_ranges, sizeof(isa_ranges)); | 1948 | isa_ranges, sizeof(isa_ranges)); |
1949 | } | 1949 | } |
1950 | |||
1951 | #define CPC925_MC_START 0xf8000000 | ||
1952 | #define CPC925_MC_LENGTH 0x1000000 | ||
1953 | /* The values for memory-controller don't have right number of cells */ | ||
1954 | static void __init fixup_device_tree_maple_memory_controller(void) | ||
1955 | { | ||
1956 | phandle mc; | ||
1957 | u32 mc_reg[4]; | ||
1958 | char *name = "/hostbridge@f8000000"; | ||
1959 | struct prom_t *_prom = &RELOC(prom); | ||
1960 | u32 ac, sc; | ||
1961 | |||
1962 | mc = call_prom("finddevice", 1, 1, ADDR(name)); | ||
1963 | if (!PHANDLE_VALID(mc)) | ||
1964 | return; | ||
1965 | |||
1966 | if (prom_getproplen(mc, "reg") != 8) | ||
1967 | return; | ||
1968 | |||
1969 | prom_getprop(_prom->root, "#address-cells", &ac, sizeof(ac)); | ||
1970 | prom_getprop(_prom->root, "#size-cells", &sc, sizeof(sc)); | ||
1971 | if ((ac != 2) || (sc != 2)) | ||
1972 | return; | ||
1973 | |||
1974 | if (prom_getprop(mc, "reg", mc_reg, sizeof(mc_reg)) == PROM_ERROR) | ||
1975 | return; | ||
1976 | |||
1977 | if (mc_reg[0] != CPC925_MC_START || mc_reg[1] != CPC925_MC_LENGTH) | ||
1978 | return; | ||
1979 | |||
1980 | prom_printf("Fixing up bogus hostbridge on Maple...\n"); | ||
1981 | |||
1982 | mc_reg[0] = 0x0; | ||
1983 | mc_reg[1] = CPC925_MC_START; | ||
1984 | mc_reg[2] = 0x0; | ||
1985 | mc_reg[3] = CPC925_MC_LENGTH; | ||
1986 | prom_setprop(mc, name, "reg", mc_reg, sizeof(mc_reg)); | ||
1987 | } | ||
1950 | #else | 1988 | #else |
1951 | #define fixup_device_tree_maple() | 1989 | #define fixup_device_tree_maple() |
1990 | #define fixup_device_tree_maple_memory_controller() | ||
1952 | #endif | 1991 | #endif |
1953 | 1992 | ||
1954 | #ifdef CONFIG_PPC_CHRP | 1993 | #ifdef CONFIG_PPC_CHRP |
@@ -2189,6 +2228,7 @@ static void __init fixup_device_tree_efika(void) | |||
2189 | static void __init fixup_device_tree(void) | 2228 | static void __init fixup_device_tree(void) |
2190 | { | 2229 | { |
2191 | fixup_device_tree_maple(); | 2230 | fixup_device_tree_maple(); |
2231 | fixup_device_tree_maple_memory_controller(); | ||
2192 | fixup_device_tree_chrp(); | 2232 | fixup_device_tree_chrp(); |
2193 | fixup_device_tree_pmac(); | 2233 | fixup_device_tree_pmac(); |
2194 | fixup_device_tree_efika(); | 2234 | fixup_device_tree_efika(); |
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c index 51eec0cd5519..627908a4cd77 100644 --- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/of_platform.h> | 37 | #include <linux/of_platform.h> |
38 | #include <sysdev/fsl_pci.h> | 38 | #include <sysdev/fsl_pci.h> |
39 | #include <sysdev/fsl_soc.h> | 39 | #include <sysdev/fsl_soc.h> |
40 | #include <sysdev/simple_gpio.h> | ||
40 | 41 | ||
41 | #include "mpc86xx.h" | 42 | #include "mpc86xx.h" |
42 | 43 | ||
@@ -51,6 +52,9 @@ static struct of_device_id __initdata mpc8610_ids[] = { | |||
51 | 52 | ||
52 | static int __init mpc8610_declare_of_platform_devices(void) | 53 | static int __init mpc8610_declare_of_platform_devices(void) |
53 | { | 54 | { |
55 | /* Firstly, register PIXIS GPIOs. */ | ||
56 | simple_gpiochip_init("fsl,fpga-pixis-gpio-bank"); | ||
57 | |||
54 | /* Without this call, the SSI device driver won't get probed. */ | 58 | /* Without this call, the SSI device driver won't get probed. */ |
55 | of_platform_bus_probe(NULL, mpc8610_ids, NULL); | 59 | of_platform_bus_probe(NULL, mpc8610_ids, NULL); |
56 | 60 | ||
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index bfd60e4accee..0636a3df6978 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -335,3 +335,62 @@ define_machine(maple) { | |||
335 | .progress = maple_progress, | 335 | .progress = maple_progress, |
336 | .power_save = power4_idle, | 336 | .power_save = power4_idle, |
337 | }; | 337 | }; |
338 | |||
339 | #ifdef CONFIG_EDAC | ||
340 | /* | ||
341 | * Register a platform device for CPC925 memory controller on | ||
342 | * Motorola ATCA-6101 blade. | ||
343 | */ | ||
344 | #define MAPLE_CPC925_MODEL "Motorola,ATCA-6101" | ||
345 | static int __init maple_cpc925_edac_setup(void) | ||
346 | { | ||
347 | struct platform_device *pdev; | ||
348 | struct device_node *np = NULL; | ||
349 | struct resource r; | ||
350 | const unsigned char *model; | ||
351 | int ret; | ||
352 | |||
353 | np = of_find_node_by_path("/"); | ||
354 | if (!np) { | ||
355 | printk(KERN_ERR "%s: Unable to get root node\n", __func__); | ||
356 | return -ENODEV; | ||
357 | } | ||
358 | |||
359 | model = (const unsigned char *)of_get_property(np, "model", NULL); | ||
360 | if (!model) { | ||
361 | printk(KERN_ERR "%s: Unabel to get model info\n", __func__); | ||
362 | return -ENODEV; | ||
363 | } | ||
364 | |||
365 | ret = strcmp(model, MAPLE_CPC925_MODEL); | ||
366 | of_node_put(np); | ||
367 | |||
368 | if (ret != 0) | ||
369 | return 0; | ||
370 | |||
371 | np = of_find_node_by_type(NULL, "memory-controller"); | ||
372 | if (!np) { | ||
373 | printk(KERN_ERR "%s: Unable to find memory-controller node\n", | ||
374 | __func__); | ||
375 | return -ENODEV; | ||
376 | } | ||
377 | |||
378 | ret = of_address_to_resource(np, 0, &r); | ||
379 | of_node_put(np); | ||
380 | |||
381 | if (ret < 0) { | ||
382 | printk(KERN_ERR "%s: Unable to get memory-controller reg\n", | ||
383 | __func__); | ||
384 | return -ENODEV; | ||
385 | } | ||
386 | |||
387 | pdev = platform_device_register_simple("cpc925_edac", 0, &r, 1); | ||
388 | if (IS_ERR(pdev)) | ||
389 | return PTR_ERR(pdev); | ||
390 | |||
391 | printk(KERN_INFO "%s: CPC925 platform device created\n", __func__); | ||
392 | |||
393 | return 0; | ||
394 | } | ||
395 | machine_device_initcall(maple, maple_cpc925_edac_setup); | ||
396 | #endif | ||