All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: integrator: deactivate timer0 on the Integrator/CP
@ 2013-10-07 13:19 Linus Walleij
  2013-10-07 17:51 ` Olof Johansson
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2013-10-07 13:19 UTC (permalink / raw)
  To: linux-arm-kernel

This fixes a long-standing Integrator/CP regression from
commit 870e2928cf3368ca9b06bc925d0027b0a56bcd8e
"ARM: integrator-cp: convert use CLKSRC_OF for timer init"

When this code was introduced, the both aliases pointing the
system to use timer1 as primary (clocksource) and timer2
as secondary (clockevent) was ignored, and the system would
simply use the first two timers found as clocksource and
clockevent.

However this made the system timeline accelerate by a
factor x25, as it turns out that the way the clocking
actually works (totally undocumented and found after some
trial-and-error) is that timer0 runs @ 25MHz and timer1
and timer2 runs @ 1MHz. Presumably this divider setting
is a boot-on default and configurable albeit the way to
configure it is not documented.

So as a quick fix to the problem, let's mark timer0 as
disabled, so the code will chose timer1 and timer2 as it
used to.

This also deletes the two aliases for the primary and
secondary timer as they have been superceded by the
auto-selection

Cc: stable at vger.kernel.org
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ARM SoC folks: can you please apply this directly for fixes
if noone complains? Thanks.
---
 arch/arm/boot/dts/integratorcp.dts | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/integratorcp.dts b/arch/arm/boot/dts/integratorcp.dts
index ff1aea0..72693a6 100644
--- a/arch/arm/boot/dts/integratorcp.dts
+++ b/arch/arm/boot/dts/integratorcp.dts
@@ -9,11 +9,6 @@
 	model = "ARM Integrator/CP";
 	compatible = "arm,integrator-cp";
 
-	aliases {
-		arm,timer-primary = &timer2;
-		arm,timer-secondary = &timer1;
-	};
-
 	chosen {
 		bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk";
 	};
@@ -24,14 +19,18 @@
 	};
 
 	timer0: timer at 13000000 {
+		/* TIMER0 runs @ 25MHz */
 		compatible = "arm,integrator-cp-timer";
+		status = "disabled";
 	};
 
 	timer1: timer at 13000100 {
+		/* TIMER1 runs @ 1MHz */
 		compatible = "arm,integrator-cp-timer";
 	};
 
 	timer2: timer at 13000200 {
+		/* TIMER2 runs @ 1MHz */
 		compatible = "arm,integrator-cp-timer";
 	};
 
-- 
1.8.3.1

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

* [PATCH] ARM: integrator: deactivate timer0 on the Integrator/CP
  2013-10-07 13:19 [PATCH] ARM: integrator: deactivate timer0 on the Integrator/CP Linus Walleij
@ 2013-10-07 17:51 ` Olof Johansson
  2013-10-09  8:42   ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Olof Johansson @ 2013-10-07 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 07, 2013 at 03:19:53PM +0200, Linus Walleij wrote:
> This fixes a long-standing Integrator/CP regression from
> commit 870e2928cf3368ca9b06bc925d0027b0a56bcd8e
> "ARM: integrator-cp: convert use CLKSRC_OF for timer init"
> 
> When this code was introduced, the both aliases pointing the
> system to use timer1 as primary (clocksource) and timer2
> as secondary (clockevent) was ignored, and the system would
> simply use the first two timers found as clocksource and
> clockevent.
> 
> However this made the system timeline accelerate by a
> factor x25, as it turns out that the way the clocking
> actually works (totally undocumented and found after some
> trial-and-error) is that timer0 runs @ 25MHz and timer1
> and timer2 runs @ 1MHz. Presumably this divider setting
> is a boot-on default and configurable albeit the way to
> configure it is not documented.
> 
> So as a quick fix to the problem, let's mark timer0 as
> disabled, so the code will chose timer1 and timer2 as it
> used to.
> 
> This also deletes the two aliases for the primary and
> secondary timer as they have been superceded by the
> auto-selection
> 
> Cc: stable at vger.kernel.org
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ARM SoC folks: can you please apply this directly for fixes
> if noone complains? Thanks.

Certainly, but I'll give them a day or two to complain. Prod me if I haven't
applied by Wednesday (and there has been no further discussion).


-Olof

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

* [PATCH] ARM: integrator: deactivate timer0 on the Integrator/CP
  2013-10-07 17:51 ` Olof Johansson
@ 2013-10-09  8:42   ` Linus Walleij
  2013-10-13 21:02     ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2013-10-09  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 7, 2013 at 7:51 PM, Olof Johansson <olof@lixom.net> wrote:
> On Mon, Oct 07, 2013 at 03:19:53PM +0200, Linus Walleij wrote:

>> This fixes a long-standing Integrator/CP regression from
>> commit 870e2928cf3368ca9b06bc925d0027b0a56bcd8e
>> "ARM: integrator-cp: convert use CLKSRC_OF for timer init"
(...)
>> ---
>> ARM SoC folks: can you please apply this directly for fixes
>> if noone complains? Thanks.
>
> Certainly, but I'll give them a day or two to complain. Prod me if I haven't
> applied by Wednesday (and there has been no further discussion).

Plonk!

Yours,
Linus Walleij

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

* [PATCH] ARM: integrator: deactivate timer0 on the Integrator/CP
  2013-10-09  8:42   ` Linus Walleij
@ 2013-10-13 21:02     ` Linus Walleij
  2013-10-13 21:07       ` Olof Johansson
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2013-10-13 21:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 9, 2013 at 10:42 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Oct 7, 2013 at 7:51 PM, Olof Johansson <olof@lixom.net> wrote:
>> On Mon, Oct 07, 2013 at 03:19:53PM +0200, Linus Walleij wrote:
>
>>> This fixes a long-standing Integrator/CP regression from
>>> commit 870e2928cf3368ca9b06bc925d0027b0a56bcd8e
>>> "ARM: integrator-cp: convert use CLKSRC_OF for timer init"
> (...)
>>> ---
>>> ARM SoC folks: can you please apply this directly for fixes
>>> if noone complains? Thanks.
>>
>> Certainly, but I'll give them a day or two to complain. Prod me if I haven't
>> applied by Wednesday (and there has been no further discussion).
>
> Plonk!

Bleep Bleep! Regression!

Yours,
Linus Walleij

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

* [PATCH] ARM: integrator: deactivate timer0 on the Integrator/CP
  2013-10-13 21:02     ` Linus Walleij
@ 2013-10-13 21:07       ` Olof Johansson
  0 siblings, 0 replies; 5+ messages in thread
From: Olof Johansson @ 2013-10-13 21:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Oct 13, 2013 at 2:02 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Wed, Oct 9, 2013 at 10:42 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Mon, Oct 7, 2013 at 7:51 PM, Olof Johansson <olof@lixom.net> wrote:
>>> On Mon, Oct 07, 2013 at 03:19:53PM +0200, Linus Walleij wrote:
>>
>>>> This fixes a long-standing Integrator/CP regression from
>>>> commit 870e2928cf3368ca9b06bc925d0027b0a56bcd8e
>>>> "ARM: integrator-cp: convert use CLKSRC_OF for timer init"
>> (...)
>>>> ---
>>>> ARM SoC folks: can you please apply this directly for fixes
>>>> if noone complains? Thanks.
>>>
>>> Certainly, but I'll give them a day or two to complain. Prod me if I haven't
>>> applied by Wednesday (and there has been no further discussion).
>>
>> Plonk!
>
> Bleep Bleep! Regression!

I was searching for the one patch that I couldn't remember about when
I sent the series today. This was it. Whoops.

I've applied this to fixes now, and it'll be part of the next pull
request sometime next week. Sorry for the delay.


-Olof

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

end of thread, other threads:[~2013-10-13 21:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-07 13:19 [PATCH] ARM: integrator: deactivate timer0 on the Integrator/CP Linus Walleij
2013-10-07 17:51 ` Olof Johansson
2013-10-09  8:42   ` Linus Walleij
2013-10-13 21:02     ` Linus Walleij
2013-10-13 21:07       ` Olof Johansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.