ARM: shmobile: rcar-gen2: Correct arch timer frequency on R-Car V2H
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 13 Jun 2016 10:31:12 +0000 (12:31 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 29 Jun 2016 12:42:03 +0000 (14:42 +0200)
According to the datasheet, the frequency of the ARM architecture timer
on R-Car V2H depends on the frequency of the ZS clock, just like on
R-Car E2.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/setup-rcar-gen2.c

index ea092d5..afb9fdc 100644 (file)
@@ -76,7 +76,8 @@ void __init rcar_gen2_timer_init(void)
        void __iomem *base;
        u32 freq;
 
-       if (of_machine_is_compatible("renesas,r8a7794")) {
+       if (of_machine_is_compatible("renesas,r8a7792") ||
+           of_machine_is_compatible("renesas,r8a7794")) {
                freq = 260000000 / 8;   /* ZS / 8 */
                /* CNTVOFF has to be initialized either from non-secure
                 * Hypervisor mode or secure Monitor mode with SCR.NS==1.