blob: e134f49e182bd9baa96211e286b4f0209db441e1 [file] [log] [blame]
Arthur Heymans6d3682e2023-07-13 12:34:04 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <amdblocks/espi.h>
4#include <amdblocks/lpc.h>
5#include <amdblocks/acpimmio.h>
6#include <amdblocks/aoac.h>
7#include <amdblocks/pmlib.h>
8#include <amdblocks/uart.h>
9#include <soc/southbridge.h>
Varshit Pandya970d7702023-10-06 18:14:02 +053010#include <soc/uart.h>
Arthur Heymans6d3682e2023-07-13 12:34:04 +020011
12/* Before console init */
13void fch_pre_init(void)
14{
Arthur Heymansf955ecb2023-07-13 14:18:38 +020015 fch_enable_cf9_io();
Arthur Heymans4da9d6b42023-07-13 14:19:09 +020016
17 enable_aoac_devices();
Varshit Pandya970d7702023-10-06 18:14:02 +053018 /*
19 * On reset Range_0 defaults to enabled. We want to start with a clean
20 * slate to not have things unexpectedly enabled.
21 */
22 clear_uart_legacy_config();
23
24 if (CONFIG(AMD_SOC_CONSOLE_UART))
25 set_uart_config(CONFIG_UART_FOR_CONSOLE);
Arthur Heymansc666a912023-07-13 14:34:10 +020026
27 configure_espi_with_mb_hook();
Arthur Heymans6d3682e2023-07-13 12:34:04 +020028}
29
30/* After console init */
31void fch_early_init(void)
32{
33
34}