]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
clk: mediatek: implement GATE_FLAGS macro
authorJulien Stephan <jstephan@baylibre.com>
Mon, 2 Feb 2026 12:08:12 +0000 (13:08 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 18 Feb 2026 18:01:18 +0000 (12:01 -0600)
Add helper macro for mtk_gate, the same way, there are macros for
FIXED_CLK, MUX and FACTOR.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
drivers/clk/mediatek/clk-mtk.h

index e618e982e8b903f2856bbd180b4336e1343dd9c9..f3d2377aee44a7972134b3e2ceebc0e9aa1f0bef 100644 (file)
@@ -243,6 +243,14 @@ struct mtk_gate {
        u32 flags;
 };
 
+#define GATE_FLAGS(_id, _parent, _regs, _shift, _flags) {      \
+               .id = _id,                                      \
+               .parent = _parent,                              \
+               .regs = _regs,                                  \
+               .shift = _shift,                                \
+               .flags = _flags,                                \
+       }
+
 /* struct mtk_clk_tree - clock tree */
 struct mtk_clk_tree {
        unsigned long xtal_rate;