From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: rcar-gen2: Do not attempt to re-setup timer if running correctly
Date: Wed, 11 Dec 2013 17:20:02 +0000 [thread overview]
Message-ID: <52A89EC2.4040203@cogentembedded.com> (raw)
In-Reply-To: <52A89DC7.4070909@codethink.co.uk>
Hello.
On 11-12-2013 21:15, Ben Dooks wrote:
>>> If the system has been started in non-secure mode, then the ARM generic
>>> timer is not configurable during the kernel initialisation. Currently
>>> the only thing we can check for is if the timer has been correctly
>>> configured during the boot process.
>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>>> ---
>>> arch/arm/mach-shmobile/setup-rcar-gen2.c | 18 +++++++++++++-----
>>> 1 file changed, 13 insertions(+), 5 deletions(-)
>>> diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c
>>> b/arch/arm/mach-shmobile/setup-rcar-gen2.c
>>> index 5734c24..6b7b7f1 100644
>>> --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
>>> +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
>>> @@ -78,12 +78,20 @@ void __init rcar_gen2_timer_init(void)
>>> /* Remap "armgcnt address map" space */
>>> base = ioremap(0xe6080000, PAGE_SIZE);
>>>
>>> - /* Update registers with correct frequency */
>>> - iowrite32(freq, base + CNTFID0);
>>> - asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq));
>>> + /* Update the timer if it is either not running, or is not at the
>>> + * right frequency. The timer is only configurable in secure mode
>>> + * so this avoids an abort if the loader started the timer and
>>> + * started the kernel in non-secure mode. */
>> You said you've fixed the comment style but you haven't as I see.
> I also said I reposted the previous patch by accident this morning
> and posted the corrected one after it.
Sorry, I've only read that after sending my comment. I thought that was an
intended repost with a slightly corrected subject.
WBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: sergei.shtylyov@cogentembedded.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: rcar-gen2: Do not attempt to re-setup timer if running correctly
Date: Wed, 11 Dec 2013 21:20:02 +0400 [thread overview]
Message-ID: <52A89EC2.4040203@cogentembedded.com> (raw)
In-Reply-To: <52A89DC7.4070909@codethink.co.uk>
Hello.
On 11-12-2013 21:15, Ben Dooks wrote:
>>> If the system has been started in non-secure mode, then the ARM generic
>>> timer is not configurable during the kernel initialisation. Currently
>>> the only thing we can check for is if the timer has been correctly
>>> configured during the boot process.
>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>>> ---
>>> arch/arm/mach-shmobile/setup-rcar-gen2.c | 18 +++++++++++++-----
>>> 1 file changed, 13 insertions(+), 5 deletions(-)
>>> diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c
>>> b/arch/arm/mach-shmobile/setup-rcar-gen2.c
>>> index 5734c24..6b7b7f1 100644
>>> --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
>>> +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
>>> @@ -78,12 +78,20 @@ void __init rcar_gen2_timer_init(void)
>>> /* Remap "armgcnt address map" space */
>>> base = ioremap(0xe6080000, PAGE_SIZE);
>>>
>>> - /* Update registers with correct frequency */
>>> - iowrite32(freq, base + CNTFID0);
>>> - asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq));
>>> + /* Update the timer if it is either not running, or is not at the
>>> + * right frequency. The timer is only configurable in secure mode
>>> + * so this avoids an abort if the loader started the timer and
>>> + * started the kernel in non-secure mode. */
>> You said you've fixed the comment style but you haven't as I see.
> I also said I reposted the previous patch by accident this morning
> and posted the corrected one after it.
Sorry, I've only read that after sending my comment. I thought that was an
intended repost with a slightly corrected subject.
WBR, Sergei
next prev parent reply other threads:[~2013-12-11 17:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 9:25 [PATCH] ARM: rcar-gen2: Do not attempt to re-setup timer if running correctly Ben Dooks
2013-12-11 9:25 ` Ben Dooks
2013-12-11 9:36 ` Magnus Damm
2013-12-11 9:36 ` Magnus Damm
2013-12-11 10:06 ` Ben Dooks
2013-12-11 10:06 ` Ben Dooks
2013-12-11 17:14 ` Sergei Shtylyov
2013-12-11 17:14 ` Sergei Shtylyov
2013-12-11 17:15 ` Ben Dooks
2013-12-11 17:15 ` Ben Dooks
2013-12-11 17:20 ` Sergei Shtylyov [this message]
2013-12-11 17:20 ` Sergei Shtylyov
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=52A89EC2.4040203@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--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 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.