diff options
author | rajesh.shah@intel.com <rajesh.shah@intel.com> | 2005-10-31 19:20:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-10 19:09:15 -0500 |
commit | ed6cbcf2ac706aa47194fd2f7a99865cc06833d7 (patch) | |
tree | 7c0dfc9a0c8078618f662f5d7a5dcad25d05ac77 /drivers/pci/hotplug/pciehp.h | |
parent | ca22a5e4d70620b7f3d809e424daa5214b0aa00d (diff) |
[PATCH] pciehp: miscellaneous cleanups
Remove un-necessary header includes, remove dead code, remove
some hardcoded constants...
Signed-off-by: Rajesh Shah <rajesh.shah@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.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 3e17e3d4dd65..314989a3a933 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -32,8 +32,6 @@ | |||
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <asm/semaphore.h> | ||
36 | #include <asm/io.h> | ||
37 | #include <linux/pcieport_if.h> | 35 | #include <linux/pcieport_if.h> |
38 | #include "pci_hotplug.h" | 36 | #include "pci_hotplug.h" |
39 | 37 | ||
@@ -62,13 +60,7 @@ struct slot { | |||
62 | u8 device; | 60 | u8 device; |
63 | u16 status; | 61 | u16 status; |
64 | u32 number; | 62 | u32 number; |
65 | u8 is_a_board; | ||
66 | u8 configured; | ||
67 | u8 state; | 63 | u8 state; |
68 | u8 switch_save; | ||
69 | u8 presence_save; | ||
70 | u32 capabilities; | ||
71 | u16 reserved2; | ||
72 | struct timer_list task_event; | 64 | struct timer_list task_event; |
73 | u8 hp_slot; | 65 | u8 hp_slot; |
74 | struct controller *ctrl; | 66 | struct controller *ctrl; |
@@ -82,27 +74,42 @@ struct event_info { | |||
82 | u8 hp_slot; | 74 | u8 hp_slot; |
83 | }; | 75 | }; |
84 | 76 | ||
77 | typedef u8(*php_intr_callback_t) (u8 hp_slot, void *instance_id); | ||
78 | |||
79 | struct php_ctlr_state_s { | ||
80 | struct php_ctlr_state_s *pnext; | ||
81 | struct pci_dev *pci_dev; | ||
82 | unsigned int irq; | ||
83 | unsigned long flags; /* spinlock's */ | ||
84 | u32 slot_device_offset; | ||
85 | u32 num_slots; | ||
86 | struct timer_list int_poll_timer; /* Added for poll event */ | ||
87 | php_intr_callback_t attention_button_callback; | ||
88 | php_intr_callback_t switch_change_callback; | ||
89 | php_intr_callback_t presence_change_callback; | ||
90 | php_intr_callback_t power_fault_callback; | ||
91 | void *callback_instance_id; | ||
92 | struct ctrl_reg *creg; /* Ptr to controller register space */ | ||
93 | }; | ||
94 | |||
95 | #define MAX_EVENTS 10 | ||
85 | struct controller { | 96 | struct controller { |
86 | struct controller *next; | 97 | struct controller *next; |
87 | struct semaphore crit_sect; /* critical section semaphore */ | 98 | struct semaphore crit_sect; /* critical section semaphore */ |
88 | void *hpc_ctlr_handle; /* HPC controller handle */ | 99 | struct php_ctlr_state_s *hpc_ctlr_handle; /* HPC controller handle */ |
89 | int num_slots; /* Number of slots on ctlr */ | 100 | int num_slots; /* Number of slots on ctlr */ |
90 | int slot_num_inc; /* 1 or -1 */ | 101 | int slot_num_inc; /* 1 or -1 */ |
91 | struct pci_dev *pci_dev; | 102 | struct pci_dev *pci_dev; |
92 | struct pci_bus *pci_bus; | 103 | struct pci_bus *pci_bus; |
93 | struct event_info event_queue[10]; | 104 | struct event_info event_queue[MAX_EVENTS]; |
94 | struct slot *slot; | 105 | struct slot *slot; |
95 | struct hpc_ops *hpc_ops; | 106 | struct hpc_ops *hpc_ops; |
96 | wait_queue_head_t queue; /* sleep & wake process */ | 107 | wait_queue_head_t queue; /* sleep & wake process */ |
97 | u8 next_event; | 108 | u8 next_event; |
98 | u8 seg; | ||
99 | u8 bus; | 109 | u8 bus; |
100 | u8 device; | 110 | u8 device; |
101 | u8 function; | 111 | u8 function; |
102 | u8 rev; | ||
103 | u8 slot_device_offset; | 112 | u8 slot_device_offset; |
104 | u8 add_support; | ||
105 | enum pci_bus_speed speed; | ||
106 | u32 first_slot; /* First physical slot number */ /* PCIE only has 1 slot */ | 113 | u32 first_slot; /* First physical slot number */ /* PCIE only has 1 slot */ |
107 | u8 slot_bus; /* Bus where the slots handled by this controller sit */ | 114 | u8 slot_bus; /* Bus where the slots handled by this controller sit */ |
108 | u8 ctrlcap; | 115 | u8 ctrlcap; |
@@ -250,14 +257,7 @@ enum php_ctlr_type { | |||
250 | ACPI | 257 | ACPI |
251 | }; | 258 | }; |
252 | 259 | ||
253 | typedef u8(*php_intr_callback_t) (unsigned int change_id, void *instance_id); | 260 | int pcie_init(struct controller *ctrl, struct pcie_device *dev); |
254 | |||
255 | int pcie_init(struct controller *ctrl, struct pcie_device *dev, | ||
256 | php_intr_callback_t attention_button_callback, | ||
257 | php_intr_callback_t switch_change_callback, | ||
258 | php_intr_callback_t presence_change_callback, | ||
259 | php_intr_callback_t power_fault_callback); | ||
260 | |||
261 | 261 | ||
262 | /* This has no meaning for PCI Express, as there is only 1 slot per port */ | 262 | /* This has no meaning for PCI Express, as there is only 1 slot per port */ |
263 | int pcie_get_ctlr_slot_config(struct controller *ctrl, | 263 | int pcie_get_ctlr_slot_config(struct controller *ctrl, |