Lines Matching +full:clk +full:- +full:delay +full:- +full:cycles
1 // SPDX-License-Identifier: GPL-2.0+
6 #include <linux/clk.h>
9 #include <linux/delay.h>
13 #include "timer-of.h"
103 * contention between GPU and A7 may results a few cycles delay in tpm_set_next_event()
107 return (now - prev) >= delta ? -ETIME : 0; in tpm_set_next_event()
130 evt->event_handler(evt); in tpm_timer_interrupt()
167 "imx-tpm", in tpm_clocksource_init()
179 GENMASK(counter_width - 1, in tpm_clockevent_init()
185 struct clk *ipg; in tpm_timer_init()
190 pr_err("tpm: failed to get ipg clk\n"); in tpm_timer_init()
191 return -ENODEV; in tpm_timer_init()
193 /* enable clk before accessing registers */ in tpm_timer_init()
209 /* use rating 200 for 32-bit counter and 150 for 16-bit counter */ in tpm_timer_init()
230 * div 8 for 32-bit counter and div 128 for 16-bit counter in tpm_timer_init()
238 writel(GENMASK(counter_width - 1, 0), timer_base + TPM_MOD); in tpm_timer_init()
244 TIMER_OF_DECLARE(imx7ulp, "fsl,imx7ulp-tpm", tpm_timer_init);