aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-09-28 00:40:40 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2005-09-28 00:40:40 -0400
commit252e75a51d40757928d692b3d339e66838294b4b (patch)
tree6ae6e08ae69f54320da58ac369cb98bdf097a7c2 /include
parentc111d0bda8437d146ccf5101970801fe4ff23ed8 (diff)
ppc64 iSeries: use device_node instead of iSeries_Device_node
There needs to be more cleanup after this. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'include')
-rw-r--r--include/asm-ppc64/iSeries/iSeries_pci.h30
-rw-r--r--include/asm-ppc64/iommu.h4
-rw-r--r--include/asm-ppc64/pci-bridge.h10
-rw-r--r--include/asm-ppc64/prom.h3
4 files changed, 21 insertions, 26 deletions
diff --git a/include/asm-ppc64/iSeries/iSeries_pci.h b/include/asm-ppc64/iSeries/iSeries_pci.h
index 575f611f8b33..a4d88b49fd9f 100644
--- a/include/asm-ppc64/iSeries/iSeries_pci.h
+++ b/include/asm-ppc64/iSeries/iSeries_pci.h
@@ -30,21 +30,19 @@
30 * End Change Activity 30 * End Change Activity
31 */ 31 */
32 32
33#include <asm/iSeries/HvCallPci.h>
34#include <asm/abs_addr.h> 33#include <asm/abs_addr.h>
34#include <asm/prom.h>
35#include <asm/pci-bridge.h>
35 36
36struct pci_dev; /* For Forward Reference */ 37struct pci_dev; /* For Forward Reference */
37struct iSeries_Device_Node;
38 38
39/* 39/*
40 * Gets iSeries Bus, SubBus, DevFn using iSeries_Device_Node structure 40 * Gets iSeries Bus, SubBus, DevFn using device_node structure
41 */ 41 */
42 42
43#define ISERIES_BUS(DevPtr) DevPtr->DsaAddr.Dsa.busNumber 43#define ISERIES_BUS(DevPtr) PCI_DN(DevPtr)->DsaAddr.Dsa.busNumber
44#define ISERIES_SUBBUS(DevPtr) DevPtr->DsaAddr.Dsa.subBusNumber 44#define ISERIES_SUBBUS(DevPtr) PCI_DN(DevPtr)->DsaAddr.Dsa.subBusNumber
45#define ISERIES_DEVICE(DevPtr) DevPtr->DsaAddr.Dsa.deviceId 45#define ISERIES_DEVNODE(PciDev) ((struct device_node *)PciDev->sysdata)
46#define ISERIES_DSA(DevPtr) DevPtr->DsaAddr.DsaAddr
47#define ISERIES_DEVNODE(PciDev) ((struct iSeries_Device_Node *)PciDev->sysdata)
48 46
49#define EADsMaxAgents 7 47#define EADsMaxAgents 7
50 48
@@ -67,22 +65,6 @@ struct iSeries_Device_Node;
67#define ISERIES_HV_ADDR(virtaddr) \ 65#define ISERIES_HV_ADDR(virtaddr) \
68 (0x8000000000000000 | virt_to_abs(virtaddr)) 66 (0x8000000000000000 | virt_to_abs(virtaddr))
69 67
70/*
71 * iSeries Device Information
72 */
73struct iSeries_Device_Node {
74 struct list_head Device_List;
75 struct pci_dev *PciDev;
76 union HvDsaMap DsaAddr; /* Direct Select Address */
77 /* busNumber, subBusNumber, */
78 /* deviceId, barNumber */
79 int DevFn; /* Linux devfn */
80 int Irq; /* Assigned IRQ */
81 int Flags; /* Possible flags(disable/bist)*/
82 u8 LogicalSlot; /* Hv Slot Index for Tces */
83 struct iommu_table *iommu_table;/* Device TCE Table */
84};
85
86extern void iSeries_Device_Information(struct pci_dev*, int); 68extern void iSeries_Device_Information(struct pci_dev*, int);
87 69
88#endif /* _ISERIES_64_PCI_H */ 70#endif /* _ISERIES_64_PCI_H */
diff --git a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h
index a6a173d49506..d096faf4191e 100644
--- a/include/asm-ppc64/iommu.h
+++ b/include/asm-ppc64/iommu.h
@@ -49,6 +49,7 @@ struct iommu_table {
49}; 49};
50 50
51struct scatterlist; 51struct scatterlist;
52struct device_node;
52 53
53#ifdef CONFIG_PPC_MULTIPLATFORM 54#ifdef CONFIG_PPC_MULTIPLATFORM
54 55
@@ -70,9 +71,8 @@ extern void iommu_devnode_init_pSeries(struct device_node *dn);
70 71
71#ifdef CONFIG_PPC_ISERIES 72#ifdef CONFIG_PPC_ISERIES
72 73
73struct iSeries_Device_Node;
74/* Creates table for an individual device node */ 74/* Creates table for an individual device node */
75extern void iommu_devnode_init_iSeries(struct iSeries_Device_Node *dn); 75extern void iommu_devnode_init_iSeries(struct device_node *dn);
76 76
77#endif /* CONFIG_PPC_ISERIES */ 77#endif /* CONFIG_PPC_ISERIES */
78 78
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h
index d8991389ab39..8ca5fce626bb 100644
--- a/include/asm-ppc64/pci-bridge.h
+++ b/include/asm-ppc64/pci-bridge.h
@@ -4,6 +4,8 @@
4 4
5#include <linux/pci.h> 5#include <linux/pci.h>
6 6
7#include <asm/iSeries/HvCallPci.h>
8
7/* 9/*
8 * This program is free software; you can redistribute it and/or 10 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License 11 * modify it under the terms of the GNU General Public License
@@ -71,6 +73,14 @@ struct pci_dn {
71 struct iommu_table *iommu_table; /* for phb's or bridges */ 73 struct iommu_table *iommu_table; /* for phb's or bridges */
72 struct pci_dev *pcidev; /* back-pointer to the pci device */ 74 struct pci_dev *pcidev; /* back-pointer to the pci device */
73 struct device_node *node; /* back-pointer to the device_node */ 75 struct device_node *node; /* back-pointer to the device_node */
76#ifdef CONFIG_PPC_ISERIES
77 union HvDsaMap DsaAddr; /* Direct Select Address */
78 /* busNumber, subBusNumber, */
79 /* deviceId, barNumber */
80 int Irq; /* Assigned IRQ */
81 int Flags; /* Possible flags(disable/bist)*/
82 u8 LogicalSlot; /* Hv Slot Index for Tces */
83#endif
74 u32 config_space[16]; /* saved PCI config space */ 84 u32 config_space[16]; /* saved PCI config space */
75}; 85};
76 86
diff --git a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h
index c02ec1d6b909..cf0284e081ea 100644
--- a/include/asm-ppc64/prom.h
+++ b/include/asm-ppc64/prom.h
@@ -137,6 +137,9 @@ struct device_node {
137 struct kref kref; 137 struct kref kref;
138 unsigned long _flags; 138 unsigned long _flags;
139 void *data; 139 void *data;
140#ifdef CONFIG_PPC_ISERIES
141 struct list_head Device_List;
142#endif
140}; 143};
141 144
142extern struct device_node *of_chosen; 145extern struct device_node *of_chosen;