summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/i82801jx
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/intel/i82801jx')
-rw-r--r--src/southbridge/intel/i82801jx/hdaudio.c14
-rw-r--r--src/southbridge/intel/i82801jx/lpc.c13
-rw-r--r--src/southbridge/intel/i82801jx/sata.c14
-rw-r--r--src/southbridge/intel/i82801jx/smbus.c14
-rw-r--r--src/southbridge/intel/i82801jx/thermal.c14
-rw-r--r--src/southbridge/intel/i82801jx/usb_ehci.c8
6 files changed, 6 insertions, 71 deletions
diff --git a/src/southbridge/intel/i82801jx/hdaudio.c b/src/southbridge/intel/i82801jx/hdaudio.c
index 1e852c0cd2..c2a505b613 100644
--- a/src/southbridge/intel/i82801jx/hdaudio.c
+++ b/src/southbridge/intel/i82801jx/hdaudio.c
@@ -287,20 +287,8 @@ static void azalia_init(struct device *dev)
}
}
-static void azalia_set_subsystem(struct device *dev, unsigned vendor,
- unsigned device)
-{
- if (!vendor || !device) {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- pci_read_config32(dev, PCI_VENDOR_ID));
- } else {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
- }
-}
-
static struct pci_operations azalia_pci_ops = {
- .set_subsystem = azalia_set_subsystem,
+ .set_subsystem = pci_dev_set_subsystem,
};
static struct device_operations azalia_ops = {
diff --git a/src/southbridge/intel/i82801jx/lpc.c b/src/southbridge/intel/i82801jx/lpc.c
index a365825e7b..abfe665989 100644
--- a/src/southbridge/intel/i82801jx/lpc.c
+++ b/src/southbridge/intel/i82801jx/lpc.c
@@ -684,17 +684,6 @@ static void i82801jx_lpc_read_resources(struct device *dev)
}
}
-static void set_subsystem(struct device *dev, unsigned vendor, unsigned device)
-{
- if (!vendor || !device) {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- pci_read_config32(dev, PCI_VENDOR_ID));
- } else {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
- }
-}
-
static void southbridge_inject_dsdt(struct device *dev)
{
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
@@ -734,7 +723,7 @@ static void southbridge_fill_ssdt(struct device *device)
}
static struct pci_operations pci_ops = {
- .set_subsystem = set_subsystem,
+ .set_subsystem = pci_dev_set_subsystem,
};
static struct device_operations device_ops = {
diff --git a/src/southbridge/intel/i82801jx/sata.c b/src/southbridge/intel/i82801jx/sata.c
index bd035de742..8de2d7427d 100644
--- a/src/southbridge/intel/i82801jx/sata.c
+++ b/src/southbridge/intel/i82801jx/sata.c
@@ -253,20 +253,8 @@ static void sata_enable(struct device *dev)
pci_write_config16(dev, 0x90, map);
}
-static void sata_set_subsystem(struct device *dev, unsigned vendor,
- unsigned device)
-{
- if (!vendor || !device) {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- pci_read_config32(dev, PCI_VENDOR_ID));
- } else {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
- }
-}
-
static struct pci_operations sata_pci_ops = {
- .set_subsystem = sata_set_subsystem,
+ .set_subsystem = pci_dev_set_subsystem,
};
static struct device_operations sata_ops = {
diff --git a/src/southbridge/intel/i82801jx/smbus.c b/src/southbridge/intel/i82801jx/smbus.c
index f9e223f591..d366703a66 100644
--- a/src/southbridge/intel/i82801jx/smbus.c
+++ b/src/southbridge/intel/i82801jx/smbus.c
@@ -91,20 +91,8 @@ static struct smbus_bus_operations lops_smbus_bus = {
.block_write = lsmbus_block_write,
};
-static void smbus_set_subsystem(struct device *dev, unsigned vendor,
- unsigned device)
-{
- if (!vendor || !device) {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- pci_read_config32(dev, PCI_VENDOR_ID));
- } else {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
- }
-}
-
static struct pci_operations smbus_pci_ops = {
- .set_subsystem = smbus_set_subsystem,
+ .set_subsystem = pci_dev_set_subsystem,
};
static void smbus_read_resources(struct device *dev)
diff --git a/src/southbridge/intel/i82801jx/thermal.c b/src/southbridge/intel/i82801jx/thermal.c
index ac4c596f28..65d897f288 100644
--- a/src/southbridge/intel/i82801jx/thermal.c
+++ b/src/southbridge/intel/i82801jx/thermal.c
@@ -51,20 +51,8 @@ static void thermal_init(struct device *dev)
pci_write_config32(dev, 0x10, 0);
}
-static void thermal_set_subsystem(struct device *dev, unsigned vendor,
- unsigned device)
-{
- if (!vendor || !device) {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- pci_read_config32(dev, PCI_VENDOR_ID));
- } else {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
- }
-}
-
static struct pci_operations thermal_pci_ops = {
- .set_subsystem = thermal_set_subsystem,
+ .set_subsystem = pci_dev_set_subsystem,
};
static struct device_operations device_ops = {
diff --git a/src/southbridge/intel/i82801jx/usb_ehci.c b/src/southbridge/intel/i82801jx/usb_ehci.c
index 543ac57f01..a4f5a01dc1 100644
--- a/src/southbridge/intel/i82801jx/usb_ehci.c
+++ b/src/southbridge/intel/i82801jx/usb_ehci.c
@@ -44,13 +44,7 @@ static void usb_ehci_set_subsystem(struct device *dev, unsigned vendor,
/* Enable writes to protected registers. */
pci_write_config8(dev, 0x80, access_cntl | 1);
- if (!vendor || !device) {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- pci_read_config32(dev, PCI_VENDOR_ID));
- } else {
- pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
- }
+ pci_dev_set_subsystem(dev, vendor, device);
/* Restore protection. */
pci_write_config8(dev, 0x80, access_cntl);