diff options
Diffstat (limited to 'drivers/pci/hotplug/rpaphp.h')
-rw-r--r-- | drivers/pci/hotplug/rpaphp.h | 35 |
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 | ||
75 | struct 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 */ |
110 | extern struct pci_dev *rpaphp_find_pci_dev(struct device_node *dn); | 91 | extern struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn); |
111 | extern int rpaphp_claim_resource(struct pci_dev *dev, int resource); | 92 | extern int rpaphp_claim_resource(struct pci_dev *dev, int resource); |
112 | extern int rpaphp_enable_pci_slot(struct slot *slot); | 93 | extern int rpaphp_enable_pci_slot(struct slot *slot); |
113 | extern int register_pci_slot(struct slot *slot); | 94 | extern int register_pci_slot(struct slot *slot); |
114 | extern int rpaphp_unconfig_pci_adapter(struct slot *slot); | 95 | extern int rpaphp_unconfig_pci_adapter(struct slot *slot); |
115 | extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value); | 96 | extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value); |
116 | extern struct hotplug_slot *rpaphp_find_hotplug_slot(struct pci_dev *dev); | 97 | extern int rpaphp_config_pci_adapter(struct pci_bus *bus); |
117 | 98 | ||
118 | /* rpaphp_core.c */ | 99 | /* rpaphp_core.c */ |
119 | extern int rpaphp_add_slot(struct device_node *dn); | 100 | extern int rpaphp_add_slot(struct device_node *dn); |
@@ -121,12 +102,6 @@ extern int rpaphp_remove_slot(struct slot *slot); | |||
121 | extern int rpaphp_get_drc_props(struct device_node *dn, int *drc_index, | 102 | extern 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 */ | ||
125 | extern int rpaphp_get_vio_adapter_status(struct slot *slot, int is_init, u8 * value); | ||
126 | extern int rpaphp_unconfig_vio_adapter(struct slot *slot); | ||
127 | extern int register_vio_slot(struct device_node *dn); | ||
128 | extern int rpaphp_enable_vio_slot(struct slot *slot); | ||
129 | |||
130 | /* rpaphp_slot.c */ | 105 | /* rpaphp_slot.c */ |
131 | extern void dealloc_slot_struct(struct slot *slot); | 106 | extern void dealloc_slot_struct(struct slot *slot); |
132 | extern struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, int power_domain); | 107 | extern struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, int power_domain); |