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 bc35bed18e
("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>
This commit is contained in:
parent
1f5154ee8c
commit
e7c1f7da25
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue