Lines Matching +full:mmp +full:- +full:timer
1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/arm/mach-mmp/time.c
10 * 2008-04-11: Jason Chagas <Jason.chagas@marvell.com>
11 * 2008-10-08: Bin Yang <bin.yang@marvell.com>
13 * The timers module actually includes three timers, each timer with up to
14 * three match comparators. Timer #0 is used here in free-running mode as
32 #include "regs-timers.h"
33 #include <linux/soc/mmp/cputype.h>
41 * Read the timer through the CVWR register. Delay is required after requesting
52 while (delay--) in timer_read()
73 * Disable timer 0. in timer_interrupt()
77 c->event_handler(c); in timer_interrupt()
90 * Disable timer 0. in timer_set_next_event()
95 * Clear and enable timer match 0 interrupt. in timer_set_next_event()
101 * Setup new clockevent timer value. in timer_set_next_event()
103 __raw_writel(delta - 1, mmp_timer_base + TMR_TN_MM(0, 0)); in timer_set_next_event()
106 * Enable timer 0. in timer_set_next_event()
160 /* set timer 0 to periodic mode, and timer 1 to free-running mode */ in timer_config()
167 __raw_writel(0x0, mmp_timer_base + TMR_PLCR(1)); /* free-running */ in timer_config()
171 /* enable timer 1 counter */ in timer_config()
184 "timer", &ckevt)) in mmp_timer_init()
185 pr_err("Failed to request irq %d (timer)\n", irq); in mmp_timer_init()
211 return -EINVAL; in mmp_dt_init_timer()
215 return -ENOMEM; in mmp_dt_init_timer()
221 TIMER_OF_DECLARE(mmp_timer, "mrvl,mmp-timer", mmp_dt_init_timer);