From: Abel Vesa <abel.vesa@nxp.com>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Sascha Hauer <kernel@pengutronix.de>,
Lucas Stach <l.stach@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <fabio.estevam@nxp.com>,
dl-linux-imx <linux-imx@nxp.com>,
Aisheng Dong <aisheng.dong@nxp.com>, Jacky Bai <ping.bai@nxp.com>,
Anson Huang <anson.huang@nxp.com>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Abel Vesa <abel.vesa@nxp.com>
Subject: [RFC] clk: imx: Allow re-parenting by default on set rate
Date: Thu, 7 Mar 2019 09:20:37 +0000 [thread overview]
Message-ID: <1551950425-7346-1-git-send-email-abel.vesa@nxp.com> (raw)
By default, the muxes should re-parent on set_rate.
This would allow the drivers to control only the leaf clock node,
leaving the rest to the clock driver, that way simplifying the
clock control.
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
---
drivers/clk/imx/clk.h | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index 5748ec8..055b602 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -148,7 +148,7 @@ static inline struct clk *imx_clk_mux_ldb(const char *name, void __iomem *reg,
int num_parents)
{
return clk_register_mux(NULL, name, parents, num_parents,
- CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT, reg,
+ CLK_SET_RATE_PARENT, reg,
shift, width, CLK_MUX_READ_ONLY, &imx_ccm_lock);
}
@@ -321,7 +321,7 @@ static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg,
int num_parents)
{
return clk_register_mux(NULL, name, parents, num_parents,
- CLK_SET_RATE_NO_REPARENT, reg, shift,
+ 0, reg, shift,
width, 0, &imx_ccm_lock);
}
@@ -330,7 +330,7 @@ static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,
int num_parents)
{
return clk_register_mux(NULL, name, parents, num_parents,
- CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE,
+ CLK_OPS_PARENT_ENABLE,
reg, shift, width, 0, &imx_ccm_lock);
}
@@ -340,7 +340,6 @@ static inline struct clk_hw *imx_clk_hw_mux2(const char *name, void __iomem *reg
int num_parents)
{
return clk_hw_register_mux(NULL, name, parents, num_parents,
- CLK_SET_RATE_NO_REPARENT |
CLK_OPS_PARENT_ENABLE,
reg, shift, width, 0, &imx_ccm_lock);
}
@@ -351,7 +350,7 @@ static inline struct clk *imx_clk_mux_flags(const char *name,
unsigned long flags)
{
return clk_register_mux(NULL, name, parents, num_parents,
- flags | CLK_SET_RATE_NO_REPARENT, reg, shift, width, 0,
+ flags, reg, shift, width, 0,
&imx_ccm_lock);
}
@@ -361,7 +360,7 @@ static inline struct clk *imx_clk_mux2_flags(const char *name,
int num_parents, unsigned long flags)
{
return clk_register_mux(NULL, name, parents, num_parents,
- flags | CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE,
+ flags | CLK_OPS_PARENT_ENABLE,
reg, shift, width, 0, &imx_ccm_lock);
}
@@ -373,7 +372,7 @@ static inline struct clk_hw *imx_clk_hw_mux_flags(const char *name,
unsigned long flags)
{
return clk_hw_register_mux(NULL, name, parents, num_parents,
- flags | CLK_SET_RATE_NO_REPARENT,
+ flags,
reg, shift, width, 0, &imx_ccm_lock);
}
@@ -389,7 +388,7 @@ struct clk *imx8m_clk_composite_flags(const char *name,
#define __imx8m_clk_composite(name, parent_names, reg, flags) \
imx8m_clk_composite_flags(name, parent_names, \
ARRAY_SIZE(parent_names), reg, \
- flags | CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE)
+ flags | CLK_OPS_PARENT_ENABLE)
#define imx8m_clk_composite(name, parent_names, reg) \
__imx8m_clk_composite(name, parent_names, reg, 0)
--
2.7.4
next reply other threads:[~2019-03-07 9:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-07 9:20 Abel Vesa [this message]
2019-03-11 10:28 ` [RFC] clk: imx: Allow re-parenting by default on set rate Sascha Hauer
2019-03-11 10:41 ` Abel Vesa
2019-03-13 10:41 ` Sascha Hauer
2019-03-13 11:29 ` Daniel Baluta
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=1551950425-7346-1-git-send-email-abel.vesa@nxp.com \
--to=abel.vesa@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=anson.huang@nxp.com \
--cc=fabio.estevam@nxp.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=ping.bai@nxp.com \
--cc=sboyd@kernel.org \
--cc=shawnguo@kernel.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;
as well as URLs for NNTP newsgroup(s).