blob: c6e90f056e003c6098c47ab3f2a63707c2f9806c [file] [log] [blame]
Ghennadi Procopciucecc98d22024-06-12 07:38:52 +03001/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2024 NXP
4 */
5#ifndef S32CC_CLK_UTILS_H
6#define S32CC_CLK_UTILS_H
7
Ghennadi Procopciuce83c8c62024-11-27 12:33:26 +02008#include <stdbool.h>
Ghennadi Procopciucecc98d22024-06-12 07:38:52 +03009#include <s32cc-clk-modules.h>
10
11struct s32cc_clk *s32cc_get_clk_from_table(const struct s32cc_clk_array *const *clk_arr,
12 size_t size,
13 unsigned long clk_id);
14
Ghennadi Procopciuc302831c2024-09-11 09:29:50 +030015int s32cc_get_id_from_table(const struct s32cc_clk_array *const *clk_arr,
16 size_t size, const struct s32cc_clk *clk,
17 unsigned long *clk_index);
18
Ghennadi Procopciucecc98d22024-06-12 07:38:52 +030019struct s32cc_clk *s32cc_get_arch_clk(unsigned long id);
Ghennadi Procopciuc302831c2024-09-11 09:29:50 +030020int s32cc_get_clk_id(const struct s32cc_clk *clk, unsigned long *id);
Ghennadi Procopciucecc98d22024-06-12 07:38:52 +030021
Ghennadi Procopciuce83c8c62024-11-27 12:33:26 +020022int s32cc_clk_register_drv(bool mmap_regs);
Ghennadi Procopciucf648e5d2024-06-12 09:07:16 +030023
Ghennadi Procopciucecc98d22024-06-12 07:38:52 +030024#endif /* S32CC_CLK_UTILS_H */