From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 1/3] clk: imx: add IMX_COMPOSITE_CLK_FLAGS_DEFAULT macro
Date: Fri, 19 Apr 2024 08:10:01 +0200 [thread overview]
Message-ID: <20240419061003.2590849-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240419061003.2590849-1-a.fatoum@pengutronix.de>
We use the same flags in two macros and will add one more instance in a
follow-up commit, so factor them out into a macro like Linux does.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/clk/imx/clk.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index 9058f913d316..00dc72831f38 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -276,6 +276,9 @@ struct clk *imx_clk_cpu(const char *name, const char *parent_name,
#define IMX_COMPOSITE_CORE BIT(0)
#define IMX_COMPOSITE_BUS BIT(1)
+#define IMX_COMPOSITE_CLK_FLAGS_DEFAULT \
+ (CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE)
+
struct clk *imx8m_clk_composite_flags(const char *name,
const char * const *parent_names, int num_parents, void __iomem *reg,
u32 composite_flags,
@@ -285,13 +288,13 @@ struct clk *imx8m_clk_composite_flags(const char *name,
imx8m_clk_hw_composite_flags(name, parent_names, \
ARRAY_SIZE(parent_names), reg, \
IMX_COMPOSITE_CORE, \
- CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE)
+ IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
#define imx8m_clk_hw_composite_bus(name, parent_names, reg) \
imx8m_clk_hw_composite_flags(name, parent_names, \
ARRAY_SIZE(parent_names), reg, \
IMX_COMPOSITE_BUS, \
- CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE)
+ IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
#define __imx8m_clk_composite(name, parent_names, reg, flags) \
imx8m_clk_composite_flags(name, parent_names, \
--
2.39.2
next prev parent reply other threads:[~2024-04-19 6:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 6:10 [PATCH master 0/3] clk: imx: composite-8m: fix muxing of core and bus Ahmad Fatoum
2024-04-19 6:10 ` Ahmad Fatoum [this message]
2024-04-19 6:10 ` [PATCH master 2/3] clk: imx: composite-8m: fix muxing of core and bus clocks Ahmad Fatoum
2024-04-19 6:10 ` [PATCH master 3/3] clk: imx: imx8mp: sync with Linux v6.9-rc3 Ahmad Fatoum
2024-04-22 11:26 ` [PATCH master 0/3] clk: imx: composite-8m: fix muxing of core and bus Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240419061003.2590849-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox