diff options
author | Kristen Accardi <kristen.c.accardi@intel.com> | 2006-03-03 13:16:05 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-23 17:35:17 -0500 |
commit | 783c49fc506d9afe4784390b556fa25ede5d6d1f (patch) | |
tree | 8090c2251193211129816254f16f10cbb33ed20c /drivers/pci/hotplug/pciehp.h | |
parent | f5afe8064f3087bead8fea7e32547c2a3ada5fd0 (diff) |
[PATCH] PCI Hotplug: add common acpi functions to core
shpchprm_acpi.c and pciehprm_acpi.c are nearly identical. In addition,
there are functions in both these files that are also in acpiphp_glue.c.
This patch will remove duplicate functions from shpchp, pciehp, and
acpiphp and move this functionality to pci_hotplug, as it is not
hardware specific. Get rid of shpchprm* and pciehprm* files since they
are no longer needed. shpchprm_nonacpi.c and pciehprm_nonacpi.c are
identical, as well as shpchprm_legacy.c and can be replaced with a
macro.
This patch also changes acpiphp to use the common hpp code.
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.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index e0adf4bc89e8..92c1f0f1e1ad 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -50,12 +50,6 @@ extern int pciehp_force; | |||
50 | #define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg) | 50 | #define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg) |
51 | #define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg) | 51 | #define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg) |
52 | 52 | ||
53 | struct hotplug_params { | ||
54 | u8 cache_line_size; | ||
55 | u8 latency_timer; | ||
56 | u8 enable_serr; | ||
57 | u8 enable_perr; | ||
58 | }; | ||
59 | 53 | ||
60 | struct slot { | 54 | struct slot { |
61 | struct slot *next; | 55 | struct slot *next; |
@@ -192,9 +186,6 @@ extern u8 pciehp_handle_power_fault (u8 hp_slot, void *inst_id); | |||
192 | /* pci functions */ | 186 | /* pci functions */ |
193 | extern int pciehp_configure_device (struct slot *p_slot); | 187 | extern int pciehp_configure_device (struct slot *p_slot); |
194 | extern int pciehp_unconfigure_device (struct slot *p_slot); | 188 | extern int pciehp_unconfigure_device (struct slot *p_slot); |
195 | extern int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev); | ||
196 | extern void pciehp_get_hp_params_from_firmware(struct pci_dev *dev, | ||
197 | struct hotplug_params *hpp); | ||
198 | 189 | ||
199 | 190 | ||
200 | 191 | ||
@@ -286,4 +277,19 @@ struct hpc_ops { | |||
286 | int (*check_lnk_status) (struct controller *ctrl); | 277 | int (*check_lnk_status) (struct controller *ctrl); |
287 | }; | 278 | }; |
288 | 279 | ||
280 | |||
281 | #ifdef CONFIG_ACPI | ||
282 | #define pciehp_get_hp_hw_control_from_firmware(dev) \ | ||
283 | pciehp_acpi_get_hp_hw_control_from_firmware(dev) | ||
284 | static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev, | ||
285 | struct hotplug_params *hpp) | ||
286 | { | ||
287 | if (ACPI_FAILURE(acpi_get_hp_params_from_firmware(dev, hpp))) | ||
288 | return -ENODEV; | ||
289 | return 0; | ||
290 | } | ||
291 | #else | ||
292 | #define pciehp_get_hp_hw_control_from_firmware(dev) 0 | ||
293 | #define pciehp_get_hp_params_from_firmware(dev, hpp) (-ENODEV) | ||
294 | #endif /* CONFIG_ACPI */ | ||
289 | #endif /* _PCIEHP_H */ | 295 | #endif /* _PCIEHP_H */ |