aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-09-28 07:11:41 -0400
committerPaul Mackerras <paulus@samba.org>2005-09-28 07:11:41 -0400
commit952ecef7a0479049c8abb7c34a688ec2981ceadd (patch)
tree74377080bb1fe12e874d18cb77461341a904f854 /include
parentbeeca08738c4c4024c81a591812bfe38f8c436c0 (diff)
parent252e75a51d40757928d692b3d339e66838294b4b (diff)
Merge Stephen Rothwell's patches
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/ppc-pci.h54
-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
5 files changed, 75 insertions, 26 deletions
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h
new file mode 100644
index 000000000000..a88728fba8f6
--- /dev/null
+++ b/include/asm-powerpc/ppc-pci.h
@@ -0,0 +1,54 @@
1/*
2 * c 2001 PPC 64 Team, IBM Corp
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9#ifndef _ASM_POWERPC_PPC_PCI_H
10#define _ASM_POWERPC_PPC_PCI_H
11
12#include <linux/pci.h>
13#include <asm/pci-bridge.h>
14
15extern unsigned long isa_io_base;
16
17extern void pci_setup_pci_controller(struct pci_controller *hose);
18extern void pci_setup_phb_io(struct pci_controller *hose, int primary);
19extern void pci_setup_phb_io_dynamic(struct pci_controller *hose, int primary);
20
21
22extern struct list_head hose_list;
23extern int global_phb_number;
24
25extern unsigned long find_and_init_phbs(void);
26
27extern struct pci_dev *ppc64_isabridge_dev; /* may be NULL if no ISA bus */
28
29/* PCI device_node operations */
30struct device_node;
31typedef void *(*traverse_func)(struct device_node *me, void *data);
32void *traverse_pci_devices(struct device_node *start, traverse_func pre,
33 void *data);
34
35void pci_devs_phb_init(void);
36void pci_devs_phb_init_dynamic(struct pci_controller *phb);
37
38/* PCI address cache management routines */
39void pci_addr_cache_insert_device(struct pci_dev *dev);
40void pci_addr_cache_remove_device(struct pci_dev *dev);
41
42/* From rtas_pci.h */
43void init_pci_config_tokens (void);
44unsigned long get_phb_buid (struct device_node *);
45
46/* From pSeries_pci.h */
47extern void pSeries_final_fixup(void);
48extern void pSeries_irq_bus_setup(struct pci_bus *bus);
49
50extern unsigned long pci_probe_only;
51extern unsigned long pci_assign_all_buses;
52extern int pci_read_irq_line(struct pci_dev *pci_dev);
53
54#endif /* _ASM_POWERPC_PPC_PCI_H */
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;