Commit 5bfa4967 authored by Jesse Barnes's avatar Jesse Barnes Committed by David Mosberger

[PATCH] ia64: map display option ROMs on SN2

By default, the sn2 PCI init code doesn't map option ROM address
ranges since PIO address space is limited.  However, we do need to map
display option ROMs in the event that userland applications want to
read and emulate them.
parent 833ae189
...@@ -328,6 +328,34 @@ sn_pci_fixup_slot(struct pci_dev *dev) ...@@ -328,6 +328,34 @@ sn_pci_fixup_slot(struct pci_dev *dev)
cmd |= PCI_COMMAND_MEMORY; cmd |= PCI_COMMAND_MEMORY;
} }
/*
* Assign addresses to the ROMs, but don't enable them yet
* Also note that we only map display card ROMs due to PIO mapping
* space scarcity.
*/
if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
unsigned long addr;
size = dev->resource[PCI_ROM_RESOURCE].end -
dev->resource[PCI_ROM_RESOURCE].start;
if (size) {
addr = (unsigned long) pciio_pio_addr(vhdl, 0,
PCIIO_SPACE_ROM,
0, size, 0, PIOMAP_FIXED);
if (!addr) {
dev->resource[PCI_ROM_RESOURCE].start = 0;
dev->resource[PCI_ROM_RESOURCE].end = 0;
printk("sn_pci_fixup(): ROM pio map failure "
"for %s\n", dev->slot_name);
}
addr |= __IA64_UNCACHED_OFFSET;
dev->resource[PCI_ROM_RESOURCE].start = addr;
dev->resource[PCI_ROM_RESOURCE].end = addr + size;
if (dev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_MEM)
cmd |= PCI_COMMAND_MEMORY;
}
}
/* /*
* Update the Command Word on the Card. * Update the Command Word on the Card.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment