|
@@ -430,7 +430,7 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
|
|
struct pcidev_info *pcidev_info = NULL;
|
|
struct pcidev_info *pcidev_info = NULL;
|
|
struct sn_irq_info *sn_irq_info = NULL;
|
|
struct sn_irq_info *sn_irq_info = NULL;
|
|
struct resource *res;
|
|
struct resource *res;
|
|
- size_t image_size, size;
|
|
|
|
|
|
+ size_t size;
|
|
|
|
|
|
if (sn_acpi_get_pcidev_info(dev, &pcidev_info, &sn_irq_info)) {
|
|
if (sn_acpi_get_pcidev_info(dev, &pcidev_info, &sn_irq_info)) {
|
|
panic("%s: Failure obtaining pcidev_info for %s\n",
|
|
panic("%s: Failure obtaining pcidev_info for %s\n",
|
|
@@ -444,13 +444,17 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
|
|
* of the shadowed copy, and the actual length of the ROM image.
|
|
* of the shadowed copy, and the actual length of the ROM image.
|
|
*/
|
|
*/
|
|
size = pci_resource_len(dev, PCI_ROM_RESOURCE);
|
|
size = pci_resource_len(dev, PCI_ROM_RESOURCE);
|
|
- addr = ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE],
|
|
|
|
- size);
|
|
|
|
- image_size = pci_get_rom_size(dev, addr, size);
|
|
|
|
|
|
+
|
|
res = &dev->resource[PCI_ROM_RESOURCE];
|
|
res = &dev->resource[PCI_ROM_RESOURCE];
|
|
- res->start = (unsigned long) addr;
|
|
|
|
- res->end = (unsigned long) addr + image_size - 1;
|
|
|
|
- res->flags |= IORESOURCE_ROM_BIOS_COPY;
|
|
|
|
|
|
+
|
|
|
|
+ pci_disable_rom(dev);
|
|
|
|
+ if (res->parent)
|
|
|
|
+ release_resource(res);
|
|
|
|
+
|
|
|
|
+ res->start = pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE];
|
|
|
|
+ res->end = res->start + size - 1;
|
|
|
|
+ res->flags = IORESOURCE_MEM | IORESOURCE_ROM_SHADOW |
|
|
|
|
+ IORESOURCE_PCI_FIXED;
|
|
}
|
|
}
|
|
sn_pci_fixup_slot(dev, pcidev_info, sn_irq_info);
|
|
sn_pci_fixup_slot(dev, pcidev_info, sn_irq_info);
|
|
}
|
|
}
|