unsigned long value;
resource_t moving;
- if ((dev->on_mainboard) && (dev->rom_address == 0)) {
- /* Skip it if rom_address is not set in the MB Config.lb. */
- return;
- }
-
/* Initialize the resources to nothing. */
resource = new_resource(dev, index);
}
resource->flags = 0;
}
-
- /* For on board device with embedded ROM image, the ROM image is at
- * fixed address specified in the Config.lb, the dev->rom_address is
- * inited by driver_pci_onboard_ops::enable_dev() */
- if ((dev->on_mainboard) && (dev->rom_address != 0)) {
- resource->base = dev->rom_address;
- resource->flags |= IORESOURCE_MEM | IORESOURCE_READONLY |
- IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
- }
-
compact_resources(dev);
}
return;
}
+ /* If this resource is fixed don't worry about it. */
+ if (resource->flags & IORESOURCE_FIXED) {
+ return;
+ }
+
/* If I have already stored this resource don't worry about it. */
if (resource->flags & IORESOURCE_STORED) {
return;
void run_bios(struct device *dev, unsigned long addr);
struct rom_header *rom, *ram;
-#if CONFIG_PCI_ROM_RUN != 1
- /* We want to execute VGA option ROMs when CONFIG_VGA_ROM_RUN
- * is set but CONFIG_PCI_ROM_RUN is not. In this case we skip
- * all other option ROM types.
- */
- if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
+ if (CONFIG_PCI_ROM_RUN != 1 && /* Only execute VGA ROMs. */
+ ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA))
+ return;
+
+ if (CONFIG_VGA_ROM_RUN != 1 && /* Only execute non-VGA ROMs. */
+ ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA))
return;
-#endif
rom = pci_rom_probe(dev);
if (rom == NULL)
#if CONFIG_PCIX_PLUGIN_SUPPORT == 1
pos = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (pos) {
- printk_debug("%s subbordinate bus PCI-X\n", dev_path(dev));
+ printk_debug("%s subordinate bus PCI-X\n", dev_path(dev));
return &default_pcix_ops_bus;
}
#endif
flags = pci_read_config16(dev, pos + PCI_CAP_FLAGS);
if ((flags >> 13) == 1) {
/* Host or Secondary Interface */
- printk_debug("%s subbordinate bus Hypertransport\n",
+ printk_debug("%s subordinate bus Hypertransport\n",
dev_path(dev));
return &default_ht_ops_bus;
}
case PCI_EXP_TYPE_ROOT_PORT:
case PCI_EXP_TYPE_UPSTREAM:
case PCI_EXP_TYPE_DOWNSTREAM:
- printk_debug("%s subbordinate bus PCI Express\n",
+ printk_debug("%s subordinate bus PCI Express\n",
dev_path(dev));
return &default_pciexp_ops_bus;
case PCI_EXP_TYPE_PCI_BRIDGE:
- printk_debug("%s subbordinate PCI\n", dev_path(dev));
+ printk_debug("%s subordinate PCI\n", dev_path(dev));
return &default_pci_ops_bus;
default:
break;
for (driver = &pci_drivers[0]; driver != &epci_drivers[0]; driver++) {
if ((driver->vendor == dev->vendor) &&
(driver->device == dev->device)) {
- dev->ops = driver->ops;
+ dev->ops = (struct device_operations *)driver->ops;
printk_spew("%s [%04x/%04x] %sops\n",
dev_path(dev),
driver->vendor, driver->device,
device_t pdev;
u8 line;
u8 irq;
- u8 readback;
/* Each slot may contain up to eight functions */
for (funct = 0; funct < 8; funct++) {
pIntAtoD[line - 1]);
#ifdef PARANOID_IRQ_ASSIGNMENTS
- readback = pci_read_config8(pdev, PCI_INTERRUPT_LINE);
- printk_debug(" Readback = %d\n", readback);
+ irq = pci_read_config8(pdev, PCI_INTERRUPT_LINE);
+ printk_debug(" Readback = %d\n", irq);
#endif
// Change to level triggered