linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer
@ 2013-09-17 16:32 dinguyen at altera.com
  2013-09-17 16:32 ` [PATCH 2/2] arm: socfpga: Remove socfpga_init_clocks dinguyen at altera.com
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: dinguyen at altera.com @ 2013-09-17 16:32 UTC (permalink / raw)
  To: linux-arm-kernel

From: Dinh Nguyen <dinguyen@altera.com>

Assign a clock for the twd-timer.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Ian Campbell <ian.campbell@citrix.com>
CC: linux-arm-kernel at lists.infradead.org
---
 arch/arm/boot/dts/socfpga.dtsi |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
index acd6c3a..e28df94 100644
--- a/arch/arm/boot/dts/socfpga.dtsi
+++ b/arch/arm/boot/dts/socfpga.dtsi
@@ -480,11 +480,11 @@
 			clock-names = "biu", "ciu";
 		};
 
-		/* Local timer */
-		timer at fffec600 {
+		local-timer at fffec600 {
 			compatible = "arm,cortex-a9-twd-timer";
 			reg = <0xfffec600 0x100>;
 			interrupts = <1 13 0xf04>;
+			clocks = <&mpu_periph_clk>;
 		};
 
 		timer0: timer0 at ffc08000 {
-- 
1.7.9.5

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

* [PATCH 2/2] arm: socfpga: Remove socfpga_init_clocks
  2013-09-17 16:32 [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer dinguyen at altera.com
@ 2013-09-17 16:32 ` dinguyen at altera.com
  2013-10-01 19:15 ` [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer Dinh Nguyen
  2013-10-01 19:23 ` Rob Herring
  2 siblings, 0 replies; 7+ messages in thread
From: dinguyen at altera.com @ 2013-09-17 16:32 UTC (permalink / raw)
  To: linux-arm-kernel

From: Dinh Nguyen <dinguyen@altera.com>

The smp_twd clock can be represented in DTS, so there is no need for
socfpga_init_clocks().

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
CC: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: linux-arm-kernel at lists.infradead.org
---
 arch/arm/mach-socfpga/socfpga.c |    1 -
 drivers/clk/socfpga/clk.c       |   11 -----------
 2 files changed, 12 deletions(-)

diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index bfce964..5314fc2 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -108,7 +108,6 @@ static void __init socfpga_cyclone5_init(void)
 	l2x0_of_init(0, ~0UL);
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 	of_clk_init(NULL);
-	socfpga_init_clocks();
 }
 
 static const char *altera_dt_match[] = {
diff --git a/drivers/clk/socfpga/clk.c b/drivers/clk/socfpga/clk.c
index c378489..24580b7 100644
--- a/drivers/clk/socfpga/clk.c
+++ b/drivers/clk/socfpga/clk.c
@@ -333,14 +333,3 @@ static void __init socfpga_gate_init(struct device_node *node)
 	socfpga_gate_clk_init(node, &gateclk_ops);
 }
 CLK_OF_DECLARE(socfpga_gate, "altr,socfpga-gate-clk", socfpga_gate_init);
-
-void __init socfpga_init_clocks(void)
-{
-	struct clk *clk;
-	int ret;
-
-	clk = clk_register_fixed_factor(NULL, "smp_twd", "mpuclk", 0, 1, 4);
-	ret = clk_register_clkdev(clk, NULL, "smp_twd");
-	if (ret)
-		pr_err("smp_twd alias not registered\n");
-}
-- 
1.7.9.5

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

* [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer
  2013-09-17 16:32 [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer dinguyen at altera.com
  2013-09-17 16:32 ` [PATCH 2/2] arm: socfpga: Remove socfpga_init_clocks dinguyen at altera.com
@ 2013-10-01 19:15 ` Dinh Nguyen
  2013-10-01 19:23 ` Rob Herring
  2 siblings, 0 replies; 7+ messages in thread
From: Dinh Nguyen @ 2013-10-01 19:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Just wondering if I can get any comments on this patchset?

Thanks,
Dinh

On Tue, 2013-09-17 at 11:32 -0500, Dinh Nguyen wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
> 
> Assign a clock for the twd-timer.
> 
> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> CC: linux-arm-kernel at lists.infradead.org
> ---
>  arch/arm/boot/dts/socfpga.dtsi |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
> index acd6c3a..e28df94 100644
> --- a/arch/arm/boot/dts/socfpga.dtsi
> +++ b/arch/arm/boot/dts/socfpga.dtsi
> @@ -480,11 +480,11 @@
>  			clock-names = "biu", "ciu";
>  		};
>  
> -		/* Local timer */
> -		timer at fffec600 {
> +		local-timer at fffec600 {
>  			compatible = "arm,cortex-a9-twd-timer";
>  			reg = <0xfffec600 0x100>;
>  			interrupts = <1 13 0xf04>;
> +			clocks = <&mpu_periph_clk>;
>  		};
>  
>  		timer0: timer0 at ffc08000 {

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

* [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer
  2013-09-17 16:32 [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer dinguyen at altera.com
  2013-09-17 16:32 ` [PATCH 2/2] arm: socfpga: Remove socfpga_init_clocks dinguyen at altera.com
  2013-10-01 19:15 ` [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer Dinh Nguyen
@ 2013-10-01 19:23 ` Rob Herring
  2013-10-01 19:35   ` Dinh Nguyen
  2 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2013-10-01 19:23 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/17/2013 11:32 AM, dinguyen at altera.com wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
> 
> Assign a clock for the twd-timer.
> 
> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> CC: linux-arm-kernel at lists.infradead.org
> ---
>  arch/arm/boot/dts/socfpga.dtsi |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
> index acd6c3a..e28df94 100644
> --- a/arch/arm/boot/dts/socfpga.dtsi
> +++ b/arch/arm/boot/dts/socfpga.dtsi
> @@ -480,11 +480,11 @@
>  			clock-names = "biu", "ciu";
>  		};
>  
> -		/* Local timer */
> -		timer at fffec600 {
> +		local-timer at fffec600 {

timer was the right name.

>  			compatible = "arm,cortex-a9-twd-timer";
>  			reg = <0xfffec600 0x100>;
>  			interrupts = <1 13 0xf04>;
> +			clocks = <&mpu_periph_clk>;

Otherwise, this looks fine and I wouldn't expect much input on a change
that doesn't add a new binding.

Acked-by: Rob Herring <rob.herring@calxeda.com>

Rob

>  		};
>  
>  		timer0: timer0 at ffc08000 {
> 

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

* [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer
  2013-10-01 19:23 ` Rob Herring
@ 2013-10-01 19:35   ` Dinh Nguyen
  2013-11-27 20:52     ` Mike Turquette
  0 siblings, 1 reply; 7+ messages in thread
From: Dinh Nguyen @ 2013-10-01 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 2013-10-01 at 14:23 -0500, Rob Herring wrote:
> On 09/17/2013 11:32 AM, dinguyen at altera.com wrote:
> > From: Dinh Nguyen <dinguyen@altera.com>
> > 
> > Assign a clock for the twd-timer.
> > 
> > Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> > Cc: Rob Herring <rob.herring@calxeda.com>
> > Cc: Pawel Moll <pawel.moll@arm.com>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Stephen Warren <swarren@wwwdotorg.org>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > CC: linux-arm-kernel at lists.infradead.org
> > ---
> >  arch/arm/boot/dts/socfpga.dtsi |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
> > index acd6c3a..e28df94 100644
> > --- a/arch/arm/boot/dts/socfpga.dtsi
> > +++ b/arch/arm/boot/dts/socfpga.dtsi
> > @@ -480,11 +480,11 @@
> >  			clock-names = "biu", "ciu";
> >  		};
> >  
> > -		/* Local timer */
> > -		timer at fffec600 {
> > +		local-timer at fffec600 {
> 
> timer was the right name.

I'll put it back...

> 
> >  			compatible = "arm,cortex-a9-twd-timer";
> >  			reg = <0xfffec600 0x100>;
> >  			interrupts = <1 13 0xf04>;
> > +			clocks = <&mpu_periph_clk>;
> 
> Otherwise, this looks fine and I wouldn't expect much input on a change
> that doesn't add a new binding.
> 
> Acked-by: Rob Herring <rob.herring@calxeda.com>

Thanks Rob!

Dinh
> 
> Rob
> 
> >  		};
> >  
> >  		timer0: timer0 at ffc08000 {
> > 
> 
> 

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

* [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer
  2013-10-01 19:35   ` Dinh Nguyen
@ 2013-11-27 20:52     ` Mike Turquette
  2013-12-02 17:10       ` Dinh Nguyen
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Turquette @ 2013-11-27 20:52 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Dinh Nguyen (2013-10-01 12:35:55)
> On Tue, 2013-10-01 at 14:23 -0500, Rob Herring wrote:
> > On 09/17/2013 11:32 AM, dinguyen at altera.com wrote:
> > > From: Dinh Nguyen <dinguyen@altera.com>
> > > 
> > > Assign a clock for the twd-timer.
> > > 
> > > Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> > > Cc: Rob Herring <rob.herring@calxeda.com>
> > > Cc: Pawel Moll <pawel.moll@arm.com>
> > > Cc: Mark Rutland <mark.rutland@arm.com>
> > > Cc: Stephen Warren <swarren@wwwdotorg.org>
> > > Cc: Ian Campbell <ian.campbell@citrix.com>
> > > CC: linux-arm-kernel at lists.infradead.org
> > > ---
> > >  arch/arm/boot/dts/socfpga.dtsi |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
> > > index acd6c3a..e28df94 100644
> > > --- a/arch/arm/boot/dts/socfpga.dtsi
> > > +++ b/arch/arm/boot/dts/socfpga.dtsi
> > > @@ -480,11 +480,11 @@
> > >                     clock-names = "biu", "ciu";
> > >             };
> > >  
> > > -           /* Local timer */
> > > -           timer at fffec600 {
> > > +           local-timer at fffec600 {
> > 
> > timer was the right name.
> 
> I'll put it back...
> 
> > 
> > >                     compatible = "arm,cortex-a9-twd-timer";
> > >                     reg = <0xfffec600 0x100>;
> > >                     interrupts = <1 13 0xf04>;
> > > +                   clocks = <&mpu_periph_clk>;
> > 
> > Otherwise, this looks fine and I wouldn't expect much input on a change
> > that doesn't add a new binding.
> > 
> > Acked-by: Rob Herring <rob.herring@calxeda.com>
> 
> Thanks Rob!

Looks good to me too. Can you respin it with the fix for 'timer' and
I'll take it in?

Thanks,
Mike

> 
> Dinh
> > 
> > Rob
> > 
> > >             };
> > >  
> > >             timer0: timer0 at ffc08000 {
> > > 
> > 
> > 
> 
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer
  2013-11-27 20:52     ` Mike Turquette
@ 2013-12-02 17:10       ` Dinh Nguyen
  0 siblings, 0 replies; 7+ messages in thread
From: Dinh Nguyen @ 2013-12-02 17:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 2013-11-27 at 12:52 -0800, Mike Turquette wrote:
> Quoting Dinh Nguyen (2013-10-01 12:35:55)
> > On Tue, 2013-10-01 at 14:23 -0500, Rob Herring wrote:
> > > On 09/17/2013 11:32 AM, dinguyen at altera.com wrote:
> > > > From: Dinh Nguyen <dinguyen@altera.com>
> > > > 
> > > > Assign a clock for the twd-timer.
> > > > 
> > > > Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> > > > Cc: Rob Herring <rob.herring@calxeda.com>
> > > > Cc: Pawel Moll <pawel.moll@arm.com>
> > > > Cc: Mark Rutland <mark.rutland@arm.com>
> > > > Cc: Stephen Warren <swarren@wwwdotorg.org>
> > > > Cc: Ian Campbell <ian.campbell@citrix.com>
> > > > CC: linux-arm-kernel at lists.infradead.org
> > > > ---
> > > >  arch/arm/boot/dts/socfpga.dtsi |    4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
> > > > index acd6c3a..e28df94 100644
> > > > --- a/arch/arm/boot/dts/socfpga.dtsi
> > > > +++ b/arch/arm/boot/dts/socfpga.dtsi
> > > > @@ -480,11 +480,11 @@
> > > >                     clock-names = "biu", "ciu";
> > > >             };
> > > >  
> > > > -           /* Local timer */
> > > > -           timer at fffec600 {
> > > > +           local-timer at fffec600 {
> > > 
> > > timer was the right name.
> > 
> > I'll put it back...
> > 
> > > 
> > > >                     compatible = "arm,cortex-a9-twd-timer";
> > > >                     reg = <0xfffec600 0x100>;
> > > >                     interrupts = <1 13 0xf04>;
> > > > +                   clocks = <&mpu_periph_clk>;
> > > 
> > > Otherwise, this looks fine and I wouldn't expect much input on a change
> > > that doesn't add a new binding.
> > > 
> > > Acked-by: Rob Herring <rob.herring@calxeda.com>
> > 
> > Thanks Rob!
> 
> Looks good to me too. Can you respin it with the fix for 'timer' and
> I'll take it in?

This already went in through the DTS bindings tree.

Thanks,
Dinh
> 
> Thanks,
> Mike
> 
> > 
> > Dinh
> > > 
> > > Rob
> > > 
> > > >             };
> > > >  
> > > >             timer0: timer0 at ffc08000 {
> > > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

end of thread, other threads:[~2013-12-02 17:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 16:32 [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer dinguyen at altera.com
2013-09-17 16:32 ` [PATCH 2/2] arm: socfpga: Remove socfpga_init_clocks dinguyen at altera.com
2013-10-01 19:15 ` [PATCH 1/2] arm: socfpga: Add clock for smp_twd timer Dinh Nguyen
2013-10-01 19:23 ` Rob Herring
2013-10-01 19:35   ` Dinh Nguyen
2013-11-27 20:52     ` Mike Turquette
2013-12-02 17:10       ` Dinh Nguyen

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