feat(nxp-clk): add a basic get_rate implementation
Replace the dummy implementation of clk_ops.get_rate with a basic
version that only handles the oscillator objects. Subsequent commits
will add more objects to this list.
Change-Id: I8c1bbbfa6b116fdcf5a1f1353bdb52b474bac831
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
diff --git a/include/drivers/nxp/clk/s32cc/s32cc-clk-modules.h b/include/drivers/nxp/clk/s32cc/s32cc-clk-modules.h
index 4837f79..c91f3b6 100644
--- a/include/drivers/nxp/clk/s32cc/s32cc-clk-modules.h
+++ b/include/drivers/nxp/clk/s32cc/s32cc-clk-modules.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
- * Copyright 2020-2024 NXP
+ * Copyright 2020-2025 NXP
*/
#ifndef S32CC_CLK_MODULES_H
#define S32CC_CLK_MODULES_H
@@ -52,14 +52,18 @@
void *base;
};
-#define S32CC_OSC_INIT(SOURCE) \
-{ \
- .desc = { \
- .type = s32cc_osc_t, \
- }, \
- .source = (SOURCE), \
+#define S32CC_OSC_INIT_FREQ(SOURCE, FREQ) \
+{ \
+ .desc = { \
+ .type = s32cc_osc_t, \
+ }, \
+ .source = (SOURCE), \
+ .freq = (FREQ), \
}
+#define S32CC_OSC_INIT(SOURCE) \
+ S32CC_OSC_INIT_FREQ(SOURCE, 0)
+
struct s32cc_clkmux {
struct s32cc_clk_obj desc;
enum s32cc_clk_source module;