]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/pci.h
Merge branch 'audit.b37' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
[linux-2.6-omap-h63xx.git] / include / asm-mips / pci.h
index c9a00ca1c012098931854e96bfe17d9f47c78eeb..7f0f120ca07c23b6d42e2bdee1c3081095bf4c07 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef _ASM_PCI_H
 #define _ASM_PCI_H
 
-#include <linux/config.h>
 #include <linux/mm.h>
 
 #ifdef __KERNEL__
@@ -40,6 +39,11 @@ struct pci_controller {
        unsigned int need_domain_info;
 
        int iommu;
+
+       /* Optional access methods for reading/writing the bus number
+          of the PCI controller */
+       int (*get_busno)(void);
+       void (*set_busno)(int busno);
 };
 
 /*
@@ -142,8 +146,22 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
 
 extern void pcibios_resource_to_bus(struct pci_dev *dev,
        struct pci_bus_region *region, struct resource *res);
-extern void pcibios_bus_to_resource(struct pci_dev *dev,
-       struct resource *res, struct pci_bus_region *region);
+
+extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
+                                   struct pci_bus_region *region);
+
+static inline struct resource *
+pcibios_select_root(struct pci_dev *pdev, struct resource *res)
+{
+       struct resource *root = NULL;
+
+       if (res->flags & IORESOURCE_IO)
+               root = &ioport_resource;
+       if (res->flags & IORESOURCE_MEM)
+               root = &iomem_resource;
+
+       return root;
+}
 
 #ifdef CONFIG_PCI_DOMAINS
 
@@ -169,17 +187,10 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev)
 /* Do platform specific device initialization at pci_enable_device() time */
 extern int pcibios_plat_dev_init(struct pci_dev *dev);
 
-static inline struct resource *
-pcibios_select_root(struct pci_dev *pdev, struct resource *res)
+/* Chances are this interrupt is wired PC-style ...  */
+static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 {
-       struct resource *root = NULL;
-
-       if (res->flags & IORESOURCE_IO)
-               root = &ioport_resource;
-       if (res->flags & IORESOURCE_MEM)
-               root = &iomem_resource;
-
-       return root;
+       return channel ? 15 : 14;
 }
 
 #endif /* _ASM_PCI_H */