Lines Matching refs:timer
25 struct rk_timer *timer; member
28 static inline int64_t rockchip_timer_get_curr_value(struct rk_timer *timer) in rockchip_timer_get_curr_value() argument
33 timebase_l = readl(&timer->timer_curr_value0); in rockchip_timer_get_curr_value()
34 timebase_h = readl(&timer->timer_curr_value1); in rockchip_timer_get_curr_value()
52 rate = timer_get_rate(gd->timer); in timer_get_boot_us()
53 timer_get_count(gd->timer, &ticks); in timer_get_boot_us()
58 struct rk_timer *timer = NULL; in timer_get_boot_us() local
70 timer = (struct rk_timer *)ofnode_get_addr(node); in timer_get_boot_us()
73 ticks = ~0uLL - rockchip_timer_get_curr_value(timer); in timer_get_boot_us()
91 uint64_t cntr = rockchip_timer_get_curr_value(priv->timer); in rockchip_timer_get_count()
103 priv->timer = dev_read_addr_ptr(dev); in rockchip_clk_ofdata_to_platdata()
104 if (!priv->timer) in rockchip_clk_ofdata_to_platdata()
119 if ((readl(&priv->timer->timer_ctrl_reg) & 1) == 1 && in rockchip_timer_start()
120 (readl(&priv->timer->timer_load_count0) == reload_val_l) && in rockchip_timer_start()
121 (readl(&priv->timer->timer_load_count1) == reload_val_h)) in rockchip_timer_start()
125 writel(0, &priv->timer->timer_ctrl_reg); in rockchip_timer_start()
127 writel(reload_val_l, &priv->timer->timer_load_count0); in rockchip_timer_start()
128 writel(reload_val_h, &priv->timer->timer_load_count1); in rockchip_timer_start()
130 writel(1, &priv->timer->timer_ctrl_reg); in rockchip_timer_start()
142 priv->timer = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]); in rockchip_timer_probe()