diff options
-rw-r--r-- | arch/sparc/kernel/pcic.c | 8 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci.c | 8 | ||||
-rw-r--r-- | include/asm-sparc/pci.h | 3 | ||||
-rw-r--r-- | include/asm-sparc64/pci.h | 3 |
4 files changed, 22 insertions, 0 deletions
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 207f1b6eef53..3fa5f95c4614 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -944,6 +944,14 @@ int pcibios_assign_resource(struct pci_dev *pdev, int resource) | |||
944 | return -ENXIO; | 944 | return -ENXIO; |
945 | } | 945 | } |
946 | 946 | ||
947 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | ||
948 | { | ||
949 | struct pcidev_cookie *pc = pdev->sysdata; | ||
950 | |||
951 | return pc->prom_node; | ||
952 | } | ||
953 | EXPORT_SYMBOL(pci_device_to_OF_node); | ||
954 | |||
947 | /* | 955 | /* |
948 | * This probably belongs here rather than ioport.c because | 956 | * This probably belongs here rather than ioport.c because |
949 | * we do not want this crud linked into SBus kernels. | 957 | * we do not want this crud linked into SBus kernels. |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 6fedfb98f8b0..196b4b72482b 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -681,4 +681,12 @@ void arch_teardown_msi_irq(unsigned int virt_irq) | |||
681 | } | 681 | } |
682 | #endif /* !(CONFIG_PCI_MSI) */ | 682 | #endif /* !(CONFIG_PCI_MSI) */ |
683 | 683 | ||
684 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | ||
685 | { | ||
686 | struct pcidev_cookie *pc = pdev->sysdata; | ||
687 | |||
688 | return pc->op->node; | ||
689 | } | ||
690 | EXPORT_SYMBOL(pci_device_to_OF_node); | ||
691 | |||
684 | #endif /* !(CONFIG_PCI) */ | 692 | #endif /* !(CONFIG_PCI) */ |
diff --git a/include/asm-sparc/pci.h b/include/asm-sparc/pci.h index 38644742f011..a750c688408b 100644 --- a/include/asm-sparc/pci.h +++ b/include/asm-sparc/pci.h | |||
@@ -165,6 +165,9 @@ static inline int pci_dma_mapping_error(dma_addr_t dma_addr) | |||
165 | return (dma_addr == PCI_DMA_ERROR_CODE); | 165 | return (dma_addr == PCI_DMA_ERROR_CODE); |
166 | } | 166 | } |
167 | 167 | ||
168 | struct device_node; | ||
169 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); | ||
170 | |||
168 | #endif /* __KERNEL__ */ | 171 | #endif /* __KERNEL__ */ |
169 | 172 | ||
170 | /* generic pci stuff */ | 173 | /* generic pci stuff */ |
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h index ca6560288ae8..b14a725b430d 100644 --- a/include/asm-sparc64/pci.h +++ b/include/asm-sparc64/pci.h | |||
@@ -312,6 +312,9 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
312 | return PCI_IRQ_NONE; | 312 | return PCI_IRQ_NONE; |
313 | } | 313 | } |
314 | 314 | ||
315 | struct device_node; | ||
316 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); | ||
317 | |||
315 | #endif /* __KERNEL__ */ | 318 | #endif /* __KERNEL__ */ |
316 | 319 | ||
317 | #endif /* __SPARC64_PCI_H */ | 320 | #endif /* __SPARC64_PCI_H */ |