summaryrefslogtreecommitdiff
path: root/include/clk
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2022-05-05 01:25:43 +0100
committerAndre Przywara <andre.przywara@arm.com>2022-05-24 01:16:15 +0100
commitd6cb09d89d52d087881695c1f4e5e1ff26328267 (patch)
tree4ac4a8a0e5a6cdbaa449bccac100f14c758347e3 /include/clk
parent444ab3569bae32daed9c05fb10f87d907cc180ff (diff)
clk: sunxi: add and use dummy gate clocks
Some devices enumerate various clocks in their DT, and many drivers just blanketly try to enable all of them. This creates problems since we only model a few gate clocks, and the clock driver outputs a warning when a clock is not described: ========= sunxi_set_gate: (CLK#3) unhandled ========= Some clocks don't have an enable bit, or are already enabled in a different way, so we might want to just ignore them. Add a CCU_CLK_F_DUMMY_GATE flag that indicates that case, and define a GATE_DUMMY macro that can be used in the clock description array. Define a few clocks, used by some pinctrl devices, that way to suppress the runtime warnings. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'include/clk')
-rw-r--r--include/clk/sunxi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clk/sunxi.h b/include/clk/sunxi.h
index a2239b990b..c4a9dee5eb 100644
--- a/include/clk/sunxi.h
+++ b/include/clk/sunxi.h
@@ -18,6 +18,7 @@
enum ccu_flags {
CCU_CLK_F_IS_VALID = BIT(0),
CCU_RST_F_IS_VALID = BIT(1),
+ CCU_CLK_F_DUMMY_GATE = BIT(2),
};
/**
@@ -38,6 +39,10 @@ struct ccu_clk_gate {
.flags = CCU_CLK_F_IS_VALID, \
}
+#define GATE_DUMMY { \
+ .flags = CCU_CLK_F_DUMMY_GATE, \
+}
+
/**
* struct ccu_reset - ccu reset
* @off: reset offset