aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDinesh Gehlot <digehlot@google.com>2022-12-06 10:58:48 +0000
committerSubrata Banik <subratabanik@google.com>2022-12-10 08:01:24 +0000
commite7c1f7da25651a649a832157f7cf01176b18cec5 (patch)
tree62ace13f747986f78a78f7c25f48acfbc5defa4b /src
parent1f5154ee8c8bdf2c6760ddc36e72fef4f5bbe8c5 (diff)
soc/intel/meteorlake: Allow configuring 8254 timer via CMOS
Currently, the `USE_LEGACY_8254_TIMER` Kconfig option is the only way to enable or disable the legacy 8254 timer. Add the `legacy_8254_timer` CMOS option to allow enabling and disabling the 8254 timer without having to rebuild and reflash coreboot. If options are not enabled or the option is missing in cmos.layout, the Kconfig setting is used. BUG=none TEST=Build and Boot verified on google/rex Port of 'commit bc35bed18eba ("soc/intel/*: Allow configuring 8254 timer via CMOS")' Signed-off-by: Dinesh Gehlot <digehlot@google.com> Change-Id: Ibf6c43ddecb3da325c22228205243bb6af00d1d2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70423 Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/meteorlake/fsp_params.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c
index 53220ec96b..dc51d7bddd 100644
--- a/src/soc/intel/meteorlake/fsp_params.c
+++ b/src/soc/intel/meteorlake/fsp_params.c
@@ -10,6 +10,7 @@
#include <fsp/fsp_debug_event.h>
#include <fsp/ppi/mp_service_ppi.h>
#include <fsp/util.h>
+#include <option.h>
#include <intelblocks/cse.h>
#include <intelblocks/lpss.h>
#include <intelblocks/xdci.h>
@@ -24,6 +25,7 @@
#include <soc/soc_chip.h>
#include <soc/soc_info.h>
#include <string.h>
+#include <types.h>
/* THC assignment definition */
#define THC_NONE 0
@@ -345,8 +347,9 @@ static void fill_fsps_8254_params(FSP_S_CONFIG *s_cfg,
const struct soc_intel_meteorlake_config *config)
{
/* Legacy 8254 timer support */
- s_cfg->Enable8254ClockGating = !CONFIG(USE_LEGACY_8254_TIMER);
- s_cfg->Enable8254ClockGatingOnS3 = !CONFIG(USE_LEGACY_8254_TIMER);
+ bool use_8254 = get_uint_option("legacy_8254_timer", CONFIG(USE_LEGACY_8254_TIMER));
+ s_cfg->Enable8254ClockGating = !use_8254;
+ s_cfg->Enable8254ClockGatingOnS3 = !use_8254;
}
static void fill_fsps_pm_timer_params(FSP_S_CONFIG *s_cfg,