Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68236 )
Change subject: soc/amd/common: Clean up inludes ......................................................................
soc/amd/common: Clean up inludes
Signed-off-by: Elyes Haouas ehaouas@noos.fr Change-Id: I7e11c14ba2653f2a2e6472ed58cb4923b0e1840d --- M src/soc/amd/common/block/acp/acp_gen1.c M src/soc/amd/common/block/acpi/acpi.c M src/soc/amd/common/block/acpi/elog.c M src/soc/amd/common/block/acpimmio/print_reset_status.c M src/soc/amd/common/block/aoac/aoac.c M src/soc/amd/common/block/cpu/smm/smi_handler.c M src/soc/amd/common/block/cpu/tsc/monotonic_timer.c M src/soc/amd/common/block/cpu/tsc/tsc_freq.c M src/soc/amd/common/block/iommu/iommu.c M src/soc/amd/common/block/pci/amd_pci_util.c M src/soc/amd/common/block/psp/psp_gen2.c M src/soc/amd/common/block/psp/psp_smm_gen2.c M src/soc/amd/common/block/smbus/sm.c M src/soc/amd/common/block/smi/smi_util.c M src/soc/amd/common/block/spi/fch_spi_ctrl.c M src/soc/amd/common/block/spi/fch_spi_util.c M src/soc/amd/common/block/uart/uart_acpi.c M src/soc/amd/common/block/uart/uart_console.c M src/soc/amd/common/fsp/dmi.c 19 files changed, 63 insertions(+), 34 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/68236/1
diff --git a/src/soc/amd/common/block/acp/acp_gen1.c b/src/soc/amd/common/block/acp/acp_gen1.c index 0fe37f3..192f7cb 100644 --- a/src/soc/amd/common/block/acp/acp_gen1.c +++ b/src/soc/amd/common/block/acp/acp_gen1.c @@ -2,10 +2,10 @@
#include <amdblocks/acp.h> #include <amdblocks/chip.h> +#include <console/console.h> #include <device/device.h> #include <device/mmio.h> -#include <console/console.h> -#include "acp_def.h" +#include <stdint.h>
/* ACP registers and associated fields */ #define ACP_I2S_PIN_CONFIG 0x1400 /* HDA, Soundwire, I2S */ diff --git a/src/soc/amd/common/block/acpi/acpi.c b/src/soc/amd/common/block/acpi/acpi.c index 75d4adf..2aafabf 100644 --- a/src/soc/amd/common/block/acpi/acpi.c +++ b/src/soc/amd/common/block/acpi/acpi.c @@ -2,8 +2,8 @@
#include <acpi/acpi.h> #include <acpi/acpi_pm.h> -#include <amdblocks/acpimmio.h> #include <amdblocks/acpi.h> +#include <amdblocks/acpimmio.h> #include <bootmode.h> #include <console/console.h> #include <halt.h> diff --git a/src/soc/amd/common/block/acpi/elog.c b/src/soc/amd/common/block/acpi/elog.c index b9268aa..fd0337a 100644 --- a/src/soc/amd/common/block/acpi/elog.c +++ b/src/soc/amd/common/block/acpi/elog.c @@ -3,6 +3,7 @@ #include <amdblocks/acpi.h> #include <elog.h> #include <soc/southbridge.h> +#include <stdint.h>
static void elog_pm1_status(const struct acpi_pm_gpe_state *state) { diff --git a/src/soc/amd/common/block/acpimmio/print_reset_status.c b/src/soc/amd/common/block/acpimmio/print_reset_status.c index 5ff0412..0c5cbd6 100644 --- a/src/soc/amd/common/block/acpimmio/print_reset_status.c +++ b/src/soc/amd/common/block/acpimmio/print_reset_status.c @@ -1,7 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <console/console.h> #include <amdblocks/acpimmio.h> +#include <commonlib/bsd/helpers.h> +#include <console/console.h> +#include <stdint.h>
static void print_num_status_bits(int num_bits, uint32_t status, const char *const bit_names[]) diff --git a/src/soc/amd/common/block/aoac/aoac.c b/src/soc/amd/common/block/aoac/aoac.c index 0afd2a1..4beb9ed 100644 --- a/src/soc/amd/common/block/aoac/aoac.c +++ b/src/soc/amd/common/block/aoac/aoac.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <stdint.h> #include <amdblocks/acpimmio.h> #include <amdblocks/aoac.h> +#include <types.h>
/* This initiates the power on sequence, but doesn't wait for the device to be powered on. */ void power_on_aoac_device(unsigned int dev) diff --git a/src/soc/amd/common/block/cpu/smm/smi_handler.c b/src/soc/amd/common/block/cpu/smm/smi_handler.c index ee8423a..2b41368 100644 --- a/src/soc/amd/common/block/cpu/smm/smi_handler.c +++ b/src/soc/amd/common/block/cpu/smm/smi_handler.c @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <amdblocks/acpimmio.h> -#include <console/console.h> #include <amdblocks/smi.h> #include <amdblocks/smm.h> +#include <console/console.h> #include <cpu/x86/smm.h> #include <soc/smi.h> +#include <stdint.h>
__weak void mainboard_handle_smi(int event) { diff --git a/src/soc/amd/common/block/cpu/tsc/monotonic_timer.c b/src/soc/amd/common/block/cpu/tsc/monotonic_timer.c index 4cedc3d..a26dfe0 100644 --- a/src/soc/amd/common/block/cpu/tsc/monotonic_timer.c +++ b/src/soc/amd/common/block/cpu/tsc/monotonic_timer.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <cpu/x86/tsc.h> +#include <stdint.h> #include <timer.h> #include <timestamp.h>
diff --git a/src/soc/amd/common/block/cpu/tsc/tsc_freq.c b/src/soc/amd/common/block/cpu/tsc/tsc_freq.c index 55c8665..d4e2c2a 100644 --- a/src/soc/amd/common/block/cpu/tsc/tsc_freq.c +++ b/src/soc/amd/common/block/cpu/tsc/tsc_freq.c @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#include <cpu/x86/msr.h> -#include <cpu/amd/msr.h> -#include <cpu/x86/tsc.h> #include <console/console.h> +#include <cpu/amd/msr.h> +#include <cpu/x86/msr.h> +#include <cpu/x86/tsc.h> +#include <stdint.h>
static unsigned long mhz;
diff --git a/src/soc/amd/common/block/iommu/iommu.c b/src/soc/amd/common/block/iommu/iommu.c index 4f20dd4..ca9d5cc 100644 --- a/src/soc/amd/common/block/iommu/iommu.c +++ b/src/soc/amd/common/block/iommu/iommu.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <commonlib/bsd/helpers.h> #include <device/device.h> #include <device/pci.h> #include <device/pci_ids.h> diff --git a/src/soc/amd/common/block/pci/amd_pci_util.c b/src/soc/amd/common/block/pci/amd_pci_util.c index d665a81..2d73029 100644 --- a/src/soc/amd/common/block/pci/amd_pci_util.c +++ b/src/soc/amd/common/block/pci/amd_pci_util.c @@ -1,12 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <console/console.h> -#include <device/pci.h> -#include <arch/io.h> -#include <device/pci_ops.h> #include <amdblocks/amd_pci_util.h> +#include <arch/io.h> +#include <console/console.h> +#include <device/device.h> +#include <device/pci.h> +#include <device/pci_ops.h> #include <pc80/i8259.h> #include <soc/amd_pci_int_defs.h> +#include <types.h>
const struct pirq_struct *pirq_data_ptr; u32 pirq_data_size; diff --git a/src/soc/amd/common/block/psp/psp_gen2.c b/src/soc/amd/common/block/psp/psp_gen2.c index 65043e5..74e5d01 100644 --- a/src/soc/amd/common/block/psp/psp_gen2.c +++ b/src/soc/amd/common/block/psp/psp_gen2.c @@ -1,10 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <amdblocks/psp.h> +#include <amdblocks/smn.h> #include <bootstate.h> #include <console/console.h> #include <timer.h> -#include <amdblocks/psp.h> -#include <amdblocks/smn.h> +#include <types.h> + #include "psp_def.h"
#define PSP_MAILBOX_COMMAND_OFFSET 0x10570 /* 4 bytes */ diff --git a/src/soc/amd/common/block/psp/psp_smm_gen2.c b/src/soc/amd/common/block/psp/psp_smm_gen2.c index f02723a..e23324f 100644 --- a/src/soc/amd/common/block/psp/psp_smm_gen2.c +++ b/src/soc/amd/common/block/psp/psp_smm_gen2.c @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <soc/smi.h> #include <amdblocks/acpimmio.h> #include <amdblocks/psp.h> #include <amdblocks/smi.h> +#include <soc/smi.h> +#include <stdint.h>
void soc_fill_smm_trig_info(struct smm_trigger_info *trig) { diff --git a/src/soc/amd/common/block/smbus/sm.c b/src/soc/amd/common/block/smbus/sm.c index 801a154..285d4e2 100644 --- a/src/soc/amd/common/block/smbus/sm.c +++ b/src/soc/amd/common/block/smbus/sm.c @@ -6,6 +6,7 @@ #include <device/pci_ids.h> #include <device/smbus.h> #include <device/smbus_host.h> +#include <stdint.h>
static u32 get_sm_mmio(struct device *dev) { diff --git a/src/soc/amd/common/block/smi/smi_util.c b/src/soc/amd/common/block/smi/smi_util.c index ac2f4b4..36eb8b8 100644 --- a/src/soc/amd/common/block/smi/smi_util.c +++ b/src/soc/amd/common/block/smi/smi_util.c @@ -2,12 +2,13 @@
/* SMI utilities used in both SMM and normal mode */
-#include <console/console.h> -#include <cpu/x86/smm.h> -#include <soc/southbridge.h> -#include <soc/smi.h> #include <amdblocks/acpimmio.h> #include <amdblocks/smi.h> +#include <console/console.h> +#include <cpu/x86/smm.h> +#include <soc/smi.h> +#include <soc/southbridge.h> +#include <types.h>
void configure_smi(uint8_t smi_num, uint8_t mode) { diff --git a/src/soc/amd/common/block/spi/fch_spi_ctrl.c b/src/soc/amd/common/block/spi/fch_spi_ctrl.c index b3d7c69..ed160e5 100644 --- a/src/soc/amd/common/block/spi/fch_spi_ctrl.c +++ b/src/soc/amd/common/block/spi/fch_spi_ctrl.c @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <console/console.h> -#include <spi_flash.h> -#include <soc/pci_devs.h> #include <amdblocks/lpc.h> #include <amdblocks/spi.h> +#include <commonlib/bsd/helpers.h> +#include <console/console.h> #include <device/pci_ops.h> #include <lib.h> +#include <soc/pci_devs.h> +#include <spi_flash.h> #include <timer.h> #include <types.h>
diff --git a/src/soc/amd/common/block/spi/fch_spi_util.c b/src/soc/amd/common/block/spi/fch_spi_util.c index c5d7123..84e7ca6 100644 --- a/src/soc/amd/common/block/spi/fch_spi_util.c +++ b/src/soc/amd/common/block/spi/fch_spi_util.c @@ -2,9 +2,10 @@
#include <amdblocks/lpc.h> #include <amdblocks/spi.h> -#include <device/mmio.h> #include <assert.h> +#include <device/mmio.h> #include <stdint.h> +#include <thread.h>
/* Global SPI controller mutex */ struct thread_mutex spi_hw_mutex; diff --git a/src/soc/amd/common/block/uart/uart_acpi.c b/src/soc/amd/common/block/uart/uart_acpi.c index eb17322..17c36d7 100644 --- a/src/soc/amd/common/block/uart/uart_acpi.c +++ b/src/soc/amd/common/block/uart/uart_acpi.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <acpi/acpi_device.h> #include <acpi/acpigen.h> #include <amdblocks/uart.h> #include <device/device.h> diff --git a/src/soc/amd/common/block/uart/uart_console.c b/src/soc/amd/common/block/uart/uart_console.c index 9f37190..99f80ba 100644 --- a/src/soc/amd/common/block/uart/uart_console.c +++ b/src/soc/amd/common/block/uart/uart_console.c @@ -2,6 +2,7 @@
#include <amdblocks/uart.h> #include <console/uart.h> +#include <stdint.h>
/* * uart_platform_base and uart_platform_refclk are used by the console UART driver and need to diff --git a/src/soc/amd/common/fsp/dmi.c b/src/soc/amd/common/fsp/dmi.c index b443fe2..9018dda 100644 --- a/src/soc/amd/common/fsp/dmi.c +++ b/src/soc/amd/common/fsp/dmi.c @@ -4,19 +4,20 @@ * This code was adapted from src/soc/amd/common/block/pi/amd_late_init.c */
-#include <fsp/util.h> -#include <memory_info.h> -#include <console/console.h> -#include <cbmem.h> -#include <string.h> -#include <ec/google/chromeec/ec.h> #include <bootstate.h> -#include <lib.h> +#include <cbmem.h> +#include <console/console.h> +#include <device/dram/ddr4.h> +#include <device/dram/ddr5.h> +#include <device/dram/lpddr4.h> #include <dimm_info_util.h> #include <dmi_info.h> -#include <device/dram/ddr4.h> -#include <device/dram/lpddr4.h> -#include <device/dram/ddr5.h> +#include <ec/google/chromeec/ec.h> +#include <fsp/util.h> +#include <lib.h> +#include <memory_info.h> +#include <string.h> +#include <types.h>
/** * Convert DDR clock speed (based on memory type) in MHz to the standard reported speed in MT/s