summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-02-15 13:18:35 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-02-16 13:11:23 +0100
commit2098731f7cf44cb04de503d355b3b52568554fab (patch)
treeb80f58552aa543ae04dc1822af766ab8b8a33cd1 /include/linux
parente90bf7a1c54b1b46d316cc0ca91e1355eb515b96 (diff)
downloadbarebox-2098731f7cf44cb04de503d355b3b52568554fab.tar.gz
barebox-2098731f7cf44cb04de503d355b3b52568554fab.tar.xz
clk: add dummy definitions for CLK_SET_RATE_GATE, CLK_SET_PARENT_GATE
CLK_SET_RATE_GATE and CLK_SET_PARENT_GATE mean that the clk itself or its parent, respectively, needs to be gated before attempting a set rate. If this is not the case, the operation would fail in Linux with -EBUSY. The usual way this is ported to barebox is by just omitting the flag, because a well-behaving driver shouldn't be gating clocks before setting rate anyway. Embrace this guard rail free life by defining the macros as zero. If in future, we decide to add them, we can always redefine them and implement appropriate behavior. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240215121837.251013-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clk.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 1bdfb21d50..d76f175bbd 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -240,6 +240,11 @@ static inline void clk_put(struct clk *clk)
#define CLK_GATE_SET_TO_DISABLE (1 << 0)
#define CLK_GATE_HIWORD_MASK (1 << 1)
+/* Ignored sanity checking flags */
+#define CLK_SET_RATE_GATE 0 /* must be gated across rate change */
+#define CLK_SET_PARENT_GATE 0 /* must be gated across re-parent */
+
+
/**
* struct clk_ops - Callback operations for hardware clocks; these are to
* be provided by the clock implementation, and will be called by drivers