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 "addr-map.h"
33 #include "regs-timers.h"
34 #include "regs-apbc.h"
36 #include <linux/soc/mmp/cputype.h>
46 * FIXME: the timer needs some delay to stablize the counter capture
54 while (delay--) in timer_read()
75 * Disable timer 0. in timer_interrupt()
79 c->event_handler(c); in timer_interrupt()
92 * Disable timer 0. in timer_set_next_event()
97 * Clear and enable timer match 0 interrupt. in timer_set_next_event()
103 * Setup new clockevent timer value. in timer_set_next_event()
105 __raw_writel(delta - 1, mmp_timer_base + TMR_TN_MM(0, 0)); in timer_set_next_event()
108 * Enable timer 0. in timer_set_next_event()
162 /* set timer 0 to periodic mode, and timer 1 to free-running mode */ in timer_config()
169 __raw_writel(0x0, mmp_timer_base + TMR_PLCR(1)); /* free-running */ in timer_config()
173 /* enable timer 1 counter */ in timer_config()
186 "timer", &ckevt)) in mmp_timer_init()
187 pr_err("Failed to request irq %d (timer)\n", irq); in mmp_timer_init()
213 return -EINVAL; in mmp_dt_init_timer()
217 return -ENOMEM; in mmp_dt_init_timer()
223 TIMER_OF_DECLARE(mmp_timer, "mrvl,mmp-timer", mmp_dt_init_timer);