aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/shpchp_pci.c
diff options
context:
space:
mode:
authorKristen Accardi <kristen.c.accardi@intel.com>2006-03-03 13:16:05 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 17:35:17 -0500
commit783c49fc506d9afe4784390b556fa25ede5d6d1f (patch)
tree8090c2251193211129816254f16f10cbb33ed20c /drivers/pci/hotplug/shpchp_pci.c
parentf5afe8064f3087bead8fea7e32547c2a3ada5fd0 (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/shpchp_pci.c')
-rw-r--r--drivers/pci/hotplug/shpchp_pci.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c
index 19e1a5e1e30b..257adc233996 100644
--- a/drivers/pci/hotplug/shpchp_pci.c
+++ b/drivers/pci/hotplug/shpchp_pci.c
@@ -38,7 +38,7 @@ static void program_fw_provided_values(struct pci_dev *dev)
38{ 38{
39 u16 pci_cmd, pci_bctl; 39 u16 pci_cmd, pci_bctl;
40 struct pci_dev *cdev; 40 struct pci_dev *cdev;
41 struct hotplug_params hpp = {0x8, 0x40, 0, 0}; /* defaults */ 41 struct hotplug_params hpp;
42 42
43 /* Program hpp values for this device */ 43 /* Program hpp values for this device */
44 if (!(dev->hdr_type == PCI_HEADER_TYPE_NORMAL || 44 if (!(dev->hdr_type == PCI_HEADER_TYPE_NORMAL ||
@@ -46,7 +46,13 @@ static void program_fw_provided_values(struct pci_dev *dev)
46 (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI))) 46 (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI)))
47 return; 47 return;
48 48
49 get_hp_params_from_firmware(dev, &hpp); 49 /* use default values if we can't get them from firmware */
50 if (get_hp_params_from_firmware(dev, &hpp)) {
51 hpp.cache_line_size = 8;
52 hpp.latency_timer = 0x40;
53 hpp.enable_serr = 0;
54 hpp.enable_perr = 0;
55 }
50 56
51 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, hpp.cache_line_size); 57 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, hpp.cache_line_size);
52 pci_write_config_byte(dev, PCI_LATENCY_TIMER, hpp.latency_timer); 58 pci_write_config_byte(dev, PCI_LATENCY_TIMER, hpp.latency_timer);