linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/11] ARM: remove extra timer-sp control register clearing
Date: Thu, 21 Mar 2013 18:58:08 +0100	[thread overview]
Message-ID: <CACRpkdZLn=KjJisPTN2eHn64UuaZvpBDDhmeqQXF-TVS8VZ7pA@mail.gmail.com> (raw)
In-Reply-To: <1363820051-24428-3-git-send-email-robherring2@gmail.com>

On Wed, Mar 20, 2013 at 11:54 PM, Rob Herring <robherring2@gmail.com> wrote:

> From: Rob Herring <rob.herring@calxeda.com>
>
> The timer-sp initialization code clears the control register before
> initializing the timers, so every platform doing this is redundant.
>
> For unused timers, we should not care what state they are in.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
(...)
> diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
> index ea96144..4cb322d 100644
> --- a/arch/arm/mach-integrator/integrator_ap.c
> +++ b/arch/arm/mach-integrator/integrator_ap.c
> @@ -643,10 +643,6 @@ static void __init ap_timer_init(void)
>         clk_prepare_enable(clk);
>         rate = clk_get_rate(clk);
>
> -       writel(0, TIMER0_VA_BASE + TIMER_CTRL);
> -       writel(0, TIMER1_VA_BASE + TIMER_CTRL);
> -       writel(0, TIMER2_VA_BASE + TIMER_CTRL);
> -

As noted this is not an init function for timer-sp.c so please drop this
hunk of the patch. Maybe this zeroing is pointless but that would
be a separate patch that I can test.

> diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
> index 2b0db82..c68e7d8 100644
> --- a/arch/arm/mach-integrator/integrator_cp.c
> +++ b/arch/arm/mach-integrator/integrator_cp.c
> @@ -33,7 +33,6 @@
>  #include <mach/platform.h>
>  #include <asm/setup.h>
>  #include <asm/mach-types.h>
> -#include <asm/hardware/arm_timer.h>

What doe this change has to do with $SUBJECT?

>  #include <asm/hardware/icst.h>
>
>  #include <mach/cm.h>
> @@ -267,7 +266,6 @@ static void __init cp_of_timer_init(void)
>         base = of_iomap(node, 0);
>         if (WARN_ON(!base))
>                 return;
> -       writel(0, base + TIMER_CTRL);
>         sp804_clocksource_init(base, node->name);
>
>         err = of_property_read_string(of_aliases,
> @@ -279,7 +277,6 @@ static void __init cp_of_timer_init(void)
>         if (WARN_ON(!base))
>                 return;
>         irq = irq_of_parse_and_map(node, 0);
> -       writel(0, base + TIMER_CTRL);
>         sp804_clockevents_init(base, irq, node->name);
>  }
>
> @@ -510,10 +507,6 @@ static void __init intcp_init_irq(void)
>
>  static void __init cp_timer_init(void)
>  {
> -       writel(0, TIMER0_VA_BASE + TIMER_CTRL);
> -       writel(0, TIMER1_VA_BASE + TIMER_CTRL);
> -       writel(0, TIMER2_VA_BASE + TIMER_CTRL);
> -
>         sp804_clocksource_init(TIMER2_VA_BASE, "timer2");
>         sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1, "timer1");
>  }

The rest of the changes to integrator_cp.c looks OK...

Yours,
Linus Walleij

  reply	other threads:[~2013-03-21 17:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 22:54 [PATCH 00/11] sp804 and integrator timer CLKSRC_OF support Rob Herring
2013-03-20 22:54 ` [PATCH 01/11] OF: add empty of_device_is_available for !OF Rob Herring
2013-03-21 14:18   ` Mark Rutland
2013-03-21 14:26     ` Rob Herring
2013-03-20 22:54 ` [PATCH 02/11] ARM: remove extra timer-sp control register clearing Rob Herring
2013-03-21 17:58   ` Linus Walleij [this message]
2013-03-21 18:03     ` Rob Herring
2013-03-21 19:23   ` Russell King - ARM Linux
2013-03-22  2:36     ` Rob Herring
2013-03-20 22:54 ` [PATCH 03/11] ARM: timer-sp: convert to use CLKSRC_OF init Rob Herring
2013-03-21 18:02   ` Linus Walleij
2013-03-21 19:35   ` Russell King - ARM Linux
2013-03-22  2:31     ` Rob Herring
2013-03-22 11:49       ` Russell King - ARM Linux
2013-03-20 22:54 ` [PATCH 04/11] ARM: highbank: use OF init for sp804 timer Rob Herring
2013-03-20 22:54 ` [PATCH 05/11] ARM: vexpress: remove sp804 OF init Rob Herring
2013-03-20 22:54 ` [PATCH 06/11] ARM: dts: vexpress: disable CA9 core tile sp804 timer Rob Herring
2013-03-20 22:54 ` [PATCH 07/11] ARM: versatile: add versatile dtbs to dtbs target Rob Herring
2013-03-20 22:54 ` [PATCH 08/11] ARM: versatile: use OF init for sp804 timer Rob Herring
2013-03-20 22:54 ` [PATCH 09/11] ARM: integrator-cp: convert use CLKSRC_OF for timer init Rob Herring
2013-03-21 18:07   ` Linus Walleij
2013-03-20 22:54 ` [PATCH 10/11] ARM: move sp804 and integrator timers to drivers/clocksource Rob Herring
2013-03-21 18:15   ` Linus Walleij
2013-03-20 22:54 ` [PATCH 11/11] devtree: add binding documentation for sp804 Rob Herring
2013-03-21 19:36   ` Russell King - ARM Linux
2013-03-21 13:24 ` [PATCH 00/11] sp804 and integrator timer CLKSRC_OF support Arnd Bergmann
2013-03-21 14:06   ` Rob Herring

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='CACRpkdZLn=KjJisPTN2eHn64UuaZvpBDDhmeqQXF-TVS8VZ7pA@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --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).