| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#include <amdblocks/acpimmio.h> |
| 6 |
#include <amdblocks/aoac.h> |
| 7 |
#include <amdblocks/espi.h> |
| 8 |
#include <amdblocks/i2c.h> |
| 9 |
#include <amdblocks/lpc.h> |
| 10 |
#include <amdblocks/pmlib.h> |
| 11 |
#include <amdblocks/smbus.h> |
| 12 |
#include <amdblocks/uart.h> |
| 13 |
#include <soc/i2c.h> |
| 14 |
#include <soc/southbridge.h> |
| 15 |
#include <soc/uart.h> |
| 16 |
|
| 17 |
#include "chip.h" |
| 18 |
|
| 19 |
|
| 20 |
void fch_pre_init(void) |
| 21 |
{ |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
lpc_early_init(); |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
if (CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI) && !CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)) |
| 34 |
configure_espi_with_mb_hook(); |
| 35 |
|
| 36 |
fch_spi_early_init(); |
| 37 |
fch_smbus_init(); |
| 38 |
fch_enable_cf9_io(); |
| 39 |
fch_enable_legacy_io(); |
| 40 |
fch_disable_legacy_dma_io(); |
| 41 |
enable_aoac_devices(); |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
clear_uart_legacy_config(); |
| 48 |
|
| 49 |
if (CONFIG(AMD_SOC_CONSOLE_UART)) |
| 50 |
set_uart_config(CONFIG_UART_FOR_CONSOLE); |
| 51 |
|
| 52 |
|
| 53 |
if (CONFIG(DISABLE_KEYBOARD_RESET_PIN)) |
| 54 |
fch_disable_kb_rst(); |
| 55 |
} |
| 56 |
|
| 57 |
|
| 58 |
void fch_early_init(void) |
| 59 |
{ |
| 60 |
reset_i2c_peripherals(); |
| 61 |
pm_set_power_failure_state(); |
| 62 |
fch_print_pmxc0_status(); |
| 63 |
i2c_soc_early_init(); |
| 64 |
show_spi_speeds_and_modes(); |
| 65 |
|
| 66 |
if (CONFIG(DISABLE_SPI_FLASH_ROM_SHARING)) |
| 67 |
lpc_disable_spi_rom_sharing(); |
| 68 |
} |