diff options
Diffstat (limited to 'arch/powerpc/platforms/iseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 0877a8834110..b72120751bbe 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include "main_store.h" | 63 | #include "main_store.h" |
64 | #include "call_sm.h" | 64 | #include "call_sm.h" |
65 | #include "call_hpt.h" | 65 | #include "call_hpt.h" |
66 | #include "pci.h" | ||
66 | 67 | ||
67 | #ifdef DEBUG | 68 | #ifdef DEBUG |
68 | #define DBG(fmt...) udbg_printf(fmt) | 69 | #define DBG(fmt...) udbg_printf(fmt) |
@@ -74,11 +75,6 @@ | |||
74 | static unsigned long build_iSeries_Memory_Map(void); | 75 | static unsigned long build_iSeries_Memory_Map(void); |
75 | static void iseries_shared_idle(void); | 76 | static void iseries_shared_idle(void); |
76 | static void iseries_dedicated_idle(void); | 77 | static void iseries_dedicated_idle(void); |
77 | #ifdef CONFIG_PCI | ||
78 | extern void iSeries_pci_final_fixup(void); | ||
79 | #else | ||
80 | static void iSeries_pci_final_fixup(void) { } | ||
81 | #endif | ||
82 | 78 | ||
83 | 79 | ||
84 | struct MemoryBlock { | 80 | struct MemoryBlock { |
@@ -112,13 +108,13 @@ static unsigned long iSeries_process_Condor_mainstore_vpd( | |||
112 | * correctly. | 108 | * correctly. |
113 | */ | 109 | */ |
114 | mb_array[0].logicalStart = 0; | 110 | mb_array[0].logicalStart = 0; |
115 | mb_array[0].logicalEnd = 0x100000000; | 111 | mb_array[0].logicalEnd = 0x100000000UL; |
116 | mb_array[0].absStart = 0; | 112 | mb_array[0].absStart = 0; |
117 | mb_array[0].absEnd = 0x100000000; | 113 | mb_array[0].absEnd = 0x100000000UL; |
118 | 114 | ||
119 | if (holeSize) { | 115 | if (holeSize) { |
120 | numMemoryBlocks = 2; | 116 | numMemoryBlocks = 2; |
121 | holeStart = holeStart & 0x000fffffffffffff; | 117 | holeStart = holeStart & 0x000fffffffffffffUL; |
122 | holeStart = addr_to_chunk(holeStart); | 118 | holeStart = addr_to_chunk(holeStart); |
123 | holeFirstChunk = holeStart; | 119 | holeFirstChunk = holeStart; |
124 | holeSize = addr_to_chunk(holeSize); | 120 | holeSize = addr_to_chunk(holeSize); |
@@ -128,9 +124,9 @@ static unsigned long iSeries_process_Condor_mainstore_vpd( | |||
128 | mb_array[0].logicalEnd = holeFirstChunk; | 124 | mb_array[0].logicalEnd = holeFirstChunk; |
129 | mb_array[0].absEnd = holeFirstChunk; | 125 | mb_array[0].absEnd = holeFirstChunk; |
130 | mb_array[1].logicalStart = holeFirstChunk; | 126 | mb_array[1].logicalStart = holeFirstChunk; |
131 | mb_array[1].logicalEnd = 0x100000000 - holeSizeChunks; | 127 | mb_array[1].logicalEnd = 0x100000000UL - holeSizeChunks; |
132 | mb_array[1].absStart = holeFirstChunk + holeSizeChunks; | 128 | mb_array[1].absStart = holeFirstChunk + holeSizeChunks; |
133 | mb_array[1].absEnd = 0x100000000; | 129 | mb_array[1].absEnd = 0x100000000UL; |
134 | } | 130 | } |
135 | return numMemoryBlocks; | 131 | return numMemoryBlocks; |
136 | } | 132 | } |
@@ -234,9 +230,9 @@ static unsigned long iSeries_process_Regatta_mainstore_vpd( | |||
234 | mb_array[i].logicalEnd, | 230 | mb_array[i].logicalEnd, |
235 | mb_array[i].absStart, mb_array[i].absEnd); | 231 | mb_array[i].absStart, mb_array[i].absEnd); |
236 | mb_array[i].absStart = addr_to_chunk(mb_array[i].absStart & | 232 | mb_array[i].absStart = addr_to_chunk(mb_array[i].absStart & |
237 | 0x000fffffffffffff); | 233 | 0x000fffffffffffffUL); |
238 | mb_array[i].absEnd = addr_to_chunk(mb_array[i].absEnd & | 234 | mb_array[i].absEnd = addr_to_chunk(mb_array[i].absEnd & |
239 | 0x000fffffffffffff); | 235 | 0x000fffffffffffffUL); |
240 | mb_array[i].logicalStart = | 236 | mb_array[i].logicalStart = |
241 | addr_to_chunk(mb_array[i].logicalStart); | 237 | addr_to_chunk(mb_array[i].logicalStart); |
242 | mb_array[i].logicalEnd = addr_to_chunk(mb_array[i].logicalEnd); | 238 | mb_array[i].logicalEnd = addr_to_chunk(mb_array[i].logicalEnd); |
@@ -320,7 +316,7 @@ struct mschunks_map mschunks_map = { | |||
320 | }; | 316 | }; |
321 | EXPORT_SYMBOL(mschunks_map); | 317 | EXPORT_SYMBOL(mschunks_map); |
322 | 318 | ||
323 | void mschunks_alloc(unsigned long num_chunks) | 319 | static void mschunks_alloc(unsigned long num_chunks) |
324 | { | 320 | { |
325 | klimit = _ALIGN(klimit, sizeof(u32)); | 321 | klimit = _ALIGN(klimit, sizeof(u32)); |
326 | mschunks_map.mapping = (u32 *)klimit; | 322 | mschunks_map.mapping = (u32 *)klimit; |
@@ -499,6 +495,8 @@ static void __init iSeries_setup_arch(void) | |||
499 | itVpdAreas.xSlicMaxLogicalProcs); | 495 | itVpdAreas.xSlicMaxLogicalProcs); |
500 | printk("Max physical processors = %d\n", | 496 | printk("Max physical processors = %d\n", |
501 | itVpdAreas.xSlicMaxPhysicalProcs); | 497 | itVpdAreas.xSlicMaxPhysicalProcs); |
498 | |||
499 | iSeries_pcibios_init(); | ||
502 | } | 500 | } |
503 | 501 | ||
504 | static void iSeries_show_cpuinfo(struct seq_file *m) | 502 | static void iSeries_show_cpuinfo(struct seq_file *m) |
@@ -641,24 +639,25 @@ static int __init iseries_probe(void) | |||
641 | } | 639 | } |
642 | 640 | ||
643 | define_machine(iseries) { | 641 | define_machine(iseries) { |
644 | .name = "iSeries", | 642 | .name = "iSeries", |
645 | .setup_arch = iSeries_setup_arch, | 643 | .setup_arch = iSeries_setup_arch, |
646 | .show_cpuinfo = iSeries_show_cpuinfo, | 644 | .show_cpuinfo = iSeries_show_cpuinfo, |
647 | .init_IRQ = iSeries_init_IRQ, | 645 | .init_IRQ = iSeries_init_IRQ, |
648 | .get_irq = iSeries_get_irq, | 646 | .get_irq = iSeries_get_irq, |
649 | .init_early = iSeries_init_early, | 647 | .init_early = iSeries_init_early, |
650 | .pcibios_fixup = iSeries_pci_final_fixup, | 648 | .pcibios_fixup = iSeries_pci_final_fixup, |
651 | .restart = mf_reboot, | 649 | .pcibios_fixup_resources= iSeries_pcibios_fixup_resources, |
652 | .power_off = mf_power_off, | 650 | .restart = mf_reboot, |
653 | .halt = mf_power_off, | 651 | .power_off = mf_power_off, |
654 | .get_boot_time = iSeries_get_boot_time, | 652 | .halt = mf_power_off, |
655 | .set_rtc_time = iSeries_set_rtc_time, | 653 | .get_boot_time = iSeries_get_boot_time, |
656 | .get_rtc_time = iSeries_get_rtc_time, | 654 | .set_rtc_time = iSeries_set_rtc_time, |
657 | .calibrate_decr = generic_calibrate_decr, | 655 | .get_rtc_time = iSeries_get_rtc_time, |
658 | .progress = iSeries_progress, | 656 | .calibrate_decr = generic_calibrate_decr, |
659 | .probe = iseries_probe, | 657 | .progress = iSeries_progress, |
660 | .ioremap = iseries_ioremap, | 658 | .probe = iseries_probe, |
661 | .iounmap = iseries_iounmap, | 659 | .ioremap = iseries_ioremap, |
660 | .iounmap = iseries_iounmap, | ||
662 | /* XXX Implement enable_pmcs for iSeries */ | 661 | /* XXX Implement enable_pmcs for iSeries */ |
663 | }; | 662 | }; |
664 | 663 | ||