summaryrefslogtreecommitdiff
path: root/zephyr/shim
diff options
context:
space:
mode:
authorYi Chou <yich@google.com>2023-03-28 12:30:59 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-25 13:23:42 +0000
commit438865216dc3e4b7c86da0af5817040b10e78778 (patch)
tree6df50f4449deb6618d1d2b95145108f0bd1d11d2 /zephyr/shim
parent5400a250e5a8df743cd19f0d6e2ed29d71cdd0b0 (diff)
downloadchrome-ec-438865216dc3e4b7c86da0af5817040b10e78778.tar.gz
clock: Add mock for clock_enable_module
BUG=b:248508087 TEST=make buildall -j BRANCH=none Force-Relevant-Builds: all Change-Id: If691bd1400b65c5595b833293578e16208c49849 Signed-off-by: Yi Chou <yich@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4376399 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r--zephyr/shim/chip/it8xxx2/clock.c3
-rw-r--r--zephyr/shim/chip/mchp/clock.c3
-rw-r--r--zephyr/shim/chip/npcx/clock.c3
-rw-r--r--zephyr/shim/chip/stm32/clock.c3
-rw-r--r--zephyr/shim/chip/stub/clock.c3
5 files changed, 10 insertions, 5 deletions
diff --git a/zephyr/shim/chip/it8xxx2/clock.c b/zephyr/shim/chip/it8xxx2/clock.c
index ede854ac14..f76e67b223 100644
--- a/zephyr/shim/chip/it8xxx2/clock.c
+++ b/zephyr/shim/chip/it8xxx2/clock.c
@@ -3,6 +3,7 @@
* found in the LICENSE file.
*/
+#include "common.h"
#include "module_id.h"
#include <zephyr/device.h>
@@ -32,6 +33,6 @@ int clock_get_freq(void)
return pll_reg_to_freq[reg_val];
}
-void clock_enable_module(enum module_id module, int enable)
+test_mockable void clock_enable_module(enum module_id module, int enable)
{
}
diff --git a/zephyr/shim/chip/mchp/clock.c b/zephyr/shim/chip/mchp/clock.c
index 5fb39bfd43..2dff137c33 100644
--- a/zephyr/shim/chip/mchp/clock.c
+++ b/zephyr/shim/chip/mchp/clock.c
@@ -4,6 +4,7 @@
*/
#include "clock_chip.h"
+#include "common.h"
#include "module_id.h"
#include <zephyr/device.h>
@@ -65,7 +66,7 @@ void clock_normal(void)
__NOP();
}
-void clock_enable_module(enum module_id module, int enable)
+test_mockable 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) {
diff --git a/zephyr/shim/chip/npcx/clock.c b/zephyr/shim/chip/npcx/clock.c
index 2a6fe27ef4..f6d1a5db98 100644
--- a/zephyr/shim/chip/npcx/clock.c
+++ b/zephyr/shim/chip/npcx/clock.c
@@ -4,6 +4,7 @@
*/
#include "clock_chip.h"
+#include "common.h"
#include "module_id.h"
#include <zephyr/device.h>
@@ -66,7 +67,7 @@ void clock_normal(void)
cdcg_base->HFCBCD = (FIUDIV_VAL << 4);
}
-void clock_enable_module(enum module_id module, int enable)
+test_mockable 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) {
diff --git a/zephyr/shim/chip/stm32/clock.c b/zephyr/shim/chip/stm32/clock.c
index 5adf7b2412..0218d656bb 100644
--- a/zephyr/shim/chip/stm32/clock.c
+++ b/zephyr/shim/chip/stm32/clock.c
@@ -4,7 +4,8 @@
*/
#include "clock.h"
+#include "common.h"
-void clock_enable_module(enum module_id module, int enable)
+test_mockable void clock_enable_module(enum module_id module, int enable)
{
}
diff --git a/zephyr/shim/chip/stub/clock.c b/zephyr/shim/chip/stub/clock.c
index 5adf7b2412..0218d656bb 100644
--- a/zephyr/shim/chip/stub/clock.c
+++ b/zephyr/shim/chip/stub/clock.c
@@ -4,7 +4,8 @@
*/
#include "clock.h"
+#include "common.h"
-void clock_enable_module(enum module_id module, int enable)
+test_mockable void clock_enable_module(enum module_id module, int enable)
{
}