diff options
author | Fabio Baltieri <fabiobaltieri@google.com> | 2021-06-24 16:46:31 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-28 12:56:38 +0000 |
commit | 5d9859ffa6bc1687818bbc3c955a20c7e0a2db07 (patch) | |
tree | 6617b0d31f24257d8eb906747fb665e0f50c6c3b /zephyr/shim/chip | |
parent | bcaeebb1efb5f26ee6ef63e19b97894a3b89ab22 (diff) | |
download | chrome-ec-5d9859ffa6bc1687818bbc3c955a20c7e0a2db07.tar.gz |
zephyr: shim: use DEVICE_DT_GET for clock control
This changes the clock control calls to use DEVICE_DT_GET instead of
device_get_binding. DEVICE_DT_GET is more efficient since it's allocated
at link time.
These are then used by clock_control_on, which already checks for
device_is_ready, so no extra safety checks are needed.
BRANCH=none
BUG=none
TEST=zmake configure -b -B ~/build-volteer/ zephyr/projects/volteer/volteer
TEST=zmake configure -b -B ~/build-it8xxx2_evb/ zephyr/projects/it8xxx2_evb
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I76a2c47165d197c799be25d8e7e40a1a0873777d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2985462
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr/shim/chip')
-rw-r--r-- | zephyr/shim/chip/npcx/clock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zephyr/shim/chip/npcx/clock.c b/zephyr/shim/chip/npcx/clock.c index 24ae45d107..cd483682b8 100644 --- a/zephyr/shim/chip/npcx/clock.c +++ b/zephyr/shim/chip/npcx/clock.c @@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(shim_clock, LOG_LEVEL_ERR); int clock_get_freq(void) { - const struct device *clk_dev = device_get_binding(NPCX_CLK_CTRL_NAME); + const struct device *clk_dev = DEVICE_DT_GET(DT_NODELABEL(pcc)); const struct npcx_clk_cfg clk_cfg = { .bus = NPCX_CLOCK_BUS_CORE, }; |