diff options
author | Yuval Peress <peress@chromium.org> | 2021-02-12 11:13:59 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-12 19:57:55 +0000 |
commit | c2998b09577747f8b9c8b1abdc2a3f9bcc967641 (patch) | |
tree | bba9ec938de50a50c8fc8485c09951cb34a1e977 | |
parent | c9b0c9cb92e1440205336e0815fd03590d1d58eb (diff) | |
download | chrome-ec-c2998b09577747f8b9c8b1abdc2a3f9bcc967641.tar.gz |
zephyr: add stub implementation of clock_turbo
Some functionality (sysjump in particular) makes use of altering the
clock rate. This should eventually live in Zephyr proper, but for
now stubbing it will get things working, just a bit slower.
BRANCH=none
BUG=b:167392037, b:180112248
TEST=zmake testall
TEST=build volteer, flash, see that it runs.
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I91ff57c7e0f5cda60556087e6c46ba1d08f8b4a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2693526
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | zephyr/shim/chip/npcx/CMakeLists.txt | 2 | ||||
-rw-r--r-- | zephyr/shim/chip/npcx/clock.c | 6 | ||||
-rw-r--r-- | zephyr/shim/chip/npcx/include/clock_chip.h | 14 |
3 files changed, 22 insertions, 0 deletions
diff --git a/zephyr/shim/chip/npcx/CMakeLists.txt b/zephyr/shim/chip/npcx/CMakeLists.txt index 3df9088428..e5c16b7144 100644 --- a/zephyr/shim/chip/npcx/CMakeLists.txt +++ b/zephyr/shim/chip/npcx/CMakeLists.txt @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +zephyr_include_directories(include) + zephyr_sources(clock.c) zephyr_sources_ifdef(CONFIG_CROS_KB_RAW_NPCX keyboard_raw.c) zephyr_sources_ifdef(CONFIG_CROS_EC system.c) diff --git a/zephyr/shim/chip/npcx/clock.c b/zephyr/shim/chip/npcx/clock.c index 8321d5f6d3..d70ac43e0f 100644 --- a/zephyr/shim/chip/npcx/clock.c +++ b/zephyr/shim/chip/npcx/clock.c @@ -11,6 +11,8 @@ #include <soc.h> #include <zephyr.h> +#include "clock_chip.h" + LOG_MODULE_REGISTER(shim_clock, LOG_LEVEL_ERR); int clock_get_freq(void) @@ -29,3 +31,7 @@ int clock_get_freq(void) return rate; } + +void clock_turbo(void) +{ +} diff --git a/zephyr/shim/chip/npcx/include/clock_chip.h b/zephyr/shim/chip/npcx/include/clock_chip.h new file mode 100644 index 0000000000..0c39ed8174 --- /dev/null +++ b/zephyr/shim/chip/npcx/include/clock_chip.h @@ -0,0 +1,14 @@ +/* Copyright 2021 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_CLOCK_CHIP_H +#define __CROS_EC_CLOCK_CHIP_H + +/** + * TODO(b:180112248) implement in zephyr's clock_control.h + */ +void clock_turbo(void); + +#endif /* __CROS_EC_CLOCK_CHIP_H */ |