diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 44 |
1 files changed, 11 insertions, 33 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 34aff47b1f55..33eec2822c66 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <asm/udbg.h> | 65 | #include <asm/udbg.h> |
66 | #include <asm/smp.h> | 66 | #include <asm/smp.h> |
67 | #include <asm/firmware.h> | 67 | #include <asm/firmware.h> |
68 | #include <asm/eeh.h> | ||
68 | 69 | ||
69 | #include "plpar_wrappers.h" | 70 | #include "plpar_wrappers.h" |
70 | #include "pseries.h" | 71 | #include "pseries.h" |
@@ -92,7 +93,7 @@ static void pSeries_show_cpuinfo(struct seq_file *m) | |||
92 | 93 | ||
93 | root = of_find_node_by_path("/"); | 94 | root = of_find_node_by_path("/"); |
94 | if (root) | 95 | if (root) |
95 | model = get_property(root, "model", NULL); | 96 | model = of_get_property(root, "model", NULL); |
96 | seq_printf(m, "machine\t\t: CHRP %s\n", model); | 97 | seq_printf(m, "machine\t\t: CHRP %s\n", model); |
97 | of_node_put(root); | 98 | of_node_put(root); |
98 | } | 99 | } |
@@ -138,8 +139,8 @@ static void __init pseries_mpic_init_IRQ(void) | |||
138 | struct mpic *mpic; | 139 | struct mpic *mpic; |
139 | 140 | ||
140 | np = of_find_node_by_path("/"); | 141 | np = of_find_node_by_path("/"); |
141 | naddr = prom_n_addr_cells(np); | 142 | naddr = of_n_addr_cells(np); |
142 | opprop = get_property(np, "platform-open-pic", &opplen); | 143 | opprop = of_get_property(np, "platform-open-pic", &opplen); |
143 | if (opprop != 0) { | 144 | if (opprop != 0) { |
144 | openpic_addr = of_read_number(opprop, naddr); | 145 | openpic_addr = of_read_number(opprop, naddr); |
145 | printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); | 146 | printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); |
@@ -188,11 +189,11 @@ static void __init pseries_mpic_init_IRQ(void) | |||
188 | break; | 189 | break; |
189 | if (strcmp(np->name, "pci") != 0) | 190 | if (strcmp(np->name, "pci") != 0) |
190 | continue; | 191 | continue; |
191 | addrp = get_property(np, "8259-interrupt-acknowledge", | 192 | addrp = of_get_property(np, "8259-interrupt-acknowledge", |
192 | NULL); | 193 | NULL); |
193 | if (addrp == NULL) | 194 | if (addrp == NULL) |
194 | continue; | 195 | continue; |
195 | naddr = prom_n_addr_cells(np); | 196 | naddr = of_n_addr_cells(np); |
196 | intack = addrp[naddr-1]; | 197 | intack = addrp[naddr-1]; |
197 | if (naddr > 1) | 198 | if (naddr > 1) |
198 | intack |= ((unsigned long)addrp[naddr-2]) << 32; | 199 | intack |= ((unsigned long)addrp[naddr-2]) << 32; |
@@ -225,7 +226,7 @@ static void __init pseries_discover_pic(void) | |||
225 | 226 | ||
226 | for (np = NULL; (np = of_find_node_by_name(np, | 227 | for (np = NULL; (np = of_find_node_by_name(np, |
227 | "interrupt-controller"));) { | 228 | "interrupt-controller"));) { |
228 | typep = get_property(np, "compatible", NULL); | 229 | typep = of_get_property(np, "compatible", NULL); |
229 | if (strstr(typep, "open-pic")) { | 230 | if (strstr(typep, "open-pic")) { |
230 | pSeries_mpic_node = of_node_get(np); | 231 | pSeries_mpic_node = of_node_get(np); |
231 | ppc_md.init_IRQ = pseries_mpic_init_IRQ; | 232 | ppc_md.init_IRQ = pseries_mpic_init_IRQ; |
@@ -334,32 +335,6 @@ static void __init pSeries_init_early(void) | |||
334 | DBG(" <- pSeries_init_early()\n"); | 335 | DBG(" <- pSeries_init_early()\n"); |
335 | } | 336 | } |
336 | 337 | ||
337 | |||
338 | static int pSeries_check_legacy_ioport(unsigned int baseport) | ||
339 | { | ||
340 | struct device_node *np; | ||
341 | |||
342 | #define I8042_DATA_REG 0x60 | ||
343 | #define FDC_BASE 0x3f0 | ||
344 | |||
345 | |||
346 | switch(baseport) { | ||
347 | case I8042_DATA_REG: | ||
348 | np = of_find_node_by_type(NULL, "8042"); | ||
349 | if (np == NULL) | ||
350 | return -ENODEV; | ||
351 | of_node_put(np); | ||
352 | break; | ||
353 | case FDC_BASE: | ||
354 | np = of_find_node_by_type(NULL, "fdc"); | ||
355 | if (np == NULL) | ||
356 | return -ENODEV; | ||
357 | of_node_put(np); | ||
358 | break; | ||
359 | } | ||
360 | return 0; | ||
361 | } | ||
362 | |||
363 | /* | 338 | /* |
364 | * Called very early, MMU is off, device-tree isn't unflattened | 339 | * Called very early, MMU is off, device-tree isn't unflattened |
365 | */ | 340 | */ |
@@ -514,6 +489,10 @@ void pSeries_power_off(void) | |||
514 | for (;;); | 489 | for (;;); |
515 | } | 490 | } |
516 | 491 | ||
492 | #ifndef CONFIG_PCI | ||
493 | void pSeries_final_fixup(void) { } | ||
494 | #endif | ||
495 | |||
517 | define_machine(pseries) { | 496 | define_machine(pseries) { |
518 | .name = "pSeries", | 497 | .name = "pSeries", |
519 | .probe = pSeries_probe, | 498 | .probe = pSeries_probe, |
@@ -532,7 +511,6 @@ define_machine(pseries) { | |||
532 | .set_rtc_time = rtas_set_rtc_time, | 511 | .set_rtc_time = rtas_set_rtc_time, |
533 | .calibrate_decr = generic_calibrate_decr, | 512 | .calibrate_decr = generic_calibrate_decr, |
534 | .progress = rtas_progress, | 513 | .progress = rtas_progress, |
535 | .check_legacy_ioport = pSeries_check_legacy_ioport, | ||
536 | .system_reset_exception = pSeries_system_reset_exception, | 514 | .system_reset_exception = pSeries_system_reset_exception, |
537 | .machine_check_exception = pSeries_machine_check_exception, | 515 | .machine_check_exception = pSeries_machine_check_exception, |
538 | }; | 516 | }; |