From: b32955@freescale.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: clk: imx: add a new helper which can re-parent the clock
Date: Mon, 26 May 2014 14:03:51 +0800 [thread overview]
Message-ID: <20140526060349.GA11074@shlinux1.ap.freescale.net> (raw)
In-Reply-To: <1401087292.925679327@f35.i.mail.ru>
On Mon, May 26, 2014 at 10:54:52AM +0400, Alexander Shiyan wrote:
> Mon, 26 May 2014 13:20:32 +0800 ?? Huang Shijie <b32955@freescale.com>:
> > The clocks for Quadspi controller may be different when different
> > NOR flashes are connected to the board.
> >
> > This patch adds a new helper to register the clock which needs the
> > re-parent capability.
> >
> > Signed-off-by: Huang Shijie <b32955@freescale.com>
> > ---
> > arch/arm/mach-imx/clk.h | 10 ++++++++++
> > 1 files changed, 10 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h
> > index e29f6eb..2e3c4fe 100644
> > --- a/arch/arm/mach-imx/clk.h
> > +++ b/arch/arm/mach-imx/clk.h
> > @@ -112,6 +112,16 @@ static inline struct clk *imx_clk_mux_flags(const char *name,
> > &imx_ccm_lock);
> > }
> >
> > +/* we can use this helper to register the clock which needs the re-parent. */
> > +static inline struct clk *imx_clk_mux_flags_reparent(const char *name,
> > + void __iomem *reg, u8 shift, u8 width, const char **parents,
> > + int num_parents, unsigned long flags)
> > +{
> > + return clk_register_mux(NULL, name, parents, num_parents,
> > + flags, reg, shift, width, 0,
> > + &imx_ccm_lock);
> > +}
>
> So you can use CLK_SET_RATE_PARENT for flags here and completely remove
> flags parameter for this call. Is not it?
Do you mean make the code like this :
----------------------------------------------------------------
return clk_register_mux(NULL, name, parents, num_parents,
CLK_SET_RATE_PARENT, reg, shift, width, 0,
&imx_ccm_lock);
----------------------------------------------------------------
Without the "flags" argument, the helper is too specific.
But if Shawn also agree to use the fixed CLK_SET_RATE_PARENT, i am okay too.
thanks
Huang Shijie
next prev parent reply other threads:[~2014-05-26 6:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 5:20 [PATCH 1/2] ARM: clk: imx: add a new helper which can re-parent the clock Huang Shijie
2014-05-26 5:20 ` [PATCH 2/2] ARM: clk-imx6sx: register the qspi's clock with re-parent capability Huang Shijie
2014-05-26 6:54 ` [PATCH 1/2] ARM: clk: imx: add a new helper which can re-parent the clock Alexander Shiyan
2014-05-26 6:03 ` Huang Shijie [this message]
2014-05-26 7:42 ` Alexander Shiyan
2014-05-26 8:01 ` Shawn Guo
2014-05-26 6:47 ` Huang Shijie
2014-05-26 8:11 ` Shawn Guo
2014-05-26 6:58 ` Huang Shijie
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=20140526060349.GA11074@shlinux1.ap.freescale.net \
--to=b32955@freescale.com \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).