x86: page.h: move remaining bits and pieces
[linux-2.6] / drivers / pci / probe.c
index c2f8a78..5fd5852 100644 (file)
@@ -276,7 +276,8 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
                        sz = pci_size(l, sz, (u32)PCI_ROM_ADDRESS_MASK);
                        if (sz) {
                                res->flags = (l & IORESOURCE_ROM_ENABLE) |
-                                 IORESOURCE_MEM | IORESOURCE_READONLY;
+                                 IORESOURCE_MEM | IORESOURCE_PREFETCH |
+                                 IORESOURCE_READONLY | IORESOURCE_CACHEABLE;
                                res->start = l & PCI_ROM_ADDRESS_MASK;
                                res->end = res->start + (unsigned long) sz;
                        }
@@ -454,22 +455,6 @@ struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int
        return child;
 }
 
-static void pci_enable_crs(struct pci_dev *dev)
-{
-       u16 cap, rpctl;
-       int rpcap = pci_find_capability(dev, PCI_CAP_ID_EXP);
-       if (!rpcap)
-               return;
-
-       pci_read_config_word(dev, rpcap + PCI_CAP_FLAGS, &cap);
-       if (((cap & PCI_EXP_FLAGS_TYPE) >> 4) != PCI_EXP_TYPE_ROOT_PORT)
-               return;
-
-       pci_read_config_word(dev, rpcap + PCI_EXP_RTCTL, &rpctl);
-       rpctl |= PCI_EXP_RTCTL_CRSSVE;
-       pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl);
-}
-
 static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max)
 {
        struct pci_bus *parent = child->parent;
@@ -516,8 +501,6 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass
        pci_write_config_word(dev, PCI_BRIDGE_CONTROL,
                              bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT);
 
-       pci_enable_crs(dev);
-
        if ((buses & 0xffff00) && !pcibios_assign_all_busses() && !is_cardbus) {
                unsigned int cmax, busnr;
                /*
@@ -1227,16 +1210,19 @@ static void __init pci_sort_breadthfirst_klist(void)
        struct klist_node *n;
        struct device *dev;
        struct pci_dev *pdev;
+       struct klist *device_klist;
+
+       device_klist = bus_get_device_klist(&pci_bus_type);
 
-       spin_lock(&pci_bus_type.klist_devices.k_lock);
-       list_for_each_safe(pos, tmp, &pci_bus_type.klist_devices.k_list) {
+       spin_lock(&device_klist->k_lock);
+       list_for_each_safe(pos, tmp, &device_klist->k_list) {
                n = container_of(pos, struct klist_node, n_node);
                dev = container_of(n, struct device, knode_bus);
                pdev = to_pci_dev(dev);
                pci_insertion_sort_klist(pdev, &sorted_devices);
        }
-       list_splice(&sorted_devices, &pci_bus_type.klist_devices.k_list);
-       spin_unlock(&pci_bus_type.klist_devices.k_lock);
+       list_splice(&sorted_devices, &device_klist->k_list);
+       spin_unlock(&device_klist->k_lock);
 }
 
 static void __init pci_insertion_sort_devices(struct pci_dev *a, struct list_head *list)