Skip to content

Commit bcf7717

Browse files
alvsunfabiobaltieri
authored andcommitted
drivers: clock_control: npcx: add NPCXn variant support in clock init
As title. Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
1 parent f24ba75 commit bcf7717

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/clock_control/clock_control_npcx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,11 @@ static int npcx_clock_control_init(const struct device *dev)
208208
struct cdcg_reg *const inst_cdcg = HAL_CDCG_INST(dev);
209209
const uint32_t pmc_base = ((const struct npcx_pcc_config *)dev->config)->base_pmc;
210210

211+
#if defined(CONFIG_NPCX_SOC_VARIANT_NPCXN)
211212
if (IS_ENABLED(CONFIG_CLOCK_CONTROL_NPCX_EXTERNAL_SRC)) {
212213
inst_cdcg->LFCGCTL2 |= BIT(NPCX_LFCGCTL2_XT_OSC_SL_EN);
213214
}
215+
#endif
214216

215217
/*
216218
* Resetting the OFMCLK (even to the same value) will make the clock

0 commit comments

Comments
 (0)