--- arch/ppc/kernel/prep_pci.c.dist Sat Feb 17 17:42:00 2001 +++ arch/ppc/kernel/prep_pci.c Sun Feb 18 20:47:48 2001 @@ -1084,23 +1084,37 @@ for ( i = 0 ; i <= 5 ; i++ ) { /* - * Relocate PCI I/O resources if necessary so the + * Relocate PCI memory and I/O resources if necessary so the * standard 256MB BAT covers them. */ - if ( (pci_resource_flags(dev, i) & IORESOURCE_IO) && - (dev->resource[i].start > 0x10000000) ) + if ( dev->resource[i].start > 0x10000000 ) { - printk("Relocating PCI address %lx -> %lx\n", - dev->resource[i].start, - (dev->resource[i].start & 0x00FFFFFF) - | 0x01000000); - dev->resource[i].start = - (dev->resource[i].start & 0x00FFFFFF) | 0x01000000; - pci_write_config_dword(dev, - PCI_BASE_ADDRESS_0+(i*0x4), - dev->resource[i].start ); - dev->resource[i].end = - (dev->resource[i].end & 0x00FFFFFF) | 0x01000000; + if ( pci_resource_flags(dev, i) & IORESOURCE_IO ) + { + printk("Relocating PCI I/O address %lx -> %lx\n", + dev->resource[i].start, + (dev->resource[i].start & 0x00FFFFFF) + | 0x01000000); + dev->resource[i].start = + (dev->resource[i].start & 0x00FFFFFF) | 0x01000000; + pci_write_config_dword(dev, + PCI_BASE_ADDRESS_0+(i*0x4), + dev->resource[i].start ); + dev->resource[i].end = + (dev->resource[i].end & 0x00FFFFFF) | 0x01000000; + } else + { + printk("Relocating PCI memory address %lx -> %lx\n", + dev->resource[i].start, + dev->resource[i].start & 0x0FFFFFFF); + dev->resource[i].start = + dev->resource[i].start & 0x0FFFFFFF; + pci_write_config_dword(dev, + PCI_BASE_ADDRESS_0+(i*0x4), + dev->resource[i].start ); + dev->resource[i].end = + dev->resource[i].end & 0x0FFFFFFF; + } } } #if 0