Lines Matching +full:fixed +full:- +full:mmio +full:- +full:clock
1 // SPDX-License-Identifier: GPL-2.0
8 * Gregory CLEMENT <gregory.clement@free-electrons.com>
9 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11 * Timer 0 is used as free-running clocksource, while timer 1 is
14 * ---
19 * * Armada 370 has no 25 MHz fixed timer.
21 * * Armada XP cannot work properly without such 25 MHz fixed timer as
25 * See Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt
68 /* Global timers are connected to the coherency fabric clock, and the
74 * SoC-specific data.
142 writel(ticks_per_jiffy - 1, local_base + TIMER0_RELOAD_OFF); in armada_370_xp_clkevt_set_periodic()
143 writel(ticks_per_jiffy - 1, local_base + TIMER0_VAL_OFF); in armada_370_xp_clkevt_set_periodic()
162 evt->event_handler(evt); in armada_370_xp_timer_interrupt()
168 * Setup the local clock events for a CPU.
181 evt->name = "armada_370_xp_per_cpu_tick"; in armada_370_xp_timer_starting_cpu()
182 evt->features = CLOCK_EVT_FEAT_ONESHOT | in armada_370_xp_timer_starting_cpu()
184 evt->shift = 32; in armada_370_xp_timer_starting_cpu()
185 evt->rating = 300; in armada_370_xp_timer_starting_cpu()
186 evt->set_next_event = armada_370_xp_clkevt_next_event; in armada_370_xp_timer_starting_cpu()
187 evt->set_state_shutdown = armada_370_xp_clkevt_shutdown; in armada_370_xp_timer_starting_cpu()
188 evt->set_state_periodic = armada_370_xp_clkevt_set_periodic; in armada_370_xp_timer_starting_cpu()
189 evt->set_state_oneshot = armada_370_xp_clkevt_shutdown; in armada_370_xp_timer_starting_cpu()
190 evt->tick_resume = armada_370_xp_clkevt_shutdown; in armada_370_xp_timer_starting_cpu()
191 evt->irq = armada_370_xp_clkevt_irq; in armada_370_xp_timer_starting_cpu()
192 evt->cpumask = cpumask_of(cpu); in armada_370_xp_timer_starting_cpu()
195 enable_percpu_irq(evt->irq, 0); in armada_370_xp_timer_starting_cpu()
204 evt->set_state_shutdown(evt); in armada_370_xp_timer_dying_cpu()
205 disable_percpu_irq(evt->irq); in armada_370_xp_timer_dying_cpu()
248 return -ENXIO; in armada_370_xp_timer_common_init()
254 return -ENXIO; in armada_370_xp_timer_common_init()
276 * Setup free-running clocksource timer (interrupts in armada_370_xp_timer_common_init()
298 pr_err("Failed to initialize clocksource mmio\n"); in armada_370_xp_timer_common_init()
304 return -ENOMEM; in armada_370_xp_timer_common_init()
307 * Setup clockevent timer (interrupt-driven). in armada_370_xp_timer_common_init()
335 struct clk *clk = of_clk_get_by_name(np, "fixed"); in armada_xp_timer_init()
339 pr_err("Failed to get clock\n"); in armada_xp_timer_init()
351 TIMER_OF_DECLARE(armada_xp, "marvell,armada-xp-timer",
359 clk = of_clk_get_by_name(np, "fixed"); in armada_375_timer_init()
373 /* Must have at least a clock */ in armada_375_timer_init()
375 pr_err("Failed to get clock\n"); in armada_375_timer_init()
389 TIMER_OF_DECLARE(armada_375, "marvell,armada-375-timer",
399 pr_err("Failed to get clock\n"); in armada_370_timer_init()
412 TIMER_OF_DECLARE(armada_370, "marvell,armada-370-timer",