diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2009-09-15 04:30:48 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-17 13:06:31 -0400 |
commit | 82a9e79ef132cbf77de58aae35c1a14237f2fcde (patch) | |
tree | 1ca6f0dc69cb7e92df48d4f05b595b032e03e206 /drivers/pci/hotplug/pciehp.h | |
parent | 385e24917ed8eeba25dddd8e63bf3fe3d53eafc5 (diff) |
PCI: pciehp: remove hpc_ops
The struct hpc_ops seems a set of hooks to controller specific
routines. But, it is meaningless because no hotplug controller driver
follows this framework.
Acked-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/pciehp.h')
-rw-r--r-- | drivers/pci/hotplug/pciehp.h | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index b23f8ca03d82..b7054cb885cf 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -75,7 +75,6 @@ struct slot { | |||
75 | u8 state; | 75 | u8 state; |
76 | u32 number; | 76 | u32 number; |
77 | struct controller *ctrl; | 77 | struct controller *ctrl; |
78 | struct hpc_ops *hpc_ops; | ||
79 | struct hotplug_slot *hotplug_slot; | 78 | struct hotplug_slot *hotplug_slot; |
80 | struct delayed_work work; /* work for button event */ | 79 | struct delayed_work work; /* work for button event */ |
81 | struct mutex lock; | 80 | struct mutex lock; |
@@ -91,7 +90,6 @@ struct controller { | |||
91 | struct mutex ctrl_lock; /* controller lock */ | 90 | struct mutex ctrl_lock; /* controller lock */ |
92 | struct pcie_device *pcie; /* PCI Express port service */ | 91 | struct pcie_device *pcie; /* PCI Express port service */ |
93 | struct slot *slot; | 92 | struct slot *slot; |
94 | struct hpc_ops *hpc_ops; | ||
95 | wait_queue_head_t queue; /* sleep & wake process */ | 93 | wait_queue_head_t queue; /* sleep & wake process */ |
96 | u32 slot_cap; | 94 | u32 slot_cap; |
97 | u8 cap_base; | 95 | u8 cap_base; |
@@ -154,7 +152,7 @@ struct controller { | |||
154 | extern int pciehp_sysfs_enable_slot(struct slot *slot); | 152 | extern int pciehp_sysfs_enable_slot(struct slot *slot); |
155 | extern int pciehp_sysfs_disable_slot(struct slot *slot); | 153 | extern int pciehp_sysfs_disable_slot(struct slot *slot); |
156 | extern u8 pciehp_handle_attention_button(struct slot *p_slot); | 154 | extern u8 pciehp_handle_attention_button(struct slot *p_slot); |
157 | extern u8 pciehp_handle_switch_change(struct slot *p_slot); | 155 | extern u8 pciehp_handle_switch_change(struct slot *p_slot); |
158 | extern u8 pciehp_handle_presence_change(struct slot *p_slot); | 156 | extern u8 pciehp_handle_presence_change(struct slot *p_slot); |
159 | extern u8 pciehp_handle_power_fault(struct slot *p_slot); | 157 | extern u8 pciehp_handle_power_fault(struct slot *p_slot); |
160 | extern int pciehp_configure_device(struct slot *p_slot); | 158 | extern int pciehp_configure_device(struct slot *p_slot); |
@@ -165,32 +163,30 @@ int pcie_init_notification(struct controller *ctrl); | |||
165 | int pciehp_enable_slot(struct slot *p_slot); | 163 | int pciehp_enable_slot(struct slot *p_slot); |
166 | int pciehp_disable_slot(struct slot *p_slot); | 164 | int pciehp_disable_slot(struct slot *p_slot); |
167 | int pcie_enable_notification(struct controller *ctrl); | 165 | int pcie_enable_notification(struct controller *ctrl); |
166 | int pciehp_power_on_slot(struct slot *slot); | ||
167 | int pciehp_power_off_slot(struct slot *slot); | ||
168 | int pciehp_get_power_status(struct slot *slot, u8 *status); | ||
169 | int pciehp_get_attention_status(struct slot *slot, u8 *status); | ||
170 | |||
171 | int pciehp_set_attention_status(struct slot *slot, u8 status); | ||
172 | int pciehp_get_latch_status(struct slot *slot, u8 *status); | ||
173 | int pciehp_get_adapter_status(struct slot *slot, u8 *status); | ||
174 | int pciehp_get_max_link_speed(struct slot *slot, enum pci_bus_speed *speed); | ||
175 | int pciehp_get_max_link_width(struct slot *slot, enum pcie_link_width *val); | ||
176 | int pciehp_get_cur_link_speed(struct slot *slot, enum pci_bus_speed *speed); | ||
177 | int pciehp_get_cur_link_width(struct slot *slot, enum pcie_link_width *val); | ||
178 | int pciehp_query_power_fault(struct slot *slot); | ||
179 | void pciehp_green_led_on(struct slot *slot); | ||
180 | void pciehp_green_led_off(struct slot *slot); | ||
181 | void pciehp_green_led_blink(struct slot *slot); | ||
182 | int pciehp_check_link_status(struct controller *ctrl); | ||
183 | void pciehp_release_ctrl(struct controller *ctrl); | ||
168 | 184 | ||
169 | static inline const char *slot_name(struct slot *slot) | 185 | static inline const char *slot_name(struct slot *slot) |
170 | { | 186 | { |
171 | return hotplug_slot_name(slot->hotplug_slot); | 187 | return hotplug_slot_name(slot->hotplug_slot); |
172 | } | 188 | } |
173 | 189 | ||
174 | struct hpc_ops { | ||
175 | int (*power_on_slot)(struct slot *slot); | ||
176 | int (*power_off_slot)(struct slot *slot); | ||
177 | int (*get_power_status)(struct slot *slot, u8 *status); | ||
178 | int (*get_attention_status)(struct slot *slot, u8 *status); | ||
179 | int (*set_attention_status)(struct slot *slot, u8 status); | ||
180 | int (*get_latch_status)(struct slot *slot, u8 *status); | ||
181 | int (*get_adapter_status)(struct slot *slot, u8 *status); | ||
182 | int (*get_max_bus_speed)(struct slot *slot, enum pci_bus_speed *speed); | ||
183 | int (*get_cur_bus_speed)(struct slot *slot, enum pci_bus_speed *speed); | ||
184 | int (*get_max_lnk_width)(struct slot *slot, enum pcie_link_width *val); | ||
185 | int (*get_cur_lnk_width)(struct slot *slot, enum pcie_link_width *val); | ||
186 | int (*query_power_fault)(struct slot *slot); | ||
187 | void (*green_led_on)(struct slot *slot); | ||
188 | void (*green_led_off)(struct slot *slot); | ||
189 | void (*green_led_blink)(struct slot *slot); | ||
190 | void (*release_ctlr)(struct controller *ctrl); | ||
191 | int (*check_lnk_status)(struct controller *ctrl); | ||
192 | }; | ||
193 | |||
194 | #ifdef CONFIG_ACPI | 190 | #ifdef CONFIG_ACPI |
195 | #include <acpi/acpi.h> | 191 | #include <acpi/acpi.h> |
196 | #include <acpi/acpi_bus.h> | 192 | #include <acpi/acpi_bus.h> |