blob: ef5ada6239a677be65f6df61e86c78e19bed237b [file] [log] [blame]
Angel Pons32abdd62020-04-05 15:47:03 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Aamir Bohra3ee54bb2018-10-17 11:55:01 +05302
3#include <bootblock_common.h>
Angel Pons5d98dab2021-02-19 22:01:55 +01004#include <intelblocks/fast_spi.h>
Subrata Banik319b0962019-11-01 15:15:36 +05305#include <intelblocks/systemagent.h>
Angel Ponsec1b37d2021-02-19 20:28:20 +01006#include <intelblocks/tco.h>
Aamir Bohra3ee54bb2018-10-17 11:55:01 +05307#include <intelblocks/uart.h>
8#include <soc/bootblock.h>
Aamir Bohra3ee54bb2018-10-17 11:55:01 +05309
10asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
11{
12 /* Call lib/bootblock.c main */
Kyösti Mälkki101ef0b2019-08-18 06:58:42 +030013 bootblock_main_with_basetime(base_timestamp);
Aamir Bohra3ee54bb2018-10-17 11:55:01 +053014}
15
16void bootblock_soc_early_init(void)
17{
18 bootblock_systemagent_early_init();
19 bootblock_pch_early_init();
Angel Pons5d98dab2021-02-19 22:01:55 +010020 fast_spi_cache_bios_region();
Aamir Bohra3ee54bb2018-10-17 11:55:01 +053021 pch_early_iorange_init();
Julius Wernercd49cce2019-03-05 16:53:33 -080022 if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
Aamir Bohra3ee54bb2018-10-17 11:55:01 +053023 uart_bootblock_init();
24}
25
26void bootblock_soc_init(void)
27{
28 report_platform_info();
Angel Pons4ace49c2021-02-19 20:15:43 +010029 bootblock_pch_init();
Angel Ponsec1b37d2021-02-19 20:28:20 +010030
31 /* Program TCO_BASE_ADDRESS and TCO Timer Halt */
32 tco_configure();
Aamir Bohra3ee54bb2018-10-17 11:55:01 +053033}