From 7b466fb60b7d3f7793baf419b8b67b4b324702f4 Mon Sep 17 00:00:00 2001 From: Nicholas Chin Date: Sat, 5 Oct 2024 21:40:38 -0600 Subject: soc/*: Explicitly include static.h for DEV_PTR As per commit 05a13e7ed9b9 ("sconfig: Move (WEAK_)DEV_PTR from device.h to static.h"), sources that require access to devicetree static devices should directly include static.h. This allows static.h to be removed from device.h, eliminating unnecessary dependencies on the devicetree for objects that only need the device types and function declarations. The DEV_PTR macro resolves to names declared in static_devices.h, which is then included in static.h, so include the header whenever the macro is used. Change-Id: Ie281e9a9c015b19bfc96b83021a6e3afd98abcc3 Signed-off-by: Nicholas Chin Reviewed-on: https://review.coreboot.org/c/coreboot/+/84677 Reviewed-by: Felix Singer Reviewed-by: Angel Pons Reviewed-by: Jayvik Desai Tested-by: build bot (Jenkins) --- src/soc/amd/cezanne/include/soc/xhci.h | 2 +- src/soc/amd/common/pi/agesawrapper.c | 1 + src/soc/amd/mendocino/include/soc/xhci.h | 2 ++ src/soc/amd/mendocino/xhci.c | 1 + src/soc/amd/phoenix/include/soc/xhci.h | 2 +- src/soc/amd/stoneyridge/BiosCallOuts.c | 1 + src/soc/amd/stoneyridge/fch.c | 1 + src/soc/amd/stoneyridge/fch_agesa.c | 1 + src/soc/amd/stoneyridge/northbridge.c | 1 + src/soc/intel/alderlake/retimer.c | 1 + src/soc/intel/meteorlake/retimer.c | 1 + src/soc/intel/pantherlake/retimer.c | 1 + src/soc/intel/tigerlake/retimer.c | 1 + 13 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/soc/amd/cezanne/include/soc/xhci.h b/src/soc/amd/cezanne/include/soc/xhci.h index c590195731..a7fe53b548 100644 --- a/src/soc/amd/cezanne/include/soc/xhci.h +++ b/src/soc/amd/cezanne/include/soc/xhci.h @@ -3,7 +3,7 @@ #ifndef AMD_CEZANNE_XHCI_H #define AMD_CEZANNE_XHCI_H -#include +#include #define SOC_XHCI_0 DEV_PTR(xhci_0) #define SOC_XHCI_1 DEV_PTR(xhci_1) diff --git a/src/soc/amd/common/pi/agesawrapper.c b/src/soc/amd/common/pi/agesawrapper.c index 8ad1e0e4a9..a828d24a33 100644 --- a/src/soc/amd/common/pi/agesawrapper.c +++ b/src/soc/amd/common/pi/agesawrapper.c @@ -10,6 +10,7 @@ #include #include #include +#include #include void __weak SetMemParams(AMD_POST_PARAMS *PostParams) {} diff --git a/src/soc/amd/mendocino/include/soc/xhci.h b/src/soc/amd/mendocino/include/soc/xhci.h index b554c98219..1d45893d78 100644 --- a/src/soc/amd/mendocino/include/soc/xhci.h +++ b/src/soc/amd/mendocino/include/soc/xhci.h @@ -3,6 +3,8 @@ #ifndef AMD_MENDOCINO_XHCI_H #define AMD_MENDOCINO_XHCI_H +#include + #define SOC_XHCI_0 DEV_PTR(xhci_0) #define SOC_XHCI_1 DEV_PTR(xhci_1) #define SOC_XHCI_2 DEV_PTR(xhci_2) diff --git a/src/soc/amd/mendocino/xhci.c b/src/soc/amd/mendocino/xhci.c index 8f46374fce..ed8be752b4 100644 --- a/src/soc/amd/mendocino/xhci.c +++ b/src/soc/amd/mendocino/xhci.c @@ -11,6 +11,7 @@ #include #include #include +#include static const struct sci_source xhci_sci_sources[] = { { diff --git a/src/soc/amd/phoenix/include/soc/xhci.h b/src/soc/amd/phoenix/include/soc/xhci.h index 5b7d6eb204..72e03cc7c4 100644 --- a/src/soc/amd/phoenix/include/soc/xhci.h +++ b/src/soc/amd/phoenix/include/soc/xhci.h @@ -3,7 +3,7 @@ #ifndef AMD_PHOENIX_XHCI_H #define AMD_PHOENIX_XHCI_H -#include +#include #define SOC_XHCI_0 DEV_PTR(xhci_0) #define SOC_XHCI_1 DEV_PTR(xhci_1) diff --git a/src/soc/amd/stoneyridge/BiosCallOuts.c b/src/soc/amd/stoneyridge/BiosCallOuts.c index 1aebddb020..fa0eb202d9 100644 --- a/src/soc/amd/stoneyridge/BiosCallOuts.c +++ b/src/soc/amd/stoneyridge/BiosCallOuts.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/src/soc/amd/stoneyridge/fch.c b/src/soc/amd/stoneyridge/fch.c index 3013500fa9..8729a14dea 100644 --- a/src/soc/amd/stoneyridge/fch.c +++ b/src/soc/amd/stoneyridge/fch.c @@ -20,6 +20,7 @@ #include #include #include +#include #include /* diff --git a/src/soc/amd/stoneyridge/fch_agesa.c b/src/soc/amd/stoneyridge/fch_agesa.c index 179999a47f..5031971de1 100644 --- a/src/soc/amd/stoneyridge/fch_agesa.c +++ b/src/soc/amd/stoneyridge/fch_agesa.c @@ -3,6 +3,7 @@ #include #include #include +#include static int is_sata_config(void) { diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c index 9519713447..b6ebf4db4b 100644 --- a/src/soc/amd/stoneyridge/northbridge.c +++ b/src/soc/amd/stoneyridge/northbridge.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/src/soc/intel/alderlake/retimer.c b/src/soc/intel/alderlake/retimer.c index 3fd9c2d43d..fd047dd9f2 100644 --- a/src/soc/intel/alderlake/retimer.c +++ b/src/soc/intel/alderlake/retimer.c @@ -4,6 +4,7 @@ #include #include #include +#include int retimer_get_index_for_typec(uint8_t typec_port) { diff --git a/src/soc/intel/meteorlake/retimer.c b/src/soc/intel/meteorlake/retimer.c index 269620d0d1..a559cfc5c7 100644 --- a/src/soc/intel/meteorlake/retimer.c +++ b/src/soc/intel/meteorlake/retimer.c @@ -4,6 +4,7 @@ #include #include #include +#include int retimer_get_index_for_typec(uint8_t typec_port) { diff --git a/src/soc/intel/pantherlake/retimer.c b/src/soc/intel/pantherlake/retimer.c index c14c04405b..d55cd7de3d 100644 --- a/src/soc/intel/pantherlake/retimer.c +++ b/src/soc/intel/pantherlake/retimer.c @@ -4,6 +4,7 @@ #include #include #include +#include int retimer_get_index_for_typec(uint8_t typec_port) { diff --git a/src/soc/intel/tigerlake/retimer.c b/src/soc/intel/tigerlake/retimer.c index 32cb828b66..4a2ed6a0e6 100644 --- a/src/soc/intel/tigerlake/retimer.c +++ b/src/soc/intel/tigerlake/retimer.c @@ -4,6 +4,7 @@ #include #include #include +#include #include int retimer_get_index_for_typec(uint8_t typec_port) -- cgit v1.2.3