[PATCH] ARM: rcar-gen2: Do not attempt to re-setup timer if running correctly
Ben Dooks
ben.dooks at codethink.co.uk
Wed Dec 11 12:15:51 EST 2013
On 11/12/13 17:14, Sergei Shtylyov wrote:
> Hello.
>
> On 11-12-2013 13:25, 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 at codethink.co.uk>
>> Reviewed-by: Ian Molton <ian.molton at 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.
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
More information about the linux-arm-kernel
mailing list