Angel Pons | 32abdd6 | 2020-04-05 15:47:03 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Aamir Bohra | 3ee54bb | 2018-10-17 11:55:01 +0530 | [diff] [blame] | 2 | |
| 3 | #include <bootblock_common.h> |
Angel Pons | 5d98dab | 2021-02-19 22:01:55 +0100 | [diff] [blame] | 4 | #include <intelblocks/fast_spi.h> |
Subrata Banik | 319b096 | 2019-11-01 15:15:36 +0530 | [diff] [blame] | 5 | #include <intelblocks/systemagent.h> |
Angel Pons | ec1b37d | 2021-02-19 20:28:20 +0100 | [diff] [blame] | 6 | #include <intelblocks/tco.h> |
Aamir Bohra | 3ee54bb | 2018-10-17 11:55:01 +0530 | [diff] [blame] | 7 | #include <intelblocks/uart.h> |
| 8 | #include <soc/bootblock.h> |
Aamir Bohra | 3ee54bb | 2018-10-17 11:55:01 +0530 | [diff] [blame] | 9 | |
| 10 | asmlinkage void bootblock_c_entry(uint64_t base_timestamp) |
| 11 | { |
| 12 | /* Call lib/bootblock.c main */ |
Kyösti Mälkki | 101ef0b | 2019-08-18 06:58:42 +0300 | [diff] [blame] | 13 | bootblock_main_with_basetime(base_timestamp); |
Aamir Bohra | 3ee54bb | 2018-10-17 11:55:01 +0530 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | void bootblock_soc_early_init(void) |
| 17 | { |
| 18 | bootblock_systemagent_early_init(); |
| 19 | bootblock_pch_early_init(); |
Angel Pons | 5d98dab | 2021-02-19 22:01:55 +0100 | [diff] [blame] | 20 | fast_spi_cache_bios_region(); |
Aamir Bohra | 3ee54bb | 2018-10-17 11:55:01 +0530 | [diff] [blame] | 21 | pch_early_iorange_init(); |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 22 | if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE)) |
Aamir Bohra | 3ee54bb | 2018-10-17 11:55:01 +0530 | [diff] [blame] | 23 | uart_bootblock_init(); |
| 24 | } |
| 25 | |
| 26 | void bootblock_soc_init(void) |
| 27 | { |
| 28 | report_platform_info(); |
Angel Pons | 4ace49c | 2021-02-19 20:15:43 +0100 | [diff] [blame] | 29 | bootblock_pch_init(); |
Angel Pons | ec1b37d | 2021-02-19 20:28:20 +0100 | [diff] [blame] | 30 | |
| 31 | /* Program TCO_BASE_ADDRESS and TCO Timer Halt */ |
| 32 | tco_configure(); |
Aamir Bohra | 3ee54bb | 2018-10-17 11:55:01 +0530 | [diff] [blame] | 33 | } |