[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240229122021.1901785-2-tudor.ambarus@linaro.org>
Date: Thu, 29 Feb 2024 12:20:18 +0000
From: Tudor Ambarus <tudor.ambarus@...aro.org>
To: krzysztof.kozlowski@...aro.org,
s.nawrocki@...sung.com,
cw00.choi@...sung.com,
semen.protsenko@...aro.org
Cc: alim.akhtar@...sung.com,
mturquette@...libre.com,
sboyd@...nel.org,
peter.griffin@...aro.org,
andre.draszik@...aro.org,
linux-samsung-soc@...r.kernel.org,
linux-clk@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
willmcvicker@...gle.com,
kernel-team@...roid.com,
Tudor Ambarus <tudor.ambarus@...aro.org>
Subject: [PATCH 1/4] clk: samsung: introduce nMUX for MUX clks that can reparented
All samsung MUX clocks that are defined with MUX() set the
CLK_SET_RATE_NO_REPARENT flag in __MUX(), which prevents muxes to be
reparented during clk_set_rate.
Introduce nMUX() for MUX clocks that can be reparented. GS101 SoC will use
nMUX as there are MUX clocks which are dedicated per IP, thus
reparenting the MUX will not affect other IPs. Exynos850 can use it too.
Signed-off-by: Tudor Ambarus <tudor.ambarus@...aro.org>
---
drivers/clk/samsung/clk.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
index a763309e6f12..75e2fa8d7da9 100644
--- a/drivers/clk/samsung/clk.h
+++ b/drivers/clk/samsung/clk.h
@@ -146,6 +146,26 @@ struct samsung_mux_clock {
#define MUX_F(_id, cname, pnames, o, s, w, f, mf) \
__MUX(_id, cname, pnames, o, s, w, f, mf)
+/* Used by MUX clocks where reparenting is allowed. */
+#define __nMUX(_id, cname, pnames, o, s, w, f, mf) \
+ { \
+ .id = _id, \
+ .name = cname, \
+ .parent_names = pnames, \
+ .num_parents = ARRAY_SIZE(pnames), \
+ .flags = f, \
+ .offset = o, \
+ .shift = s, \
+ .width = w, \
+ .mux_flags = mf, \
+ }
+
+#define nMUX(_id, cname, pnames, o, s, w) \
+ __nMUX(_id, cname, pnames, o, s, w, 0, 0)
+
+#define nMUX_F(_id, cname, pnames, o, s, w, f, mf) \
+ __nMUX(_id, cname, pnames, o, s, w, f, mf)
+
/**
* struct samsung_div_clock - information about div clock
* @id: platform specific id of the clock
--
2.44.0.278.ge034bb2e1d-goog
Powered by blists - more mailing lists