aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp.h
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2006-12-21 20:01:04 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:50:04 -0500
commit48fe39151727db350347e1dba09d71c8ca24207a (patch)
tree6b540050279409b0045b4fb66938ee0c18b5fecd /drivers/pci/hotplug/pciehp.h
parent2410fa4eaec4133f9fa8968f277ddb28b89b92b3 (diff)
pciehp: remove unnecessary 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/pciehp.h')
-rw-r--r--drivers/pci/hotplug/pciehp.h41
1 files changed, 5 insertions, 36 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index d07ac45f1272..202e4967a941 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -70,30 +70,11 @@ struct event_info {
70 u8 hp_slot; 70 u8 hp_slot;
71}; 71};
72 72
73typedef u8(*php_intr_callback_t) (u8 hp_slot, void *instance_id);
74
75struct php_ctlr_state_s {
76 struct php_ctlr_state_s *pnext;
77 struct pci_dev *pci_dev;
78 unsigned int irq;
79 unsigned long flags; /* spinlock's */
80 u32 slot_device_offset;
81 u32 num_slots;
82 struct timer_list int_poll_timer; /* Added for poll event */
83 php_intr_callback_t attention_button_callback;
84 php_intr_callback_t switch_change_callback;
85 php_intr_callback_t presence_change_callback;
86 php_intr_callback_t power_fault_callback;
87 void *callback_instance_id;
88 struct ctrl_reg *creg; /* Ptr to controller register space */
89};
90
91#define MAX_EVENTS 10 73#define MAX_EVENTS 10
92struct controller { 74struct controller {
93 struct controller *next; 75 struct controller *next;
94 struct mutex crit_sect; /* critical section mutex */ 76 struct mutex crit_sect; /* critical section mutex */
95 struct mutex ctrl_lock; /* controller lock */ 77 struct mutex ctrl_lock; /* controller lock */
96 struct php_ctlr_state_s *hpc_ctlr_handle; /* HPC controller handle */
97 int num_slots; /* Number of slots on ctlr */ 78 int num_slots; /* Number of slots on ctlr */
98 int slot_num_inc; /* 1 or -1 */ 79 int slot_num_inc; /* 1 or -1 */
99 struct pci_dev *pci_dev; 80 struct pci_dev *pci_dev;
@@ -113,6 +94,7 @@ struct controller {
113 u8 ctrlcap; 94 u8 ctrlcap;
114 u16 vendor_id; 95 u16 vendor_id;
115 u8 cap_base; 96 u8 cap_base;
97 struct timer_list poll_timer;
116}; 98};
117 99
118#define INT_BUTTON_IGNORE 0 100#define INT_BUTTON_IGNORE 0
@@ -179,10 +161,10 @@ extern void pciehp_event_stop_thread (void);
179extern int pciehp_enable_slot (struct slot *slot); 161extern int pciehp_enable_slot (struct slot *slot);
180extern int pciehp_disable_slot (struct slot *slot); 162extern int pciehp_disable_slot (struct slot *slot);
181 163
182extern u8 pciehp_handle_attention_button (u8 hp_slot, void *inst_id); 164extern u8 pciehp_handle_attention_button(u8 hp_slot, struct controller *ctrl);
183extern u8 pciehp_handle_switch_change (u8 hp_slot, void *inst_id); 165extern u8 pciehp_handle_switch_change(u8 hp_slot, struct controller *ctrl);
184extern u8 pciehp_handle_presence_change (u8 hp_slot, void *inst_id); 166extern u8 pciehp_handle_presence_change(u8 hp_slot, struct controller *ctrl);
185extern u8 pciehp_handle_power_fault (u8 hp_slot, void *inst_id); 167extern u8 pciehp_handle_power_fault(u8 hp_slot, struct controller *ctrl);
186/* extern void long_delay (int delay); */ 168/* extern void long_delay (int delay); */
187 169
188/* pci functions */ 170/* pci functions */
@@ -229,21 +211,8 @@ static inline int wait_for_ctrl_irq(struct controller *ctrl)
229 return retval; 211 return retval;
230} 212}
231 213
232enum php_ctlr_type {
233 PCI,
234 ISA,
235 ACPI
236};
237
238int pcie_init(struct controller *ctrl, struct pcie_device *dev); 214int pcie_init(struct controller *ctrl, struct pcie_device *dev);
239 215
240/* This has no meaning for PCI Express, as there is only 1 slot per port */
241int pcie_get_ctlr_slot_config(struct controller *ctrl,
242 int *num_ctlr_slots,
243 int *first_device_num,
244 int *physical_slot_num,
245 u8 *ctrlcap);
246
247struct hpc_ops { 216struct hpc_ops {
248 int (*power_on_slot) (struct slot *slot); 217 int (*power_on_slot) (struct slot *slot);
249 int (*power_off_slot) (struct slot *slot); 218 int (*power_off_slot) (struct slot *slot);