summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/prodrive/hermes/mainboard.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/mainboard/prodrive/hermes/mainboard.c b/src/mainboard/prodrive/hermes/mainboard.c
index c9ed7c12fb..2bc719a392 100644
--- a/src/mainboard/prodrive/hermes/mainboard.c
+++ b/src/mainboard/prodrive/hermes/mainboard.c
@@ -5,6 +5,7 @@
#include <cbmem.h>
#include <console/console.h>
#include <crc_byte.h>
+#include <bootstate.h>
#include <device/device.h>
#include <device/dram/spd.h>
#include <intelblocks/pmclib.h>
@@ -136,11 +137,6 @@ static void mainboard_init(void *chip_info)
if (!board_cfg)
return;
- /* Set Deep Sx */
- config_t *config = config_of_soc();
- config->deep_s5_enable_ac = board_cfg->deep_sx_enabled;
- config->deep_s5_enable_dc = board_cfg->deep_sx_enabled;
-
/* Enable internal speaker amplifier */
if (board_cfg->internal_audio_connection == 2)
mb_hda_amp_enable(1);
@@ -222,3 +218,29 @@ struct chip_operations mainboard_ops = {
.init = mainboard_init,
.enable_dev = mainboard_enable,
};
+
+/* Must happen before MPinit */
+static void mainboard_early(void *unused)
+{
+ const struct eeprom_board_settings *const board_cfg = get_board_settings();
+ config_t *config = config_of_soc();
+
+ if (board_cfg) {
+ /* Set Deep Sx */
+ config->deep_s5_enable_ac = board_cfg->deep_sx_enabled;
+ config->deep_s5_enable_dc = board_cfg->deep_sx_enabled;
+ }
+
+ if (check_signature(offsetof(struct eeprom_layout, supd), FSPS_UPD_SIGNATURE)) {
+ struct {
+ struct {
+ u8 TurboMode;
+ } FspsConfig;
+ } supd = {0};
+
+ READ_EEPROM_FSP_S((&supd), FspsConfig.TurboMode);
+ config->cpu_turbo_disable = !supd.FspsConfig.TurboMode;
+ }
+}
+
+BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_EXIT, mainboard_early, NULL);