1 /* 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 8 #include <stdbool.h> 9 #include <s32cc-clk-modules.h> 10 11 struct 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 15 int 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 19 struct s32cc_clk *s32cc_get_arch_clk(unsigned long id); 20 int s32cc_get_clk_id(const struct s32cc_clk *clk, unsigned long *id); 21 22 int s32cc_clk_register_drv(bool mmap_regs); 23 24 #endif /* S32CC_CLK_UTILS_H */ 25