aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/rpaphp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/rpaphp.h')
-rw-r--r--drivers/pci/hotplug/rpaphp.h35
1 files changed, 5 insertions, 30 deletions
diff --git a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h
index 81746e6e0e0f..61d94d1e29cb 100644
--- a/drivers/pci/hotplug/rpaphp.h
+++ b/drivers/pci/hotplug/rpaphp.h
@@ -30,10 +30,6 @@
30#include <linux/pci.h> 30#include <linux/pci.h>
31#include "pci_hotplug.h" 31#include "pci_hotplug.h"
32 32
33#define PHB 2
34#define HOTPLUG 1
35#define EMBEDDED 0
36
37#define DR_INDICATOR 9002 33#define DR_INDICATOR 9002
38#define DR_ENTITY_SENSE 9003 34#define DR_ENTITY_SENSE 9003
39 35
@@ -61,10 +57,6 @@ extern int debug;
61#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg) 57#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
62#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg) 58#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
63 59
64/* slot types */
65#define VIO_DEV 1
66#define PCI_DEV 2
67
68/* slot states */ 60/* slot states */
69 61
70#define NOT_VALID 3 62#define NOT_VALID 3
@@ -72,11 +64,6 @@ extern int debug;
72#define CONFIGURED 1 64#define CONFIGURED 1
73#define EMPTY 0 65#define EMPTY 0
74 66
75struct rpaphp_pci_func {
76 struct pci_dev *pci_dev;
77 struct list_head sibling;
78};
79
80/* 67/*
81 * struct slot - slot information for each *physical* slot 68 * struct slot - slot information for each *physical* slot
82 */ 69 */
@@ -88,15 +75,9 @@ struct slot {
88 u32 power_domain; 75 u32 power_domain;
89 char *name; 76 char *name;
90 char *location; 77 char *location;
91 u8 removable; 78 struct device_node *dn;
92 u8 dev_type; /* VIO or PCI */ 79 struct pci_bus *bus;
93 struct device_node *dn; /* slot's device_node in OFDT */ 80 struct list_head *pci_devs;
94 /* dn has phb info */
95 struct pci_dev *bridge; /* slot's pci_dev in pci_devices */
96 union {
97 struct list_head *pci_devs; /* pci_devs in PCI slot */
98 struct vio_dev *vio_dev; /* vio_dev in VIO slot */
99 } dev;
100 struct hotplug_slot *hotplug_slot; 81 struct hotplug_slot *hotplug_slot;
101}; 82};
102 83
@@ -107,13 +88,13 @@ extern int num_slots;
107/* function prototypes */ 88/* function prototypes */
108 89
109/* rpaphp_pci.c */ 90/* rpaphp_pci.c */
110extern struct pci_dev *rpaphp_find_pci_dev(struct device_node *dn); 91extern struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn);
111extern int rpaphp_claim_resource(struct pci_dev *dev, int resource); 92extern int rpaphp_claim_resource(struct pci_dev *dev, int resource);
112extern int rpaphp_enable_pci_slot(struct slot *slot); 93extern int rpaphp_enable_pci_slot(struct slot *slot);
113extern int register_pci_slot(struct slot *slot); 94extern int register_pci_slot(struct slot *slot);
114extern int rpaphp_unconfig_pci_adapter(struct slot *slot); 95extern int rpaphp_unconfig_pci_adapter(struct slot *slot);
115extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value); 96extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value);
116extern struct hotplug_slot *rpaphp_find_hotplug_slot(struct pci_dev *dev); 97extern int rpaphp_config_pci_adapter(struct pci_bus *bus);
117 98
118/* rpaphp_core.c */ 99/* rpaphp_core.c */
119extern int rpaphp_add_slot(struct device_node *dn); 100extern int rpaphp_add_slot(struct device_node *dn);
@@ -121,12 +102,6 @@ extern int rpaphp_remove_slot(struct slot *slot);
121extern int rpaphp_get_drc_props(struct device_node *dn, int *drc_index, 102extern int rpaphp_get_drc_props(struct device_node *dn, int *drc_index,
122 char **drc_name, char **drc_type, int *drc_power_domain); 103 char **drc_name, char **drc_type, int *drc_power_domain);
123 104
124/* rpaphp_vio.c */
125extern int rpaphp_get_vio_adapter_status(struct slot *slot, int is_init, u8 * value);
126extern int rpaphp_unconfig_vio_adapter(struct slot *slot);
127extern int register_vio_slot(struct device_node *dn);
128extern int rpaphp_enable_vio_slot(struct slot *slot);
129
130/* rpaphp_slot.c */ 105/* rpaphp_slot.c */
131extern void dealloc_slot_struct(struct slot *slot); 106extern void dealloc_slot_struct(struct slot *slot);
132extern struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, int power_domain); 107extern struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, int power_domain);