diff options
Diffstat (limited to 'drivers/pci/hotplug/shpchp.h')
-rw-r--r-- | drivers/pci/hotplug/shpchp.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index f10f1ba877af..5c70f43908c4 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h | |||
@@ -106,12 +106,6 @@ struct controller { | |||
106 | volatile int cmd_busy; | 106 | volatile int cmd_busy; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | struct hotplug_params { | ||
110 | u8 cache_line_size; | ||
111 | u8 latency_timer; | ||
112 | u8 enable_serr; | ||
113 | u8 enable_perr; | ||
114 | }; | ||
115 | 109 | ||
116 | /* Define AMD SHPC ID */ | 110 | /* Define AMD SHPC ID */ |
117 | #define PCI_DEVICE_ID_AMD_GOLAM_7450 0x7450 | 111 | #define PCI_DEVICE_ID_AMD_GOLAM_7450 0x7450 |
@@ -193,15 +187,29 @@ extern u8 shpchp_handle_power_fault(u8 hp_slot, void *inst_id); | |||
193 | extern int shpchp_save_config(struct controller *ctrl, int busnumber, int num_ctlr_slots, int first_device_num); | 187 | extern int shpchp_save_config(struct controller *ctrl, int busnumber, int num_ctlr_slots, int first_device_num); |
194 | extern int shpchp_configure_device(struct slot *p_slot); | 188 | extern int shpchp_configure_device(struct slot *p_slot); |
195 | extern int shpchp_unconfigure_device(struct slot *p_slot); | 189 | extern int shpchp_unconfigure_device(struct slot *p_slot); |
196 | extern void get_hp_hw_control_from_firmware(struct pci_dev *dev); | ||
197 | extern void get_hp_params_from_firmware(struct pci_dev *dev, | ||
198 | struct hotplug_params *hpp); | ||
199 | extern int shpchprm_get_physical_slot_number(struct controller *ctrl, | ||
200 | u32 *sun, u8 busnum, u8 devnum); | ||
201 | extern void shpchp_remove_ctrl_files(struct controller *ctrl); | 190 | extern void shpchp_remove_ctrl_files(struct controller *ctrl); |
202 | extern void cleanup_slots(struct controller *ctrl); | 191 | extern void cleanup_slots(struct controller *ctrl); |
203 | extern void queue_pushbutton_work(void *data); | 192 | extern void queue_pushbutton_work(void *data); |
204 | 193 | ||
194 | |||
195 | #ifdef CONFIG_ACPI | ||
196 | static inline int get_hp_params_from_firmware(struct pci_dev *dev, | ||
197 | struct hotplug_params *hpp) | ||
198 | { | ||
199 | if (ACPI_FAILURE(acpi_get_hp_params_from_firmware(dev, hpp))) | ||
200 | return -ENODEV; | ||
201 | return 0; | ||
202 | } | ||
203 | #define get_hp_hw_control_from_firmware(pdev) \ | ||
204 | do { \ | ||
205 | if (DEVICE_ACPI_HANDLE(&(pdev->dev))) \ | ||
206 | acpi_run_oshp(DEVICE_ACPI_HANDLE(&(pdev->dev))); \ | ||
207 | } while (0) | ||
208 | #else | ||
209 | #define get_hp_params_from_firmware(dev, hpp) (-ENODEV) | ||
210 | #define get_hp_hw_control_from_firmware(dev) do { } while (0) | ||
211 | #endif | ||
212 | |||
205 | struct ctrl_reg { | 213 | struct ctrl_reg { |
206 | volatile u32 base_offset; | 214 | volatile u32 base_offset; |
207 | volatile u32 slot_avail1; | 215 | volatile u32 slot_avail1; |