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"
95 * contention between GPU and A7 may results a few cycles delay in tpm_set_next_event()
99 return (int)(next - now) <= 0 ? -ETIME : 0; in tpm_set_next_event()
122 evt->event_handler(evt); in tpm_timer_interrupt()
159 "imx-tpm", in tpm_clocksource_init()
171 GENMASK(counter_width - 1, in tpm_clockevent_init()
177 struct clk *ipg; in tpm_timer_init()
182 pr_err("tpm: failed to get ipg clk\n"); in tpm_timer_init()
183 return -ENODEV; in tpm_timer_init()
185 /* enable clk before accessing registers */ in tpm_timer_init()
201 /* use rating 200 for 32-bit counter and 150 for 16-bit counter */ in tpm_timer_init()
222 * div 8 for 32-bit counter and div 128 for 16-bit counter in tpm_timer_init()
230 writel(GENMASK(counter_width - 1, 0), timer_base + TPM_MOD); in tpm_timer_init()
236 TIMER_OF_DECLARE(imx7ulp, "fsl,imx7ulp-tpm", tpm_timer_init);