Lines Matching +full:sysctr +full:- +full:timer
1 // SPDX-License-Identifier: GPL-2.0+
3 // Copyright 2017-2019 NXP
9 #include "timer-of.h"
36 struct sysctr_private *priv = to->private_data; in sysctr_timer_enable()
39 writel(enable ? priv->cmpcr | SYS_CTR_EN : priv->cmpcr, base + CMPCR); in sysctr_timer_enable()
55 struct sysctr_private *priv = to->private_data; in sysctr_read_counter()
60 cnt_hi = readl_relaxed(base + priv->hi_off); in sysctr_read_counter()
61 cnt_lo = readl_relaxed(base + priv->lo_off); in sysctr_read_counter()
62 tmp_hi = readl_relaxed(base + priv->hi_off); in sysctr_read_counter()
111 evt->event_handler(evt); in sysctr_timer_interrupt()
119 .name = "i.MX system counter timer",
144 return -ENOMEM; in __sysctr_timer_init()
152 if (!of_property_read_bool(np, "nxp,no-divider")) { in __sysctr_timer_init()
161 priv->cmpcr = readl(base + CMPCR) & ~SYS_CTR_EN; in __sysctr_timer_init()
176 priv->lo_off = CNTCV_LO; in sysctr_timer_init()
177 priv->hi_off = CNTCV_HI; in sysctr_timer_init()
196 priv->lo_off = CNTCV_LO_IMX95; in sysctr_timer_imx95_init()
197 priv->hi_off = CNTCV_HI_IMX95; in sysctr_timer_imx95_init()
206 TIMER_OF_DECLARE(sysctr_timer, "nxp,sysctr-timer", sysctr_timer_init);
207 TIMER_OF_DECLARE(sysctr_timer_imx95, "nxp,imx95-sysctr-timer", sysctr_timer_imx95_init);