diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/pci/common.c | 1 | ||||
-rw-r--r-- | arch/i386/pci/i386.c | 49 | ||||
-rw-r--r-- | arch/ppc/syslib/m8xx_setup.c | 6 |
3 files changed, 19 insertions, 37 deletions
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c index ade5bc57c34c..c96bea14b98f 100644 --- a/arch/i386/pci/common.c +++ b/arch/i386/pci/common.c | |||
@@ -165,7 +165,6 @@ static int __init pcibios_init(void) | |||
165 | if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT)) | 165 | if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT)) |
166 | pcibios_sort(); | 166 | pcibios_sort(); |
167 | #endif | 167 | #endif |
168 | pci_assign_unassigned_resources(); | ||
169 | return 0; | 168 | return 0; |
170 | } | 169 | } |
171 | 170 | ||
diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c index 93a364c82150..3cc480998a47 100644 --- a/arch/i386/pci/i386.c +++ b/arch/i386/pci/i386.c | |||
@@ -170,43 +170,26 @@ static void __init pcibios_allocate_resources(int pass) | |||
170 | static int __init pcibios_assign_resources(void) | 170 | static int __init pcibios_assign_resources(void) |
171 | { | 171 | { |
172 | struct pci_dev *dev = NULL; | 172 | struct pci_dev *dev = NULL; |
173 | int idx; | 173 | struct resource *r, *pr; |
174 | struct resource *r; | ||
175 | |||
176 | for_each_pci_dev(dev) { | ||
177 | int class = dev->class >> 8; | ||
178 | |||
179 | /* Don't touch classless devices and host bridges */ | ||
180 | if (!class || class == PCI_CLASS_BRIDGE_HOST) | ||
181 | continue; | ||
182 | |||
183 | for(idx=0; idx<6; idx++) { | ||
184 | r = &dev->resource[idx]; | ||
185 | |||
186 | /* | ||
187 | * Don't touch IDE controllers and I/O ports of video cards! | ||
188 | */ | ||
189 | if ((class == PCI_CLASS_STORAGE_IDE && idx < 4) || | ||
190 | (class == PCI_CLASS_DISPLAY_VGA && (r->flags & IORESOURCE_IO))) | ||
191 | continue; | ||
192 | |||
193 | /* | ||
194 | * We shall assign a new address to this resource, either because | ||
195 | * the BIOS forgot to do so or because we have decided the old | ||
196 | * address was unusable for some reason. | ||
197 | */ | ||
198 | if (!r->start && r->end) | ||
199 | pci_assign_resource(dev, idx); | ||
200 | } | ||
201 | 174 | ||
202 | if (pci_probe & PCI_ASSIGN_ROMS) { | 175 | if (!(pci_probe & PCI_ASSIGN_ROMS)) { |
176 | /* Try to use BIOS settings for ROMs, otherwise let | ||
177 | pci_assign_unassigned_resources() allocate the new | ||
178 | addresses. */ | ||
179 | for_each_pci_dev(dev) { | ||
203 | r = &dev->resource[PCI_ROM_RESOURCE]; | 180 | r = &dev->resource[PCI_ROM_RESOURCE]; |
204 | r->end -= r->start; | 181 | if (!r->flags || !r->start) |
205 | r->start = 0; | 182 | continue; |
206 | if (r->end) | 183 | pr = pci_find_parent_resource(dev, r); |
207 | pci_assign_resource(dev, PCI_ROM_RESOURCE); | 184 | if (!pr || request_resource(pr, r) < 0) { |
185 | r->end -= r->start; | ||
186 | r->start = 0; | ||
187 | } | ||
208 | } | 188 | } |
209 | } | 189 | } |
190 | |||
191 | pci_assign_unassigned_resources(); | ||
192 | |||
210 | return 0; | 193 | return 0; |
211 | } | 194 | } |
212 | 195 | ||
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c index a3702cfe8f7c..4c888da89b3c 100644 --- a/arch/ppc/syslib/m8xx_setup.c +++ b/arch/ppc/syslib/m8xx_setup.c | |||
@@ -57,7 +57,7 @@ unsigned char __res[sizeof(bd_t)]; | |||
57 | extern void m8xx_ide_init(void); | 57 | extern void m8xx_ide_init(void); |
58 | 58 | ||
59 | extern unsigned long find_available_memory(void); | 59 | extern unsigned long find_available_memory(void); |
60 | extern void m8xx_cpm_reset(); | 60 | extern void m8xx_cpm_reset(void); |
61 | extern void m8xx_wdt_handler_install(bd_t *bp); | 61 | extern void m8xx_wdt_handler_install(bd_t *bp); |
62 | extern void rpxfb_alloc_pages(void); | 62 | extern void rpxfb_alloc_pages(void); |
63 | extern void cpm_interrupt_init(void); | 63 | extern void cpm_interrupt_init(void); |
@@ -266,8 +266,8 @@ m8xx_show_percpuinfo(struct seq_file *m, int i) | |||
266 | 266 | ||
267 | bp = (bd_t *)__res; | 267 | bp = (bd_t *)__res; |
268 | 268 | ||
269 | seq_printf(m, "clock\t\t: %ldMHz\n" | 269 | seq_printf(m, "clock\t\t: %uMHz\n" |
270 | "bus clock\t: %ldMHz\n", | 270 | "bus clock\t: %uMHz\n", |
271 | bp->bi_intfreq / 1000000, | 271 | bp->bi_intfreq / 1000000, |
272 | bp->bi_busfreq / 1000000); | 272 | bp->bi_busfreq / 1000000); |
273 | 273 | ||