aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/shpchp.h
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2006-12-16 18:25:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-20 13:54:44 -0500
commit0abe68ce24973a23fcc6cbce80343f68656de7b6 (patch)
tree695eba97613f0e0c1e7749d6144ec04879527548 /drivers/pci/hotplug/shpchp.h
parentab17443a3df35abe4b7529e83511a591aa7384f3 (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.h42
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 {
83struct controller { 83struct 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);
176extern int shpchp_sysfs_enable_slot(struct slot *slot); 177extern int shpchp_sysfs_enable_slot(struct slot *slot);
177extern int shpchp_sysfs_disable_slot(struct slot *slot); 178extern int shpchp_sysfs_disable_slot(struct slot *slot);
178 179
179extern u8 shpchp_handle_attention_button(u8 hp_slot, void *inst_id); 180extern u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl);
180extern u8 shpchp_handle_switch_change(u8 hp_slot, void *inst_id); 181extern u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl);
181extern u8 shpchp_handle_presence_change(u8 hp_slot, void *inst_id); 182extern u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl);
182extern u8 shpchp_handle_power_fault(u8 hp_slot, void *inst_id); 183extern u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl);
183 184
184/* pci functions */ 185/* pci functions */
185extern int shpchp_save_config(struct controller *ctrl, int busnumber, int num_ctlr_slots, int first_device_num); 186extern 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};
265typedef u8(*php_intr_callback_t) (u8 hp_slot, void *instance_id);
266struct 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 */
285static inline int slot_paranoia_check (struct slot *slot, const char *function) 268static 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
403enum php_ctlr_type {
404 PCI,
405 ISA,
406 ACPI
407};
408
409int shpc_init( struct controller *ctrl, struct pci_dev *pdev); 386int shpc_init( struct controller *ctrl, struct pci_dev *pdev);
410 387
411int 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
418struct hpc_ops { 388struct 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);