#include <linux/clk.h>
#include <linux/clockchips.h>
#include <linux/clocksource.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqreturn.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#define TIMER_IRQ_EN_REG …
#define TIMER_IRQ_EN(val) …
#define TIMER_IRQ_ST_REG …
#define TIMER_CTL_REG(val) …
#define TIMER_CTL_ENABLE …
#define TIMER_CTL_RELOAD …
#define TIMER_CTL_CLK_PRES(val) …
#define TIMER_CTL_ONESHOT …
#define TIMER_INTVAL_LO_REG(val) …
#define TIMER_INTVAL_HI_REG(val) …
#define TIMER_CNTVAL_LO_REG(val) …
#define TIMER_CNTVAL_HI_REG(val) …
#define TIMER_SYNC_TICKS …
struct sun5i_timer { … };
#define nb_to_sun5i_timer(x) …
#define clksrc_to_sun5i_timer(x) …
#define clkevt_to_sun5i_timer(x) …
static void sun5i_clkevt_sync(struct sun5i_timer *ce)
{ … }
static void sun5i_clkevt_time_stop(struct sun5i_timer *ce, u8 timer)
{ … }
static void sun5i_clkevt_time_setup(struct sun5i_timer *ce, u8 timer, u32 delay)
{ … }
static void sun5i_clkevt_time_start(struct sun5i_timer *ce, u8 timer, bool periodic)
{ … }
static int sun5i_clkevt_shutdown(struct clock_event_device *clkevt)
{ … }
static int sun5i_clkevt_set_oneshot(struct clock_event_device *clkevt)
{ … }
static int sun5i_clkevt_set_periodic(struct clock_event_device *clkevt)
{ … }
static int sun5i_clkevt_next_event(unsigned long evt,
struct clock_event_device *clkevt)
{ … }
static irqreturn_t sun5i_timer_interrupt(int irq, void *dev_id)
{ … }
static u64 sun5i_clksrc_read(struct clocksource *clksrc)
{ … }
static int sun5i_rate_cb(struct notifier_block *nb,
unsigned long event, void *data)
{ … }
static int sun5i_setup_clocksource(struct platform_device *pdev,
unsigned long rate)
{ … }
static int sun5i_setup_clockevent(struct platform_device *pdev,
unsigned long rate, int irq)
{ … }
static int sun5i_timer_probe(struct platform_device *pdev)
{ … }
static void sun5i_timer_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id sun5i_timer_of_match[] = …;
MODULE_DEVICE_TABLE(of, sun5i_timer_of_match);
static struct platform_driver sun5i_timer_driver = …;
module_platform_driver(…) …;