1 /* SPDX-License-Identifier: GPL-2.0+ */
9 #define LOG_CATEGORY UCLASS_CLK
10 #include <linux/types.h>
11 #include <linux/clk-provider.h>
13 static inline struct clk *k210_clk_gate(const char *name,
14 const char *parent_name,
15 void __iomem *reg, u8 bit_idx)
17 return clk_register_gate(NULL, name, parent_name, 0, reg, bit_idx, 0,
21 static inline struct clk *k210_clk_half(const char *name,
22 const char *parent_name)
24 return clk_register_fixed_factor(NULL, name, parent_name, 0, 1, 2);
27 static inline struct clk *k210_clk_div(const char *name,
28 const char *parent_name,
29 void __iomem *reg, u8 shift, u8 width)
31 return clk_register_divider(NULL, name, parent_name, 0, reg, shift,
35 #endif /* K210_CLK_H */