aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-09-04 22:08:30 -0400
committerPaul Mackerras <paulus@samba.org>2007-09-13 11:33:21 -0400
commit68c8404c742fdda2151b4bf6bd98419bf8118481 (patch)
tree0e5ce63933f39e0d1a22dec77e458218f1e95e90
parenta302cb9d95978505b18c12be0cd1e41556564f68 (diff)
[POWERPC] pasemi: Add pasemi_pci_getcfgaddr()
Add pasemi_pci_getcfgaddr(), to get the remapped address of a specific config register for a PCI device. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/pasemi/pasemi.h2
-rw-r--r--arch/powerpc/platforms/pasemi/pci.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h
index be8495497611..6fd2fe75a608 100644
--- a/arch/powerpc/platforms/pasemi/pasemi.h
+++ b/arch/powerpc/platforms/pasemi/pasemi.h
@@ -6,6 +6,8 @@ extern void pas_pci_init(void);
6extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev); 6extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev);
7extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev); 7extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev);
8 8
9extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset);
10
9extern void __init alloc_iobmap_l2(void); 11extern void __init alloc_iobmap_l2(void);
10 12
11extern void __init pasemi_idle_init(void); 13extern void __init pasemi_idle_init(void);
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index 03d1d07aa2ac..fcfb3df3f1a9 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -175,3 +175,12 @@ void __init pas_pci_init(void)
175 /* Use the common resource allocation mechanism */ 175 /* Use the common resource allocation mechanism */
176 pci_probe_only = 1; 176 pci_probe_only = 1;
177} 177}
178
179void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset)
180{
181 struct pci_controller *hose;
182
183 hose = pci_bus_to_host(bus);
184
185 return pa_pxp_cfg_addr(hose, hose->number, dev->devfn, int offset)
186}