Christian Walter | b646e28 | 2020-01-09 15:42:42 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <soc/ramstage.h> |
| 4 | #include <variant/gpio.h> |
| 5 | #include "variants/baseboard/include/eeprom.h" |
| 6 | |
| 7 | static fsp_params parmas_list[] = { |
Angel Pons | 329ebb3 | 2020-11-24 15:03:38 +0100 | [diff] [blame] | 8 | /* FIXME: Fill with additional options */ |
Christian Walter | b646e28 | 2020-01-09 15:42:42 +0100 | [diff] [blame] | 9 | }; |
| 10 | |
| 11 | void mainboard_silicon_init_params(FSP_S_CONFIG *params) |
| 12 | { |
Christian Walter | b646e28 | 2020-01-09 15:42:42 +0100 | [diff] [blame] | 13 | /* Configure pads prior to SiliconInit() in case there's any |
| 14 | dependencies during hardware initialization. */ |
Angel Pons | fe17a8c | 2020-11-24 15:26:10 +0100 | [diff] [blame^] | 15 | program_gpio_pads(); |
Christian Walter | b646e28 | 2020-01-09 15:42:42 +0100 | [diff] [blame] | 16 | |
| 17 | params->SataLedEnable = 1; |
| 18 | |
Angel Pons | 329ebb3 | 2020-11-24 15:03:38 +0100 | [diff] [blame] | 19 | /* Overwrite params */ |
Christian Walter | b646e28 | 2020-01-09 15:42:42 +0100 | [diff] [blame] | 20 | if (!check_signature(I2C_ADDR_EEPROM)) |
| 21 | return; |
| 22 | |
| 23 | for (u8 i = 0; i <= ARRAY_SIZE(parmas_list); i++) { |
| 24 | if (ARRAY_SIZE(parmas_list) == 0) |
| 25 | break; |
| 26 | read_write_config(I2C_ADDR_EEPROM, params, EEPROM_OFFSET_FSP_CONFIG + |
| 27 | parmas_list[i].offset, |
| 28 | EEPROM_OFFSET_FSP_CONFIG + parmas_list[i].offset, |
| 29 | parmas_list[i].size); |
| 30 | } |
| 31 | } |