From 43cf27d3a7d90e07099396d2ff8af2c1435669ee Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 27 Oct 2021 18:31:16 +0200 Subject: include/device/pci_ids,soc/amd/common/block/lpc: drop duplicate PCI IDs PCI_DEVICE_ID_AMD_FAM17H_LPC and PCI_DEVICE_ID_AMD_FAM17H_SMBUS redefine the same values that are already defined by PCI_DEVICE_ID_AMD_CZ_LPC and PCI_DEVICE_ID_AMD_CZ_SMBUS, so drop PCI_DEVICE_ID_AMD_FAM17H_LPC and PCI_DEVICE_ID_AMD_FAM17H_SMBUS. Also add some comments to the places in the code where the defines are used to clarify which ID is used on which hardware generation. Signed-off-by: Felix Held Change-Id: Id0b3d7b5a886ccc76d82ada6be4145e85fd51ede Reviewed-on: https://review.coreboot.org/c/coreboot/+/58696 Tested-by: build bot (Jenkins) Reviewed-by: Jason Glenesk Reviewed-by: Raul Rangel --- src/soc/amd/common/block/lpc/lpc.c | 3 ++- src/soc/amd/common/block/smbus/sm.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/soc/amd/common') diff --git a/src/soc/amd/common/block/lpc/lpc.c b/src/soc/amd/common/block/lpc/lpc.c index 496816b0f3..7c466459e6 100644 --- a/src/soc/amd/common/block/lpc/lpc.c +++ b/src/soc/amd/common/block/lpc/lpc.c @@ -322,9 +322,10 @@ static struct device_operations lpc_ops = { }; static const unsigned short pci_device_ids[] = { + /* PCI device ID is used on all discrete FCHs and Family 16h Models 00h-3Fh */ PCI_DEVICE_ID_AMD_SB900_LPC, + /* PCI device ID is used on all integrated FCHs except Family 16h Models 00h-3Fh */ PCI_DEVICE_ID_AMD_CZ_LPC, - PCI_DEVICE_ID_AMD_FAM17H_LPC, 0 }; static const struct pci_driver lpc_driver __pci_driver = { diff --git a/src/soc/amd/common/block/smbus/sm.c b/src/soc/amd/common/block/smbus/sm.c index ce66cbbb7a..ae2edc1506 100644 --- a/src/soc/amd/common/block/smbus/sm.c +++ b/src/soc/amd/common/block/smbus/sm.c @@ -89,5 +89,6 @@ static struct device_operations smbus_ops = { static const struct pci_driver smbus_driver __pci_driver = { .ops = &smbus_ops, .vendor = PCI_VENDOR_ID_AMD, + /* PCI device ID is used on all integrated FCHs except Family 16h Models 00h-3Fh */ .device = PCI_DEVICE_ID_AMD_CZ_SMBUS, }; -- cgit v1.2.3