2020-12-08 17:27:30 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
|
|
|
|
#include <amdblocks/acpimmio.h>
|
2021-01-27 08:47:58 +01:00
|
|
|
#include <amdblocks/espi.h>
|
2021-01-26 11:30:18 +01:00
|
|
|
#include <amdblocks/lpc.h>
|
2020-12-08 17:27:30 +01:00
|
|
|
#include <amdblocks/smbus.h>
|
|
|
|
#include <console/console.h>
|
|
|
|
#include <soc/southbridge.h>
|
2021-01-13 03:06:21 +01:00
|
|
|
#include <soc/uart.h>
|
2020-12-08 17:27:30 +01:00
|
|
|
|
|
|
|
/* Before console init */
|
|
|
|
void fch_pre_init(void)
|
|
|
|
{
|
2021-01-26 11:30:18 +01:00
|
|
|
lpc_early_init();
|
|
|
|
|
2020-12-08 17:27:30 +01:00
|
|
|
enable_acpimmio_decode_pm04();
|
|
|
|
fch_smbus_init();
|
|
|
|
fch_enable_cf9_io();
|
|
|
|
fch_enable_legacy_io();
|
2020-12-08 23:18:19 +01:00
|
|
|
enable_aoac_devices();
|
2021-01-13 03:06:21 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* On reset Range_0 defaults to enabled. We want to start with a clean
|
|
|
|
* slate to not have things unexpectedly enabled.
|
|
|
|
*/
|
|
|
|
clear_uart_legacy_config();
|
|
|
|
|
|
|
|
if (CONFIG(AMD_SOC_CONSOLE_UART))
|
|
|
|
set_uart_config(CONFIG_UART_FOR_CONSOLE);
|
2020-12-08 17:27:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* After console init */
|
|
|
|
void fch_early_init(void)
|
|
|
|
{
|
|
|
|
fch_print_pmxc0_status();
|
2021-01-27 08:47:58 +01:00
|
|
|
|
|
|
|
if (CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI)) {
|
|
|
|
espi_setup();
|
|
|
|
espi_configure_decodes();
|
|
|
|
}
|
2020-12-08 17:27:30 +01:00
|
|
|
}
|