]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
PCI: collapse pcibios_resource_to_bus
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 24 Feb 2012 03:19:04 +0000 (20:19 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 24 Feb 2012 03:19:04 +0000 (20:19 -0700)
Everybody uses the generic pcibios_resource_to_bus() supplied by the core
now, so remove the ARCH_HAS_GENERIC_PCI_OFFSETS used during conversion.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
13 files changed:
arch/alpha/include/asm/pci.h
arch/arm/include/asm/pci.h
arch/ia64/include/asm/pci.h
arch/microblaze/include/asm/pci.h
arch/mips/include/asm/pci.h
arch/mn10300/include/asm/pci.h
arch/parisc/include/asm/pci.h
arch/powerpc/include/asm/pci.h
arch/sh/include/asm/pci.h
arch/sparc/include/asm/pci_32.h
arch/sparc/include/asm/pci_64.h
drivers/pci/probe.c
include/asm-generic/pci.h

index 121c797eb14fb8005c899f650ea8e438e7341bd4..d01afb78919c076c9a064c30dd29af8deb9a8bfc 100644 (file)
@@ -100,8 +100,6 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
        return channel ? 15 : 14;
 }
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
 
 static inline int pci_proc_domain(struct pci_bus *bus)
index 4748a75ed112ee9ccc380e26c0ccc8e94a708ec0..a98a2e112fae0ef9b33ac8319398dde8418b0b09 100644 (file)
@@ -57,8 +57,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
 extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
                                enum pci_mmap_state mmap_state, int write_combine);
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 /*
  * Dummy implementation; always return 0.
  */
index 519bb5ce30754c2930c05c0fb6d702fb6d4903f1..b22e5f5fa5939ea0ab41ba929b7bfddf0d9c122e 100644 (file)
@@ -108,8 +108,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
        return (pci_domain_nr(bus) != 0);
 }
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 static inline struct resource *
 pcibios_select_root(struct pci_dev *pdev, struct resource *res)
 {
index 8db01f705b3c9902d2d8d3786503e78c8908312f..a0da88bf70c575ab9000fb2d2cae86a01fd055f6 100644 (file)
@@ -94,8 +94,6 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
  */
 #define PCI_DMA_BUS_IS_PHYS     (1)
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 static inline struct resource *pcibios_select_root(struct pci_dev *pdev,
                        struct resource *res)
 {
index 6420e8df4e45f6163bdd985eff956fc01271941f..fcd4060f642196b2e248fac9e3eca2d8cb3bb6d4 100644 (file)
@@ -113,8 +113,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
 }
 #endif
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
 
 static inline int pci_proc_domain(struct pci_bus *bus)
index dfe1581c0c9db12ddd8dda845e125f34b34497de..8137c25c4e15912841f702a655b05677d0c90a04 100644 (file)
@@ -85,8 +85,6 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
 /* implement the pci_ DMA API in terms of the generic device dma_ one */
 #include <asm-generic/pci-dma-compat.h>
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 static inline struct resource *
 pcibios_select_root(struct pci_dev *pdev, struct resource *res)
 {
index a8b591fdd56487c40b643cdaeaa4671e56f604da..3234f492d5754b3935d03f73e3ead2bb940747c5 100644 (file)
@@ -215,8 +215,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
 }
 #endif
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 static inline void pcibios_penalize_isa_irq(int irq, int active)
 {
        /* We don't need to penalize isa irq's */
index 839178bf27765d70cb3ecca02a6051eaeb5306a7..201e352d488d7bf5aab4d84d6e16451178a6f9b5 100644 (file)
@@ -154,8 +154,6 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
 
 #endif /* CONFIG_PPC64 */
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 extern void pcibios_claim_one_bus(struct pci_bus *b);
 
 extern void pcibios_finish_adding_to_bus(struct pci_bus *bus);
index 3b5b6abb3aea0216db2bf05883c3ef346f433738..bff96c2e7d254f520aa3c089a8bded0dc2ea2ed6 100644 (file)
@@ -114,8 +114,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
 /* Board-specific fixup routines. */
 int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin);
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 #define pci_domain_nr(bus) ((struct pci_channel *)(bus)->sysdata)->index
 
 static inline int pci_proc_domain(struct pci_bus *bus)
index 6384f30429bb1458eb815a9469c47d41fe5ff76e..dc503297481f4673874b973719c9afa79f004faa 100644 (file)
@@ -52,8 +52,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
  * 64Kbytes by the Host controller.
  */
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 {
        return PCI_IRQ_NONE;
index 2918bd12c19b48c3a43839e8fec8e2e8f27a92e0..1633b718d3bc3c608ef59d4a7068108e815d1029 100644 (file)
@@ -73,8 +73,6 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
                               enum pci_mmap_state mmap_state,
                               int write_combine);
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 {
        return PCI_IRQ_NONE;
index a677b1e995de275c6869189f544e64110e8af5eb..36c22032ea14a25955c0b2a9c43a2a5f121278b6 100644 (file)
@@ -66,8 +66,8 @@ static bool resource_contains(struct resource *res1, struct resource *res2)
        return res1->start <= res2->start && res1->end >= res2->end;
 }
 
-void pci_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
-                       struct resource *res)
+void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
+                            struct resource *res)
 {
        struct pci_host_bridge *bridge = pci_host_bridge(dev);
        struct pci_host_bridge_window *window;
@@ -86,6 +86,7 @@ void pci_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
        region->start = res->start - offset;
        region->end = res->end - offset;
 }
+EXPORT_SYMBOL(pcibios_resource_to_bus);
 
 static bool region_contains(struct pci_bus_region *region1,
                            struct pci_bus_region *region2)
@@ -93,8 +94,8 @@ static bool region_contains(struct pci_bus_region *region1,
        return region1->start <= region2->start && region1->end >= region2->end;
 }
 
-void pci_bus_to_resource(struct pci_dev *dev, struct resource *res,
-                        struct pci_bus_region *region)
+void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
+                            struct pci_bus_region *region)
 {
        struct pci_host_bridge *bridge = pci_host_bridge(dev);
        struct pci_host_bridge_window *window;
@@ -117,22 +118,7 @@ void pci_bus_to_resource(struct pci_dev *dev, struct resource *res,
        res->start = region->start + offset;
        res->end = region->end + offset;
 }
-
-#ifdef ARCH_HAS_GENERIC_PCI_OFFSETS
-void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
-                            struct resource *res)
-{
-       pci_resource_to_bus(dev, region, res);
-}
-EXPORT_SYMBOL(pcibios_resource_to_bus);
-
-void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
-                            struct pci_bus_region *region)
-{
-       pci_bus_to_resource(dev, res, region);
-}
 EXPORT_SYMBOL(pcibios_bus_to_resource);
-#endif
 
 /*
  * PCI Bus Class
@@ -309,11 +295,11 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
                        pci_write_config_dword(dev, pos + 4, 0);
                        region.start = 0;
                        region.end = sz64;
-                       pci_bus_to_resource(dev, res, &region);
+                       pcibios_bus_to_resource(dev, res, &region);
                } else {
                        region.start = l64;
                        region.end = l64 + sz64;
-                       pci_bus_to_resource(dev, res, &region);
+                       pcibios_bus_to_resource(dev, res, &region);
                        dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n",
                                   pos, res);
                }
@@ -325,7 +311,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
 
                region.start = l;
                region.end = l + sz;
-               pci_bus_to_resource(dev, res, &region);
+               pcibios_bus_to_resource(dev, res, &region);
 
                dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n", pos, res);
        }
@@ -383,7 +369,7 @@ static void __devinit pci_read_bridge_io(struct pci_bus *child)
                res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO;
                region.start = base;
                region.end = limit + 0xfff;
-               pci_bus_to_resource(dev, &res2, &region);
+               pcibios_bus_to_resource(dev, &res2, &region);
                if (!res->start)
                        res->start = res2.start;
                if (!res->end)
@@ -409,7 +395,7 @@ static void __devinit pci_read_bridge_mmio(struct pci_bus *child)
                res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
                region.start = base;
                region.end = limit + 0xfffff;
-               pci_bus_to_resource(dev, res, &region);
+               pcibios_bus_to_resource(dev, res, &region);
                dev_printk(KERN_DEBUG, &dev->dev, "  bridge window %pR\n", res);
        }
 }
@@ -458,7 +444,7 @@ static void __devinit pci_read_bridge_mmio_pref(struct pci_bus *child)
                        res->flags |= IORESOURCE_MEM_64;
                region.start = base;
                region.end = limit + 0xfffff;
-               pci_bus_to_resource(dev, res, &region);
+               pcibios_bus_to_resource(dev, res, &region);
                dev_printk(KERN_DEBUG, &dev->dev, "  bridge window %pR\n", res);
        }
 }
@@ -1071,24 +1057,24 @@ int pci_setup_device(struct pci_dev *dev)
                                region.end = 0x1F7;
                                res = &dev->resource[0];
                                res->flags = LEGACY_IO_RESOURCE;
-                               pci_bus_to_resource(dev, res, &region);
+                               pcibios_bus_to_resource(dev, res, &region);
                                region.start = 0x3F6;
                                region.end = 0x3F6;
                                res = &dev->resource[1];
                                res->flags = LEGACY_IO_RESOURCE;
-                               pci_bus_to_resource(dev, res, &region);
+                               pcibios_bus_to_resource(dev, res, &region);
                        }
                        if ((progif & 4) == 0) {
                                region.start = 0x170;
                                region.end = 0x177;
                                res = &dev->resource[2];
                                res->flags = LEGACY_IO_RESOURCE;
-                               pci_bus_to_resource(dev, res, &region);
+                               pcibios_bus_to_resource(dev, res, &region);
                                region.start = 0x376;
                                region.end = 0x376;
                                res = &dev->resource[3];
                                res->flags = LEGACY_IO_RESOURCE;
-                               pci_bus_to_resource(dev, res, &region);
+                               pcibios_bus_to_resource(dev, res, &region);
                        }
                }
                break;
index 0410346e2cf65d78415889af029f7b1fced3cd5e..e80a0495e5b0e063fb6f8ac655981b9385d9f7bf 100644 (file)
@@ -6,8 +6,6 @@
 #ifndef _ASM_GENERIC_PCI_H
 #define _ASM_GENERIC_PCI_H
 
-#define ARCH_HAS_GENERIC_PCI_OFFSETS
-
 static inline struct resource *
 pcibios_select_root(struct pci_dev *pdev, struct resource *res)
 {