public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 1/8] sh: clock-sh7724: add CLKDEV_ICK_ID for cleanup
@ 2011-07-06  1:17 Kuninori Morimoto
  2011-07-06  1:24 ` Paul Mundt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2011-07-06  1:17 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/sh/kernel/cpu/sh4a/clock-sh7724.c |   79 +++++++-------------------------
 1 files changed, 17 insertions(+), 62 deletions(-)

diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
index 77bcef5..0891876 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
@@ -254,6 +254,7 @@ static struct clk mstp_clks[HWBLK_NR] = {
 
 #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk }
 #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk }
+#define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk }
 
 static struct clk_lookup lookups[] = {
 	/* main clocks */
@@ -290,71 +291,25 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_CON_ID("sh0", &mstp_clks[HWBLK_SHYWAY]),
 	CLKDEV_CON_ID("hudi0", &mstp_clks[HWBLK_HUDI]),
 	CLKDEV_CON_ID("ubc0", &mstp_clks[HWBLK_UBC]),
-	{
-		/* TMU0 */
-		.dev_id		= "sh_tmu.0",
-		.con_id		= "tmu_fck",
-		.clk		= &mstp_clks[HWBLK_TMU0],
-	}, {
-		/* TMU1 */
-		.dev_id		= "sh_tmu.1",
-		.con_id		= "tmu_fck",
-		.clk		= &mstp_clks[HWBLK_TMU0],
-	}, {
-		/* TMU2 */
-		.dev_id		= "sh_tmu.2",
-		.con_id		= "tmu_fck",
-		.clk		= &mstp_clks[HWBLK_TMU0],
-	}, {
-		/* TMU3 */
-		.dev_id		= "sh_tmu.3",
-		.con_id		= "tmu_fck",
-		.clk		= &mstp_clks[HWBLK_TMU1],
-	},
+
+	CLKDEV_ICK_ID("tmu_fck", "sh_tmu.0", &mstp_clks[HWBLK_TMU0]),
+	CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[HWBLK_TMU0]),
+	CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[HWBLK_TMU0]),
+	CLKDEV_ICK_ID("tmu_fck", "sh_tmu.3", &mstp_clks[HWBLK_TMU1]),
+
 	CLKDEV_CON_ID("cmt_fck", &mstp_clks[HWBLK_CMT]),
 	CLKDEV_CON_ID("rwdt0", &mstp_clks[HWBLK_RWDT]),
 	CLKDEV_CON_ID("dmac1", &mstp_clks[HWBLK_DMAC1]),
-	{
-		/* TMU4 */
-		.dev_id		= "sh_tmu.4",
-		.con_id		= "tmu_fck",
-		.clk		= &mstp_clks[HWBLK_TMU1],
-	}, {
-		/* TMU5 */
-		.dev_id		= "sh_tmu.5",
-		.con_id		= "tmu_fck",
-		.clk		= &mstp_clks[HWBLK_TMU1],
-	}, {
-		/* SCIF0 */
-		.dev_id		= "sh-sci.0",
-		.con_id		= "sci_fck",
-		.clk		= &mstp_clks[HWBLK_SCIF0],
-	}, {
-		/* SCIF1 */
-		.dev_id		= "sh-sci.1",
-		.con_id		= "sci_fck",
-		.clk		= &mstp_clks[HWBLK_SCIF1],
-	}, {
-		/* SCIF2 */
-		.dev_id		= "sh-sci.2",
-		.con_id		= "sci_fck",
-		.clk		= &mstp_clks[HWBLK_SCIF2],
-	}, {
-		/* SCIF3 */
-		.dev_id		= "sh-sci.3",
-		.con_id		= "sci_fck",
-		.clk		= &mstp_clks[HWBLK_SCIF3],
-	}, {
-		/* SCIF4 */
-		.dev_id		= "sh-sci.4",
-		.con_id		= "sci_fck",
-		.clk		= &mstp_clks[HWBLK_SCIF4],
-	}, {
-		/* SCIF5 */
-		.dev_id		= "sh-sci.5",
-		.con_id		= "sci_fck",
-		.clk		= &mstp_clks[HWBLK_SCIF5],
-	},
+
+	CLKDEV_ICK_ID("tmu_fck", "sh_tmu.4", &mstp_clks[HWBLK_TMU1]),
+	CLKDEV_ICK_ID("tmu_fck", "sh_tmu.5", &mstp_clks[HWBLK_TMU1]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[HWBLK_SCIF0]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[HWBLK_SCIF1]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[HWBLK_SCIF2]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.3", &mstp_clks[HWBLK_SCIF3]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.4", &mstp_clks[HWBLK_SCIF4]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[HWBLK_SCIF5]),
+
 	CLKDEV_CON_ID("msiof0", &mstp_clks[HWBLK_MSIOF0]),
 	CLKDEV_CON_ID("msiof1", &mstp_clks[HWBLK_MSIOF1]),
 	CLKDEV_CON_ID("keysc0", &mstp_clks[HWBLK_KEYSC]),
-- 
1.7.4.1


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

* Re: [RFC][PATCH 1/8] sh: clock-sh7724: add CLKDEV_ICK_ID for cleanup
  2011-07-06  1:17 [RFC][PATCH 1/8] sh: clock-sh7724: add CLKDEV_ICK_ID for cleanup Kuninori Morimoto
@ 2011-07-06  1:24 ` Paul Mundt
  2011-07-06  1:28 ` kuninori.morimoto.gx
  2011-07-06  1:40 ` Paul Mundt
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2011-07-06  1:24 UTC (permalink / raw)
  To: linux-sh

On Tue, Jul 05, 2011 at 06:17:55PM -0700, Kuninori Morimoto wrote:
> diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> index 77bcef5..0891876 100644
> --- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> @@ -254,6 +254,7 @@ static struct clk mstp_clks[HWBLK_NR] = {
>  
>  #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk }
>  #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk }
> +#define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk }
>  
>  static struct clk_lookup lookups[] = {
>  	/* main clocks */

Perhaps while we're at it, it would help to move these macros in to
sh_clk.h.

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

* Re: [RFC][PATCH 1/8] sh: clock-sh7724: add CLKDEV_ICK_ID for cleanup
  2011-07-06  1:17 [RFC][PATCH 1/8] sh: clock-sh7724: add CLKDEV_ICK_ID for cleanup Kuninori Morimoto
  2011-07-06  1:24 ` Paul Mundt
@ 2011-07-06  1:28 ` kuninori.morimoto.gx
  2011-07-06  1:40 ` Paul Mundt
  2 siblings, 0 replies; 4+ messages in thread
From: kuninori.morimoto.gx @ 2011-07-06  1:28 UTC (permalink / raw)
  To: linux-sh


Dear Paul

Thank you for your reply

> On Tue, Jul 05, 2011 at 06:17:55PM -0700, Kuninori Morimoto wrote:
> > diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> > index 77bcef5..0891876 100644
> > --- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> > +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> > @@ -254,6 +254,7 @@ static struct clk mstp_clks[HWBLK_NR] = {
> >  
> >  #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk }
> >  #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk }
> > +#define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk }
> >  
> >  static struct clk_lookup lookups[] = {
> >  	/* main clocks */
> 
> Perhaps while we're at it, it would help to move these macros in to
> sh_clk.h.

OK.

Can I send incremental patch which name will be "move CLKDDEV_XXX_ID macro to sh_clk.h"
or v2 patch set ?

Best regards
---
Kuninori Morimoto

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

* Re: [RFC][PATCH 1/8] sh: clock-sh7724: add CLKDEV_ICK_ID for cleanup
  2011-07-06  1:17 [RFC][PATCH 1/8] sh: clock-sh7724: add CLKDEV_ICK_ID for cleanup Kuninori Morimoto
  2011-07-06  1:24 ` Paul Mundt
  2011-07-06  1:28 ` kuninori.morimoto.gx
@ 2011-07-06  1:40 ` Paul Mundt
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2011-07-06  1:40 UTC (permalink / raw)
  To: linux-sh

On Wed, Jul 06, 2011 at 10:28:30AM +0900, kuninori.morimoto.gx@renesas.com wrote:
> > On Tue, Jul 05, 2011 at 06:17:55PM -0700, Kuninori Morimoto wrote:
> > > diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> > > index 77bcef5..0891876 100644
> > > --- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> > > +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> > > @@ -254,6 +254,7 @@ static struct clk mstp_clks[HWBLK_NR] = {
> > >  
> > >  #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk }
> > >  #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk }
> > > +#define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk }
> > >  
> > >  static struct clk_lookup lookups[] = {
> > >  	/* main clocks */
> > 
> > Perhaps while we're at it, it would help to move these macros in to
> > sh_clk.h.
> 
> OK.
> 
> Can I send incremental patch which name will be "move CLKDDEV_XXX_ID macro to sh_clk.h"
> or v2 patch set ?
> 
Incremental patch sounds good. I'll queue this series up as it is, as
it's a reasonable cleanup.

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

end of thread, other threads:[~2011-07-06  1:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06  1:17 [RFC][PATCH 1/8] sh: clock-sh7724: add CLKDEV_ICK_ID for cleanup Kuninori Morimoto
2011-07-06  1:24 ` Paul Mundt
2011-07-06  1:28 ` kuninori.morimoto.gx
2011-07-06  1:40 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox