#include <linux/clockchips.h>
#include <linux/interrupt.h>
#include <linux/sizes.h>
#include "timer-of.h"
#define PWM_CNTR …
#define PWM_HRC …
#define PWM_LRC …
#define PWM_CTRL …
#define INT_LRC_EN …
#define INT_HRC_EN …
#define CNTR_RST …
#define INT_SR …
#define INT_EN …
#define PWM_SINGLE …
#define PWM_OE …
#define CNT_EN …
#define CNTR_WIDTH …
static DEFINE_RAW_SPINLOCK(ls1x_timer_lock);
struct ls1x_clocksource { … };
static inline struct ls1x_clocksource *to_ls1x_clksrc(struct clocksource *c)
{ … }
static inline void ls1x_pwmtimer_set_period(unsigned int period,
struct timer_of *to)
{ … }
static inline void ls1x_pwmtimer_clear(struct timer_of *to)
{ … }
static inline void ls1x_pwmtimer_start(struct timer_of *to)
{ … }
static inline void ls1x_pwmtimer_stop(struct timer_of *to)
{ … }
static inline void ls1x_pwmtimer_irq_ack(struct timer_of *to)
{ … }
static irqreturn_t ls1x_clockevent_isr(int irq, void *dev_id)
{ … }
static int ls1x_clockevent_set_state_periodic(struct clock_event_device *clkevt)
{ … }
static int ls1x_clockevent_tick_resume(struct clock_event_device *clkevt)
{ … }
static int ls1x_clockevent_set_state_shutdown(struct clock_event_device *clkevt)
{ … }
static int ls1x_clockevent_set_next(unsigned long evt,
struct clock_event_device *clkevt)
{ … }
static struct timer_of ls1x_to = …;
static u64 ls1x_clocksource_read(struct clocksource *cs)
{ … }
static struct ls1x_clocksource ls1x_clocksource = …;
static int __init ls1x_pwm_clocksource_init(struct device_node *np)
{ … }
TIMER_OF_DECLARE(ls1x_pwm_clocksource, "loongson,ls1b-pwmtimer",
ls1x_pwm_clocksource_init);