diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2006-12-16 18:25:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-20 13:54:44 -0500 |
commit | 0abe68ce24973a23fcc6cbce80343f68656de7b6 (patch) | |
tree | 695eba97613f0e0c1e7749d6144ec04879527548 /drivers/pci/hotplug/shpchp.h | |
parent | ab17443a3df35abe4b7529e83511a591aa7384f3 (diff) |
shpchp: remove unnecessary struct php_ctlr
The struct php_ctlr seems to be only for complicating codes. This
patch removes struct php_ctlr and related codes.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/shpchp.h')
-rw-r--r-- | drivers/pci/hotplug/shpchp.h | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index 50757695844f..f036485cd9ec 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h | |||
@@ -83,7 +83,6 @@ struct event_info { | |||
83 | struct controller { | 83 | struct controller { |
84 | struct mutex crit_sect; /* critical section mutex */ | 84 | struct mutex crit_sect; /* critical section mutex */ |
85 | struct mutex cmd_lock; /* command lock */ | 85 | struct mutex cmd_lock; /* command lock */ |
86 | struct php_ctlr_state_s *hpc_ctlr_handle; /* HPC controller handle */ | ||
87 | int num_slots; /* Number of slots on ctlr */ | 86 | int num_slots; /* Number of slots on ctlr */ |
88 | int slot_num_inc; /* 1 or -1 */ | 87 | int slot_num_inc; /* 1 or -1 */ |
89 | struct pci_dev *pci_dev; | 88 | struct pci_dev *pci_dev; |
@@ -102,6 +101,8 @@ struct controller { | |||
102 | u32 cap_offset; | 101 | u32 cap_offset; |
103 | unsigned long mmio_base; | 102 | unsigned long mmio_base; |
104 | unsigned long mmio_size; | 103 | unsigned long mmio_size; |
104 | void __iomem *creg; | ||
105 | struct timer_list poll_timer; | ||
105 | }; | 106 | }; |
106 | 107 | ||
107 | 108 | ||
@@ -176,10 +177,10 @@ extern int __must_check shpchp_create_ctrl_files(struct controller *ctrl); | |||
176 | extern int shpchp_sysfs_enable_slot(struct slot *slot); | 177 | extern int shpchp_sysfs_enable_slot(struct slot *slot); |
177 | extern int shpchp_sysfs_disable_slot(struct slot *slot); | 178 | extern int shpchp_sysfs_disable_slot(struct slot *slot); |
178 | 179 | ||
179 | extern u8 shpchp_handle_attention_button(u8 hp_slot, void *inst_id); | 180 | extern u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl); |
180 | extern u8 shpchp_handle_switch_change(u8 hp_slot, void *inst_id); | 181 | extern u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl); |
181 | extern u8 shpchp_handle_presence_change(u8 hp_slot, void *inst_id); | 182 | extern u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl); |
182 | extern u8 shpchp_handle_power_fault(u8 hp_slot, void *inst_id); | 183 | extern u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl); |
183 | 184 | ||
184 | /* pci functions */ | 185 | /* pci functions */ |
185 | extern int shpchp_save_config(struct controller *ctrl, int busnumber, int num_ctlr_slots, int first_device_num); | 186 | extern int shpchp_save_config(struct controller *ctrl, int busnumber, int num_ctlr_slots, int first_device_num); |
@@ -262,24 +263,6 @@ enum ctrl_offsets { | |||
262 | SLOT11 = offsetof(struct ctrl_reg, slot11), | 263 | SLOT11 = offsetof(struct ctrl_reg, slot11), |
263 | SLOT12 = offsetof(struct ctrl_reg, slot12), | 264 | SLOT12 = offsetof(struct ctrl_reg, slot12), |
264 | }; | 265 | }; |
265 | typedef u8(*php_intr_callback_t) (u8 hp_slot, void *instance_id); | ||
266 | struct php_ctlr_state_s { | ||
267 | struct php_ctlr_state_s *pnext; | ||
268 | struct pci_dev *pci_dev; | ||
269 | unsigned int irq; | ||
270 | unsigned long flags; /* spinlock's */ | ||
271 | u32 slot_device_offset; | ||
272 | u32 num_slots; | ||
273 | struct timer_list int_poll_timer; /* Added for poll event */ | ||
274 | php_intr_callback_t attention_button_callback; | ||
275 | php_intr_callback_t switch_change_callback; | ||
276 | php_intr_callback_t presence_change_callback; | ||
277 | php_intr_callback_t power_fault_callback; | ||
278 | void *callback_instance_id; | ||
279 | void __iomem *creg; /* Ptr to controller register space */ | ||
280 | }; | ||
281 | /* Inline functions */ | ||
282 | |||
283 | 266 | ||
284 | /* Inline functions to check the sanity of a pointer that is passed to us */ | 267 | /* Inline functions to check the sanity of a pointer that is passed to us */ |
285 | static inline int slot_paranoia_check (struct slot *slot, const char *function) | 268 | static inline int slot_paranoia_check (struct slot *slot, const char *function) |
@@ -400,21 +383,8 @@ static inline void amd_pogo_errata_restore_misc_reg(struct slot *p_slot) | |||
400 | pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MISCII_OFFSET, pcix_misc2_temp); | 383 | pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MISCII_OFFSET, pcix_misc2_temp); |
401 | } | 384 | } |
402 | 385 | ||
403 | enum php_ctlr_type { | ||
404 | PCI, | ||
405 | ISA, | ||
406 | ACPI | ||
407 | }; | ||
408 | |||
409 | int shpc_init( struct controller *ctrl, struct pci_dev *pdev); | 386 | int shpc_init( struct controller *ctrl, struct pci_dev *pdev); |
410 | 387 | ||
411 | int shpc_get_ctlr_slot_config( struct controller *ctrl, | ||
412 | int *num_ctlr_slots, | ||
413 | int *first_device_num, | ||
414 | int *physical_slot_num, | ||
415 | int *updown, | ||
416 | int *flags); | ||
417 | |||
418 | struct hpc_ops { | 388 | struct hpc_ops { |
419 | int (*power_on_slot ) (struct slot *slot); | 389 | int (*power_on_slot ) (struct slot *slot); |
420 | int (*slot_enable ) (struct slot *slot); | 390 | int (*slot_enable ) (struct slot *slot); |