diff options
Diffstat (limited to 'drivers/pci/hotplug/pciehp.h')
-rw-r--r-- | drivers/pci/hotplug/pciehp.h | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 061ead21ef14..e9480ddd5abf 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -59,14 +59,8 @@ struct pci_func { | |||
59 | u8 configured; | 59 | u8 configured; |
60 | u8 switch_save; | 60 | u8 switch_save; |
61 | u8 presence_save; | 61 | u8 presence_save; |
62 | u32 base_length[0x06]; | ||
63 | u8 base_type[0x06]; | ||
64 | u16 reserved2; | 62 | u16 reserved2; |
65 | u32 config_space[0x20]; | 63 | u32 config_space[0x20]; |
66 | struct pci_resource *mem_head; | ||
67 | struct pci_resource *p_mem_head; | ||
68 | struct pci_resource *io_head; | ||
69 | struct pci_resource *bus_head; | ||
70 | struct pci_dev* pci_dev; | 64 | struct pci_dev* pci_dev; |
71 | }; | 65 | }; |
72 | 66 | ||
@@ -90,12 +84,6 @@ struct slot { | |||
90 | struct list_head slot_list; | 84 | struct list_head slot_list; |
91 | }; | 85 | }; |
92 | 86 | ||
93 | struct pci_resource { | ||
94 | struct pci_resource * next; | ||
95 | u32 base; | ||
96 | u32 length; | ||
97 | }; | ||
98 | |||
99 | struct event_info { | 87 | struct event_info { |
100 | u32 event_type; | 88 | u32 event_type; |
101 | u8 hp_slot; | 89 | u8 hp_slot; |
@@ -107,10 +95,6 @@ struct controller { | |||
107 | void *hpc_ctlr_handle; /* HPC controller handle */ | 95 | void *hpc_ctlr_handle; /* HPC controller handle */ |
108 | int num_slots; /* Number of slots on ctlr */ | 96 | int num_slots; /* Number of slots on ctlr */ |
109 | int slot_num_inc; /* 1 or -1 */ | 97 | int slot_num_inc; /* 1 or -1 */ |
110 | struct pci_resource *mem_head; | ||
111 | struct pci_resource *p_mem_head; | ||
112 | struct pci_resource *io_head; | ||
113 | struct pci_resource *bus_head; | ||
114 | struct pci_dev *pci_dev; | 98 | struct pci_dev *pci_dev; |
115 | struct pci_bus *pci_bus; | 99 | struct pci_bus *pci_bus; |
116 | struct event_info event_queue[10]; | 100 | struct event_info event_queue[10]; |
@@ -133,20 +117,6 @@ struct controller { | |||
133 | u8 cap_base; | 117 | u8 cap_base; |
134 | }; | 118 | }; |
135 | 119 | ||
136 | struct irq_mapping { | ||
137 | u8 barber_pole; | ||
138 | u8 valid_INT; | ||
139 | u8 interrupt[4]; | ||
140 | }; | ||
141 | |||
142 | struct resource_lists { | ||
143 | struct pci_resource *mem_head; | ||
144 | struct pci_resource *p_mem_head; | ||
145 | struct pci_resource *io_head; | ||
146 | struct pci_resource *bus_head; | ||
147 | struct irq_mapping *irqs; | ||
148 | }; | ||
149 | |||
150 | #define INT_BUTTON_IGNORE 0 | 120 | #define INT_BUTTON_IGNORE 0 |
151 | #define INT_PRESENCE_ON 1 | 121 | #define INT_PRESENCE_ON 1 |
152 | #define INT_PRESENCE_OFF 2 | 122 | #define INT_PRESENCE_OFF 2 |
@@ -203,14 +173,12 @@ struct resource_lists { | |||
203 | #define msg_HPC_rev_error "Unsupported revision of the PCI hot plug controller found.\n" | 173 | #define msg_HPC_rev_error "Unsupported revision of the PCI hot plug controller found.\n" |
204 | #define msg_HPC_non_pcie "The PCI hot plug controller is not supported by this driver.\n" | 174 | #define msg_HPC_non_pcie "The PCI hot plug controller is not supported by this driver.\n" |
205 | #define msg_HPC_not_supported "This system is not supported by this version of pciephd module. Upgrade to a newer version of pciehpd\n" | 175 | #define msg_HPC_not_supported "This system is not supported by this version of pciephd module. Upgrade to a newer version of pciehpd\n" |
206 | #define msg_unable_to_save "Unable to store PCI hot plug add resource information. This system must be rebooted before adding any PCI devices.\n" | ||
207 | #define msg_button_on "PCI slot #%d - powering on due to button press.\n" | 176 | #define msg_button_on "PCI slot #%d - powering on due to button press.\n" |
208 | #define msg_button_off "PCI slot #%d - powering off due to button press.\n" | 177 | #define msg_button_off "PCI slot #%d - powering off due to button press.\n" |
209 | #define msg_button_cancel "PCI slot #%d - action canceled due to button press.\n" | 178 | #define msg_button_cancel "PCI slot #%d - action canceled due to button press.\n" |
210 | #define msg_button_ignore "PCI slot #%d - button press ignored. (action in progress...)\n" | 179 | #define msg_button_ignore "PCI slot #%d - button press ignored. (action in progress...)\n" |
211 | 180 | ||
212 | /* controller functions */ | 181 | /* controller functions */ |
213 | extern int pciehprm_find_available_resources (struct controller *ctrl); | ||
214 | extern int pciehp_event_start_thread (void); | 182 | extern int pciehp_event_start_thread (void); |
215 | extern void pciehp_event_stop_thread (void); | 183 | extern void pciehp_event_stop_thread (void); |
216 | extern struct pci_func *pciehp_slot_create (unsigned char busnumber); | 184 | extern struct pci_func *pciehp_slot_create (unsigned char busnumber); |
@@ -224,19 +192,12 @@ extern u8 pciehp_handle_presence_change (u8 hp_slot, void *inst_id); | |||
224 | extern u8 pciehp_handle_power_fault (u8 hp_slot, void *inst_id); | 192 | extern u8 pciehp_handle_power_fault (u8 hp_slot, void *inst_id); |
225 | /* extern void long_delay (int delay); */ | 193 | /* extern void long_delay (int delay); */ |
226 | 194 | ||
227 | /* resource functions */ | ||
228 | extern int pciehp_resource_sort_and_combine (struct pci_resource **head); | ||
229 | |||
230 | /* pci functions */ | 195 | /* pci functions */ |
231 | extern int pciehp_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num); | 196 | extern int pciehp_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num); |
232 | /*extern int pciehp_get_bus_dev (struct controller *ctrl, u8 *bus_num, u8 *dev_num, struct slot *slot);*/ | 197 | /*extern int pciehp_get_bus_dev (struct controller *ctrl, u8 *bus_num, u8 *dev_num, struct slot *slot);*/ |
233 | extern int pciehp_save_config (struct controller *ctrl, int busnumber, int num_ctlr_slots, int first_device_num); | 198 | extern int pciehp_save_config (struct controller *ctrl, int busnumber, int num_ctlr_slots, int first_device_num); |
234 | extern int pciehp_save_used_resources (struct controller *ctrl, struct pci_func * func, int flag); | ||
235 | extern int pciehp_save_slot_config (struct controller *ctrl, struct pci_func * new_slot); | 199 | extern int pciehp_save_slot_config (struct controller *ctrl, struct pci_func * new_slot); |
236 | extern void pciehp_destroy_board_resources (struct pci_func * func); | 200 | extern int pciehp_configure_device (struct slot *ctrl); |
237 | extern int pciehp_return_board_resources (struct pci_func * func, struct resource_lists * resources); | ||
238 | extern void pciehp_destroy_resource_list (struct resource_lists * resources); | ||
239 | extern int pciehp_configure_device (struct controller* ctrl, struct pci_func* func); | ||
240 | extern int pciehp_unconfigure_device (struct pci_func* func); | 201 | extern int pciehp_unconfigure_device (struct pci_func* func); |
241 | 202 | ||
242 | 203 | ||
@@ -289,15 +250,6 @@ static inline int wait_for_ctrl_irq(struct controller *ctrl) | |||
289 | return retval; | 250 | return retval; |
290 | } | 251 | } |
291 | 252 | ||
292 | /* Puts node back in the resource list pointed to by head */ | ||
293 | static inline void return_resource(struct pci_resource **head, struct pci_resource *node) | ||
294 | { | ||
295 | if (!node || !head) | ||
296 | return; | ||
297 | node->next = *head; | ||
298 | *head = node; | ||
299 | } | ||
300 | |||
301 | #define SLOT_NAME_SIZE 10 | 253 | #define SLOT_NAME_SIZE 10 |
302 | 254 | ||
303 | static inline void make_slot_name(char *buffer, int buffer_size, struct slot *slot) | 255 | static inline void make_slot_name(char *buffer, int buffer_size, struct slot *slot) |