diff options
Diffstat (limited to 'arch/x86/pci/i386.c')
-rw-r--r-- | arch/x86/pci/i386.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 2ead72363077..94f6c73a53d0 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -241,44 +241,6 @@ void __init pcibios_resource_survey(void) | |||
241 | */ | 241 | */ |
242 | fs_initcall(pcibios_assign_resources); | 242 | fs_initcall(pcibios_assign_resources); |
243 | 243 | ||
244 | int pcibios_enable_resources(struct pci_dev *dev, int mask) | ||
245 | { | ||
246 | u16 cmd, old_cmd; | ||
247 | int idx; | ||
248 | struct resource *r; | ||
249 | |||
250 | pci_read_config_word(dev, PCI_COMMAND, &cmd); | ||
251 | old_cmd = cmd; | ||
252 | for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) { | ||
253 | /* Only set up the requested stuff */ | ||
254 | if (!(mask & (1 << idx))) | ||
255 | continue; | ||
256 | |||
257 | r = &dev->resource[idx]; | ||
258 | if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM))) | ||
259 | continue; | ||
260 | if ((idx == PCI_ROM_RESOURCE) && | ||
261 | (!(r->flags & IORESOURCE_ROM_ENABLE))) | ||
262 | continue; | ||
263 | if (!r->start && r->end) { | ||
264 | printk(KERN_ERR "PCI: Device %s not available " | ||
265 | "because of resource %d collisions\n", | ||
266 | pci_name(dev), idx); | ||
267 | return -EINVAL; | ||
268 | } | ||
269 | if (r->flags & IORESOURCE_IO) | ||
270 | cmd |= PCI_COMMAND_IO; | ||
271 | if (r->flags & IORESOURCE_MEM) | ||
272 | cmd |= PCI_COMMAND_MEMORY; | ||
273 | } | ||
274 | if (cmd != old_cmd) { | ||
275 | printk("PCI: Enabling device %s (%04x -> %04x)\n", | ||
276 | pci_name(dev), old_cmd, cmd); | ||
277 | pci_write_config_word(dev, PCI_COMMAND, cmd); | ||
278 | } | ||
279 | return 0; | ||
280 | } | ||
281 | |||
282 | /* | 244 | /* |
283 | * If we set up a device for bus mastering, we need to check the latency | 245 | * If we set up a device for bus mastering, we need to check the latency |
284 | * timer as certain crappy BIOSes forget to set it properly. | 246 | * timer as certain crappy BIOSes forget to set it properly. |