From 15ccbf042ddda877cde23e9b0d5d3f5256e62c33 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Wed, 20 Mar 2019 15:09:44 +0530 Subject: {northbridge, soc, southbridge}/intel: Make use of generic set_subsystem() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch removes all local definitions of sub_system functions and make use of common generic pci_dev_set_subsystem() from PCI bridge and Cardbus devices as well. Change-Id: I5fbed39ed448baf11f0e0786ce0ee94741d57237 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/31950 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki Reviewed-by: Furquan Shaikh --- src/southbridge/intel/bd82x6x/pcie.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/southbridge/intel/bd82x6x/pcie.c') diff --git a/src/southbridge/intel/bd82x6x/pcie.c b/src/southbridge/intel/bd82x6x/pcie.c index 39c53e88fc..0bc75b54a5 100644 --- a/src/southbridge/intel/bd82x6x/pcie.c +++ b/src/southbridge/intel/bd82x6x/pcie.c @@ -306,21 +306,8 @@ static const char *pch_pcie_acpi_name(const struct device *dev) return NULL; } -static void pcie_set_subsystem(struct device *dev, unsigned vendor, - unsigned device) -{ - /* NOTE: This is not the default position! */ - if (!vendor || !device) { - pci_write_config32(dev, 0x94, - pci_read_config32(dev, 0)); - } else { - pci_write_config32(dev, 0x94, - ((device & 0xffff) << 16) | (vendor & 0xffff)); - } -} - static struct pci_operations pci_ops = { - .set_subsystem = pcie_set_subsystem, + .set_subsystem = pci_dev_set_subsystem, }; static struct device_operations device_ops = { -- cgit v1.2.3