summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/setup-rcar-gen2.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/setup-rcar-gen2.c')
-rw-r--r--arch/arm/mach-shmobile/setup-rcar-gen2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 3cd34a42e39b..514558905919 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -56,6 +56,10 @@ static unsigned int __init get_extal_freq(void)
static void __init rcar_gen2_timer_init(void)
{
+ static const char *const fixed_freq_socs[] __initconst = {
+ "renesas,r8a7745", "renesas,r8a77470", "renesas,r8a7792",
+ "renesas,r8a7794", NULL
+ };
bool need_update = true;
void __iomem *base;
u32 freq;
@@ -76,10 +80,7 @@ static void __init rcar_gen2_timer_init(void)
secure_cntvoff_init();
- if (of_machine_is_compatible("renesas,r8a7745") ||
- of_machine_is_compatible("renesas,r8a77470") ||
- of_machine_is_compatible("renesas,r8a7792") ||
- of_machine_is_compatible("renesas,r8a7794")) {
+ if (of_machine_compatible_match(fixed_freq_socs)) {
freq = 260000000 / 8; /* ZS / 8 */
} else {
/* At Linux boot time the r8a7790 arch timer comes up