Lines Matching +full:switching +full:- +full:freq

1 // SPDX-License-Identifier: GPL-2.0
3 * R-Car Generation 2 support
22 { .compatible = "renesas,r8a7742-cpg-mssr", .data = "extal" },
23 { .compatible = "renesas,r8a7743-cpg-mssr", .data = "extal" },
24 { .compatible = "renesas,r8a7744-cpg-mssr", .data = "extal" },
25 { .compatible = "renesas,r8a7790-cpg-mssr", .data = "extal" },
26 { .compatible = "renesas,r8a7791-cpg-mssr", .data = "extal" },
27 { .compatible = "renesas,r8a7793-cpg-mssr", .data = "extal" },
35 u32 freq = 20000000; in get_extal_freq() local
40 return freq; in get_extal_freq()
42 if (match->data) in get_extal_freq()
43 idx = of_property_match_string(cpg, "clock-names", match->data); in get_extal_freq()
47 return freq; in get_extal_freq()
49 of_property_read_u32(extal, "clock-frequency", &freq); in get_extal_freq()
51 return freq; in get_extal_freq()
61 u32 freq; in rcar_gen2_timer_init() local
64 * If PSCI is available then most likely we are running on PSCI-enabled in rcar_gen2_timer_init()
65 * U-Boot which, we assume, has already taken care of resetting CNTVOFF in rcar_gen2_timer_init()
66 * and updating counter module before switching to non-secure mode in rcar_gen2_timer_init()
83 freq = 260000000 / 8; /* ZS / 8 */ in rcar_gen2_timer_init()
91 freq = get_extal_freq() / 2; in rcar_gen2_timer_init()
101 * entered the kernel in non-secure mode. in rcar_gen2_timer_init()
105 ioread32(base + CNTFID0) != freq) { in rcar_gen2_timer_init()
107 iowrite32(freq, base + CNTFID0); in rcar_gen2_timer_init()
108 asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq)); in rcar_gen2_timer_init()
130 DT_MACHINE_START(RCAR_GEN2_DT, "Generic R-Car Gen2 (Flattened Device Tree)")