From bcf7717e97449e41225e92dfa9a0450e5f03d9e2 Mon Sep 17 00:00:00 2001 From: Alvis Sun Date: Tue, 15 Apr 2025 11:24:24 +0800 Subject: [PATCH] drivers: clock_control: npcx: add NPCXn variant support in clock init As title. Signed-off-by: Alvis Sun --- drivers/clock_control/clock_control_npcx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clock_control/clock_control_npcx.c b/drivers/clock_control/clock_control_npcx.c index b6ea89a2cf5..586276e1d68 100644 --- a/drivers/clock_control/clock_control_npcx.c +++ b/drivers/clock_control/clock_control_npcx.c @@ -208,9 +208,11 @@ static int npcx_clock_control_init(const struct device *dev) struct cdcg_reg *const inst_cdcg = HAL_CDCG_INST(dev); const uint32_t pmc_base = ((const struct npcx_pcc_config *)dev->config)->base_pmc; +#if defined(CONFIG_NPCX_SOC_VARIANT_NPCXN) if (IS_ENABLED(CONFIG_CLOCK_CONTROL_NPCX_EXTERNAL_SRC)) { inst_cdcg->LFCGCTL2 |= BIT(NPCX_LFCGCTL2_XT_OSC_SL_EN); } +#endif /* * Resetting the OFMCLK (even to the same value) will make the clock