summaryrefslogtreecommitdiff
path: root/src/vendorcode/amd/opensil/stub/mpio
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-05-08 21:44:46 +0200
committerMartin L Roth <gaumless@gmail.com>2024-05-12 18:54:50 +0000
commit0fc69141e523ef3dba5ce840dea68de40b0ec785 (patch)
tree9e81d4592214fbd61720bca745b81987bee66430 /src/vendorcode/amd/opensil/stub/mpio
parent444edcba5d648582a98c0ad46605cd0dd7a1f11d (diff)
vc/amd/opensil: introduce common mpio/chip.h header file
The chip drivers in the devicetree use the path where the corresponding chip.h file resides both to include this chip.h file in the static.c generated by util/sconfig from the devicetree and also for the names of the chip config and chip ops struct. To be able to build a SoC using either the MPIO chip driver from the openSIL stub or from the actual openSIL glue code without needing different devicetree files for the different cases, introduce a common MPIO chip.h file that then includes the correct MPIO header file. The chip config and ops structures also need to be renamed to take this change into account. Thanks to Matt for pointing out how to make the path to the actual MPIO chip.h file configurable via a Kconfig setting. This allows overriding this path from site-local without the need to have any reference to site-local in the upstream code. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Iead97d1727569ec0d23a2b9c4fd96daff4bebcf6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/82262 Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/vendorcode/amd/opensil/stub/mpio')
-rw-r--r--src/vendorcode/amd/opensil/stub/mpio/chip.c2
-rw-r--r--src/vendorcode/amd/opensil/stub/mpio/chip.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vendorcode/amd/opensil/stub/mpio/chip.c b/src/vendorcode/amd/opensil/stub/mpio/chip.c
index 895814ded3..9b515b3257 100644
--- a/src/vendorcode/amd/opensil/stub/mpio/chip.c
+++ b/src/vendorcode/amd/opensil/stub/mpio/chip.c
@@ -3,6 +3,6 @@
#include <device/device.h>
#include "chip.h"
-struct chip_operations vendorcode_amd_opensil_stub_mpio_ops = {
+struct chip_operations vendorcode_amd_opensil_chip_mpio_ops = {
.name = "AMD openSIL stub MPIO",
};
diff --git a/src/vendorcode/amd/opensil/stub/mpio/chip.h b/src/vendorcode/amd/opensil/stub/mpio/chip.h
index 0957ff0213..456463336b 100644
--- a/src/vendorcode/amd/opensil/stub/mpio/chip.h
+++ b/src/vendorcode/amd/opensil/stub/mpio/chip.h
@@ -60,7 +60,7 @@ enum pcie_slot_power_limit_scale {
SLOT_POWER_LIMIT_DIVISOR_1000 = 3, /* Scale factor 0.001 */
};
-struct vendorcode_amd_opensil_stub_mpio_config {
+struct vendorcode_amd_opensil_chip_mpio_config {
enum mpio_engine_type type;
uint8_t start_lane;
uint8_t end_lane;