#include <linux/clk.h>
#include <linux/clockchips.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqreturn.h>
#include <linux/sched_clock.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include "timer-of.h"
#define TIMER_IRQ_EN_REG …
#define TIMER_IRQ_EN(val) …
#define TIMER_IRQ_ST_REG …
#define TIMER_IRQ_CLEAR(val) …
#define TIMER_CTL_REG(val) …
#define TIMER_CTL_ENABLE …
#define TIMER_CTL_RELOAD …
#define TIMER_CTL_CLK_SRC(val) …
#define TIMER_CTL_CLK_SRC_OSC24M …
#define TIMER_CTL_CLK_PRES(val) …
#define TIMER_CTL_ONESHOT …
#define TIMER_INTVAL_REG(val) …
#define TIMER_CNTVAL_REG(val) …
#define TIMER_SYNC_TICKS …
static void sun4i_clkevt_sync(void __iomem *base)
{ … }
static void sun4i_clkevt_time_stop(void __iomem *base, u8 timer)
{ … }
static void sun4i_clkevt_time_setup(void __iomem *base, u8 timer,
unsigned long delay)
{ … }
static void sun4i_clkevt_time_start(void __iomem *base, u8 timer,
bool periodic)
{ … }
static int sun4i_clkevt_shutdown(struct clock_event_device *evt)
{ … }
static int sun4i_clkevt_set_oneshot(struct clock_event_device *evt)
{ … }
static int sun4i_clkevt_set_periodic(struct clock_event_device *evt)
{ … }
static int sun4i_clkevt_next_event(unsigned long evt,
struct clock_event_device *clkevt)
{ … }
static void sun4i_timer_clear_interrupt(void __iomem *base)
{ … }
static irqreturn_t sun4i_timer_interrupt(int irq, void *dev_id)
{ … }
static struct timer_of to = …;
static u64 notrace sun4i_timer_sched_read(void)
{ … }
static int __init sun4i_timer_init(struct device_node *node)
{ … }
TIMER_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
sun4i_timer_init);
TIMER_OF_DECLARE(sun8i_a23, "allwinner,sun8i-a23-timer",
sun4i_timer_init);
TIMER_OF_DECLARE(sun8i_v3s, "allwinner,sun8i-v3s-timer",
sun4i_timer_init);
TIMER_OF_DECLARE(suniv, "allwinner,suniv-f1c100s-timer",
sun4i_timer_init);