soc/amd/mendocino: Add code for printing STB to boot log

This adds the mendocino specific code for printing the STB data to the
boot log.  It still needs to be enabled in the mainboard to be used.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I249507a97ed6c44805e9e66a6ea23f200d62cf66
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68544
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
Martin Roth 2022-10-14 14:55:25 -06:00 committed by Martin Roth
parent 7e3c1ced40
commit 300338fccf
4 changed files with 18 additions and 0 deletions

View File

@ -84,6 +84,7 @@ config SOC_SPECIFIC_OPTIONS
select SOC_AMD_COMMON_BLOCK_SMM # TODO: Check if this is still correct select SOC_AMD_COMMON_BLOCK_SMM # TODO: Check if this is still correct
select SOC_AMD_COMMON_BLOCK_SMU select SOC_AMD_COMMON_BLOCK_SMU
select SOC_AMD_COMMON_BLOCK_SPI # TODO: Check if this is still correct select SOC_AMD_COMMON_BLOCK_SPI # TODO: Check if this is still correct
select SOC_AMD_COMMON_BLOCK_STB
select SOC_AMD_COMMON_BLOCK_TSC_FAM17H_19H # TODO: Check if this is still correct select SOC_AMD_COMMON_BLOCK_TSC_FAM17H_19H # TODO: Check if this is still correct
select SOC_AMD_COMMON_BLOCK_UART select SOC_AMD_COMMON_BLOCK_UART
select SOC_AMD_COMMON_BLOCK_UCODE select SOC_AMD_COMMON_BLOCK_UCODE

View File

@ -9,6 +9,7 @@
#include <amdblocks/lpc.h> #include <amdblocks/lpc.h>
#include <amdblocks/pmlib.h> #include <amdblocks/pmlib.h>
#include <amdblocks/smbus.h> #include <amdblocks/smbus.h>
#include <amdblocks/stb.h>
#include <amdblocks/uart.h> #include <amdblocks/uart.h>
#include <soc/i2c.h> #include <soc/i2c.h>
#include <soc/southbridge.h> #include <soc/southbridge.h>
@ -54,6 +55,9 @@ void fch_pre_init(void)
/* After console init */ /* After console init */
void fch_early_init(void) void fch_early_init(void)
{ {
if (CONFIG(WRITE_STB_BUFFER_TO_CONSOLE))
write_stb_to_console();
reset_i2c_peripherals(); reset_i2c_peripherals();
pm_set_power_failure_state(); pm_set_power_failure_state();
fch_print_pmxc0_status(); fch_print_pmxc0_status();

View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef AMD_MENDOCINO_STB_H
#define AMD_MENDOCINO_STB_H
#define STB_CFG_SMN_ADDR 0x3E00000
#define AMD_STB_SDRAM_FIFO_SIZE 2048
#endif /* AMD_MENDOCINO_STB_H */

View File

@ -6,6 +6,7 @@
#include <amdblocks/acpimmio.h> #include <amdblocks/acpimmio.h>
#include <amdblocks/memmap.h> #include <amdblocks/memmap.h>
#include <amdblocks/pmlib.h> #include <amdblocks/pmlib.h>
#include <amdblocks/stb.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <console/console.h> #include <console/console.h>
#include <fsp/api.h> #include <fsp/api.h>
@ -16,6 +17,9 @@ void __noreturn romstage_main(void)
{ {
post_code(0x40); post_code(0x40);
if (CONFIG(WRITE_STB_BUFFER_TO_CONSOLE))
write_stb_to_console();
/* Snapshot chipset state prior to any FSP call */ /* Snapshot chipset state prior to any FSP call */
fill_chipset_state(); fill_chipset_state();