linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: imx: pll14xx: introduce imx_clk_hw_pll14xx_flags
@ 2019-11-13  7:26 Peng Fan
  2019-11-13 12:16 ` Leonard Crestez
  0 siblings, 1 reply; 3+ messages in thread
From: Peng Fan @ 2019-11-13  7:26 UTC (permalink / raw)
  To: sboyd, shawnguo, s.hauer, festevam, Abel Vesa
  Cc: Aisheng Dong, Peng Fan, Alice Guo, linux-kernel, dl-linux-imx,
	kernel, Leonard Crestez, linux-clk, linux-arm-kernel

From: Peng Fan <peng.fan@nxp.com>

Introduce imx_clk_hw_pll14xx_flags, then no need to add new
imx_pll14xx_clk variable for new flags.

Since the original imx_pll14xx_clk flags is not used, so drop it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

V1:
 Based on https://patchwork.kernel.org/patch/11217889/

 drivers/clk/imx/clk-pll14xx.c | 12 +++++++++++-
 drivers/clk/imx/clk.h         |  7 ++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index 2bbcfbf8081a..a8af949f0848 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -379,6 +379,16 @@ struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
 				  void __iomem *base,
 				  const struct imx_pll14xx_clk *pll_clk)
 {
+
+	return imx_clk_hw_pll14xx_flags(name, parent_name, base, pll_clk, 0);
+}
+
+struct clk_hw *imx_clk_hw_pll14xx_flags(const char *name,
+					const char *parent_name,
+					void __iomem *base,
+					const struct imx_pll14xx_clk *pll_clk,
+					unsigned long flags)
+{
 	struct clk_pll14xx *pll;
 	struct clk_hw *hw;
 	struct clk_init_data init;
@@ -390,7 +400,7 @@ struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
 		return ERR_PTR(-ENOMEM);
 
 	init.name = name;
-	init.flags = pll_clk->flags;
+	init.flags = flags;
 	init.parent_names = &parent_name;
 	init.num_parents = 1;
 
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index cd92d9fdccf4..c2851a82b4fd 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -48,7 +48,6 @@ struct imx_pll14xx_clk {
 	enum imx_pll14xx_type type;
 	const struct imx_pll14xx_rate_table *rate_table;
 	int rate_count;
-	int flags;
 };
 
 extern struct imx_pll14xx_clk imx_1416x_pll;
@@ -105,6 +104,12 @@ struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
 				  void __iomem *base,
 				  const struct imx_pll14xx_clk *pll_clk);
 
+struct clk_hw *imx_clk_hw_pll14xx_flags(const char *name,
+					const char *parent_name,
+					void __iomem *base,
+					const struct imx_pll14xx_clk *pll_clk,
+					unsigned long flags);
+
 struct clk *imx_clk_pllv1(enum imx_pllv1_type type, const char *name,
 		const char *parent, void __iomem *base);
 
-- 
2.16.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: imx: pll14xx: introduce imx_clk_hw_pll14xx_flags
  2019-11-13  7:26 [PATCH] clk: imx: pll14xx: introduce imx_clk_hw_pll14xx_flags Peng Fan
@ 2019-11-13 12:16 ` Leonard Crestez
  2019-11-13 12:19   ` Peng Fan
  0 siblings, 1 reply; 3+ messages in thread
From: Leonard Crestez @ 2019-11-13 12:16 UTC (permalink / raw)
  To: Peng Fan, sboyd, shawnguo
  Cc: Aisheng Dong, Abel Vesa, Alice Guo, s.hauer, linux-kernel,
	dl-linux-imx, kernel, festevam, linux-clk, linux-arm-kernel

On 13.11.2019 09:26, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Introduce imx_clk_hw_pll14xx_flags, then no need to add new
> imx_pll14xx_clk variable for new flags.
> 
> Since the original imx_pll14xx_clk flags is not used, so drop it.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>

Most other imx clock wrappers take flags as an argument so it's nice to 
be consistent.

> V1:
>   Based on https://patchwork.kernel.org/patch/11217889/

In general if you sent patches on top of patches it makes sense to 
resend as a series. That clk_hw series is not in yet.

>   drivers/clk/imx/clk-pll14xx.c | 12 +++++++++++-
>   drivers/clk/imx/clk.h         |  7 ++++++-
>   2 files changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
> index 2bbcfbf8081a..a8af949f0848 100644
> --- a/drivers/clk/imx/clk-pll14xx.c
> +++ b/drivers/clk/imx/clk-pll14xx.c
> @@ -379,6 +379,16 @@ struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
>   				  void __iomem *base,
>   				  const struct imx_pll14xx_clk *pll_clk)
>   {
> +
> +	return imx_clk_hw_pll14xx_flags(name, parent_name, base, pll_clk, 0);
> +}
> +
> +struct clk_hw *imx_clk_hw_pll14xx_flags(const char *name,
> +					const char *parent_name,
> +					void __iomem *base,
> +					const struct imx_pll14xx_clk *pll_clk,
> +					unsigned long flags)
> +{
>   	struct clk_pll14xx *pll;
>   	struct clk_hw *hw;
>   	struct clk_init_data init;
> @@ -390,7 +400,7 @@ struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
>   		return ERR_PTR(-ENOMEM);
>   
>   	init.name = name;
> -	init.flags = pll_clk->flags;
> +	init.flags = flags;
>   	init.parent_names = &parent_name;
>   	init.num_parents = 1;
>   
> diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
> index cd92d9fdccf4..c2851a82b4fd 100644
> --- a/drivers/clk/imx/clk.h
> +++ b/drivers/clk/imx/clk.h
> @@ -48,7 +48,6 @@ struct imx_pll14xx_clk {
>   	enum imx_pll14xx_type type;
>   	const struct imx_pll14xx_rate_table *rate_table;
>   	int rate_count;
> -	int flags;
>   };
>   
>   extern struct imx_pll14xx_clk imx_1416x_pll;
> @@ -105,6 +104,12 @@ struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
>   				  void __iomem *base,
>   				  const struct imx_pll14xx_clk *pll_clk);
>   
> +struct clk_hw *imx_clk_hw_pll14xx_flags(const char *name,
> +					const char *parent_name,
> +					void __iomem *base,
> +					const struct imx_pll14xx_clk *pll_clk,
> +					unsigned long flags);
> +
>   struct clk *imx_clk_pllv1(enum imx_pllv1_type type, const char *name,
>   		const char *parent, void __iomem *base);

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] clk: imx: pll14xx: introduce imx_clk_hw_pll14xx_flags
  2019-11-13 12:16 ` Leonard Crestez
@ 2019-11-13 12:19   ` Peng Fan
  0 siblings, 0 replies; 3+ messages in thread
From: Peng Fan @ 2019-11-13 12:19 UTC (permalink / raw)
  To: Leonard Crestez, sboyd, shawnguo
  Cc: Aisheng Dong, Abel Vesa, Alice Guo, s.hauer, linux-kernel,
	dl-linux-imx, kernel, festevam, linux-clk, linux-arm-kernel


> Subject: Re: [PATCH] clk: imx: pll14xx: introduce imx_clk_hw_pll14xx_flags
> 
> On 13.11.2019 09:26, Peng Fan wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Introduce imx_clk_hw_pll14xx_flags, then no need to add new
> > imx_pll14xx_clk variable for new flags.
> >
> > Since the original imx_pll14xx_clk flags is not used, so drop it.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> 
> Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
> 
> Most other imx clock wrappers take flags as an argument so it's nice to be
> consistent.
> 
> > V1:
> >   Based on https://patchwork.kernel.org/patch/11217889/
> 
> In general if you sent patches on top of patches it makes sense to resend as a
> series. That clk_hw series is not in yet.

Thanks for hints, I'll take care in future.

Thanks,
Peng.

> 
> >   drivers/clk/imx/clk-pll14xx.c | 12 +++++++++++-
> >   drivers/clk/imx/clk.h         |  7 ++++++-
> >   2 files changed, 17 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/clk/imx/clk-pll14xx.c
> > b/drivers/clk/imx/clk-pll14xx.c index 2bbcfbf8081a..a8af949f0848
> > 100644
> > --- a/drivers/clk/imx/clk-pll14xx.c
> > +++ b/drivers/clk/imx/clk-pll14xx.c
> > @@ -379,6 +379,16 @@ struct clk_hw *imx_clk_hw_pll14xx(const char
> *name, const char *parent_name,
> >   				  void __iomem *base,
> >   				  const struct imx_pll14xx_clk *pll_clk)
> >   {
> > +
> > +	return imx_clk_hw_pll14xx_flags(name, parent_name, base, pll_clk,
> > +0); }
> > +
> > +struct clk_hw *imx_clk_hw_pll14xx_flags(const char *name,
> > +					const char *parent_name,
> > +					void __iomem *base,
> > +					const struct imx_pll14xx_clk *pll_clk,
> > +					unsigned long flags)
> > +{
> >   	struct clk_pll14xx *pll;
> >   	struct clk_hw *hw;
> >   	struct clk_init_data init;
> > @@ -390,7 +400,7 @@ struct clk_hw *imx_clk_hw_pll14xx(const char
> *name, const char *parent_name,
> >   		return ERR_PTR(-ENOMEM);
> >
> >   	init.name = name;
> > -	init.flags = pll_clk->flags;
> > +	init.flags = flags;
> >   	init.parent_names = &parent_name;
> >   	init.num_parents = 1;
> >
> > diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index
> > cd92d9fdccf4..c2851a82b4fd 100644
> > --- a/drivers/clk/imx/clk.h
> > +++ b/drivers/clk/imx/clk.h
> > @@ -48,7 +48,6 @@ struct imx_pll14xx_clk {
> >   	enum imx_pll14xx_type type;
> >   	const struct imx_pll14xx_rate_table *rate_table;
> >   	int rate_count;
> > -	int flags;
> >   };
> >
> >   extern struct imx_pll14xx_clk imx_1416x_pll; @@ -105,6 +104,12 @@
> > struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char
> *parent_name,
> >   				  void __iomem *base,
> >   				  const struct imx_pll14xx_clk *pll_clk);
> >
> > +struct clk_hw *imx_clk_hw_pll14xx_flags(const char *name,
> > +					const char *parent_name,
> > +					void __iomem *base,
> > +					const struct imx_pll14xx_clk *pll_clk,
> > +					unsigned long flags);
> > +
> >   struct clk *imx_clk_pllv1(enum imx_pllv1_type type, const char *name,
> >   		const char *parent, void __iomem *base);

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-13 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13  7:26 [PATCH] clk: imx: pll14xx: introduce imx_clk_hw_pll14xx_flags Peng Fan
2019-11-13 12:16 ` Leonard Crestez
2019-11-13 12:19   ` Peng Fan

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).