@@ -189,10 +189,14 @@ extern void pcibios_claim_one_bus(struct pci_bus *);
static struct resource irongate_io = {
.name = "Irongate PCI IO",
+ .start = 0,
+ .end = 0xffff,
.flags = IORESOURCE_IO,
};
static struct resource irongate_mem = {
.name = "Irongate PCI MEM",
+ .start = 0,
+ .end = 0xffffffff,
.flags = IORESOURCE_MEM,
};
static struct resource busn_resource = {
@@ -208,7 +212,6 @@ nautilus_init_pci(void)
struct pci_controller *hose = hose_head;
struct pci_host_bridge *bridge;
struct pci_bus *bus;
- struct pci_dev *irongate;
unsigned long bus_align, bus_size, pci_mem;
unsigned long memtop = max_low_pfn << PAGE_SHIFT;
int ret;
@@ -217,8 +220,8 @@ nautilus_init_pci(void)
if (!bridge)
return;
- pci_add_resource(&bridge->windows, &ioport_resource);
- pci_add_resource(&bridge->windows, &iomem_resource);
+ pci_add_resource(&bridge->windows, &irongate_io);
+ pci_add_resource(&bridge->windows, &irongate_mem);
pci_add_resource(&bridge->windows, &busn_resource);
bridge->dev.parent = NULL;
bridge->sysdata = hose;
@@ -237,33 +240,30 @@ nautilus_init_pci(void)
bus = hose->bus = bridge->bus;
pcibios_claim_one_bus(bus);
- irongate = pci_get_domain_bus_and_slot(pci_domain_nr(bus), 0, 0);
- bus->self = irongate;
- bus->resource[0] = &irongate_io;
- bus->resource[1] = &irongate_mem;
-
pci_bus_size_bridges(bus);
- /* IO port range. */
- bus->resource[0]->start = 0;
- bus->resource[0]->end = 0xffff;
-
+ printk("bus->resource[1] %pR\n", &bus->resource[1]);
/* Set up PCI memory range - limit is hardwired to 0xffffffff,
base must be at aligned to 16Mb. */
bus_align = bus->resource[1]->start;
bus_size = bus->resource[1]->end + 1 - bus_align;
if (bus_align < 0x1000000UL)
bus_align = 0x1000000UL;
+ printk("bus_align %#lx bus_size %#lx\n", bus_align, bus_size);
pci_mem = (0x100000000UL - bus_size) & -bus_align;
+ printk("memtop %#lx pci_mem %#lx\n", memtop, pci_mem);
+ irongate_mem.start = pci_mem;
bus->resource[1]->start = pci_mem;
- bus->resource[1]->end = 0xffffffffUL;
- if (request_resource(&iomem_resource, bus->resource[1]) < 0)
- printk(KERN_ERR "Failed to request MEM on hose 0\n");
+ if (request_resource(&iomem_resource, &irongate_mem) < 0)
+ printk(KERN_ERR "Failed to request %pR on hose 0\n",
+ &irongate_mem);
if (pci_mem < memtop)
memtop = pci_mem;
+ printk("memtop %#lx alpha_mv.min_mem_address %#lx\n", memtop,
+ alpha_mv.min_mem_address);
if (memtop > alpha_mv.min_mem_address) {
free_reserved_area(__va(alpha_mv.min_mem_address),
__va(memtop), -1, NULL);