diff options
Diffstat (limited to 'src/mainboard/prodrive/hermes/ramstage.c')
-rw-r--r-- | src/mainboard/prodrive/hermes/ramstage.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mainboard/prodrive/hermes/ramstage.c b/src/mainboard/prodrive/hermes/ramstage.c new file mode 100644 index 0000000000..18fc915018 --- /dev/null +++ b/src/mainboard/prodrive/hermes/ramstage.c @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <soc/ramstage.h> +#include <variant/gpio.h> +#include "variants/baseboard/include/eeprom.h" + +static fsp_params parmas_list[] = { + // FIXME: Fill with additional options +}; + +void mainboard_silicon_init_params(FSP_S_CONFIG *params) +{ + size_t num = 0; + const struct pad_config *gpio_table = get_gpio_table(&num); + + /* Configure pads prior to SiliconInit() in case there's any + dependencies during hardware initialization. */ + gpio_configure_pads(gpio_table, num); + + params->SataLedEnable = 1; + + // Overwrite params + if (!check_signature(I2C_ADDR_EEPROM)) + return; + + for (u8 i = 0; i <= ARRAY_SIZE(parmas_list); i++) { + if (ARRAY_SIZE(parmas_list) == 0) + break; + read_write_config(I2C_ADDR_EEPROM, params, EEPROM_OFFSET_FSP_CONFIG + + parmas_list[i].offset, + EEPROM_OFFSET_FSP_CONFIG + parmas_list[i].offset, + parmas_list[i].size); + } +} |