summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/shim/src/system.c5
-rw-r--r--zephyr/shim/src/ztest_system.c13
2 files changed, 15 insertions, 3 deletions
diff --git a/zephyr/shim/src/system.c b/zephyr/shim/src/system.c
index 4984759602..5a725477ab 100644
--- a/zephyr/shim/src/system.c
+++ b/zephyr/shim/src/system.c
@@ -23,7 +23,7 @@
LOG_MODULE_REGISTER(shim_system, LOG_LEVEL_ERR);
STATIC_IF_NOT(CONFIG_ZTEST) const struct device *bbram_dev;
-STATIC_IF_NOT(CONFIG_ZTEST) const struct device *sys_dev;
+static const struct device *sys_dev;
#if DT_NODE_EXISTS(DT_NODELABEL(bbram))
static int system_init(const struct device *unused)
@@ -312,7 +312,6 @@ static int system_preinitialize(const struct device *unused)
return 0;
}
-#if (!defined(CONFIG_ZTEST))
+
SYS_INIT(system_preinitialize, PRE_KERNEL_1,
CONFIG_PLATFORM_EC_SYSTEM_PRE_INIT_PRIORITY);
-#endif
diff --git a/zephyr/shim/src/ztest_system.c b/zephyr/shim/src/ztest_system.c
index 5fbc3dc50d..6aa1cf2efb 100644
--- a/zephyr/shim/src/ztest_system.c
+++ b/zephyr/shim/src/ztest_system.c
@@ -52,3 +52,16 @@ void system_print_banner(void)
{
printk("Image: %s\n", build_info);
}
+
+uint32_t chip_read_reset_flags(void)
+{
+ return 0;
+}
+
+void chip_save_reset_flags(uint32_t flags)
+{
+}
+
+void system_set_reset_flags(uint32_t flags)
+{
+}