From d096a64bcd8383e074809ab62b08d270ab688456 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Wed, 20 Mar 2019 09:46:32 +0200 Subject: sb/broadcom/bcm5785: Consolidate PCI set_subsystem() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This one uses vendor-specific register for the write. Change-Id: Ie36a87314054d00daed6a63b495bd5f5eabef66e Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/31989 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik --- src/southbridge/broadcom/bcm5785/bcm5785.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/southbridge/broadcom/bcm5785/bcm5785.c') diff --git a/src/southbridge/broadcom/bcm5785/bcm5785.c b/src/southbridge/broadcom/bcm5785/bcm5785.c index beaa94aeef..50d13b030b 100644 --- a/src/southbridge/broadcom/bcm5785/bcm5785.c +++ b/src/southbridge/broadcom/bcm5785/bcm5785.c @@ -86,6 +86,13 @@ void bcm5785_enable(struct device *dev) #endif } +void bcm5785_set_subsystem(struct device *dev, unsigned int vendor, + unsigned int device) +{ + pci_write_config32(dev, 0x40, + ((device & 0xffff) << 16) | (vendor & 0xffff)); +} + struct chip_operations southbridge_broadcom_bcm5785_ops = { CHIP_NAME("Serverworks BCM5785 Southbridge") .enable_dev = bcm5785_enable, -- cgit v1.2.3