diff options
-rw-r--r-- | chip/npcx/clock.c | 14 | ||||
-rw-r--r-- | common/system.c | 10 |
2 files changed, 23 insertions, 1 deletions
diff --git a/chip/npcx/clock.c b/chip/npcx/clock.c index ca3ebf88d8..ecd48197b2 100644 --- a/chip/npcx/clock.c +++ b/chip/npcx/clock.c @@ -163,12 +163,24 @@ void clock_turbo(void) NPCX_HFCBCD = (1 << 4); } -void clock_turbo_disable(void) +void clock_normal(void) { /* Set CORE_CLK (CPU), AHB6_CLK and FIU_CLK back to original values. */ NPCX_HFCGP = ((FPRED << 4) | AHB6DIV); NPCX_HFCBCD = (FIUDIV << 4); } + +void clock_enable_module(enum module_id module, int enable) +{ + /* Assume we have a single task using MODULE_FAST_CPU */ + if (module == MODULE_FAST_CPU) { + if (enable) + clock_turbo(); + else + clock_normal(); + } +} + #endif /** diff --git a/common/system.c b/common/system.c index 6cd5702c30..467218560a 100644 --- a/common/system.c +++ b/common/system.c @@ -1632,3 +1632,13 @@ int board_write_serial(const char *serialno) } #endif #endif /* CONFIG_SERIALNO_LEN */ + + +__attribute__((weak)) +void clock_enable_module(enum module_id module, int enable) +{ + /* + * Default weak implementation - for chips that don't support this + * function. + */ +} |