diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2024-01-22 18:42:35 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-01-25 22:51:35 +0000 |
commit | c4e5e91cbdf87842003e4569ddfb2f455c077593 (patch) | |
tree | 1214423e911fcb33f5796cc327943b34fb4c3387 /src | |
parent | dc12a3817ae49123fadbe99fcab6c039f3b4b53d (diff) |
vc/amd/opensil/genoa_poc/mpio: don't add duplicate MPIO descriptors
When the device right below the MPIO chip driver has downstream devices
without another chip in between, those downstream devices will also have
their chip_ops entry set to vendorcode_amd_opensil_genoa_poc_mpio_ops.
To avoid adding the same MPIO descriptor again for those additional
downstream devices, make sure that the chip_info pointer of the device
isn't the same as the one of the parent device, since that's only the
case for those additional downstream devices.
TEST=Onyx still boots to the payload and the MPIO configuration reported
from the openSIL code is still the same
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Nico Huber <nico.h@gmx.de>
Change-Id: I6ba90fdc83ba089127e6722778bfef29dd480bb4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80149
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c b/src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c index 28e529dc3e..89314ba8d7 100644 --- a/src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c +++ b/src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c @@ -186,8 +186,9 @@ void configure_mpio(void) mpio_global_config(mpio_data); nbio_config(); - /* Find all devices with this chip */ + /* Find all devices with this chip that are directly below the chip */ for (struct device *dev = &dev_root; dev; dev = dev->next) - if (dev->chip_ops == &vendorcode_amd_opensil_genoa_poc_mpio_ops) + if (dev->chip_ops == &vendorcode_amd_opensil_genoa_poc_mpio_ops && + dev->chip_info != dev->bus->dev->chip_info) per_device_config(mpio_data, dev->bus->dev, dev->chip_info); } |