#include <linux/init.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/clockchips.h>
#include <linux/types.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#define KONA_GPTIMER_STCS_OFFSET …
#define KONA_GPTIMER_STCLO_OFFSET …
#define KONA_GPTIMER_STCHI_OFFSET …
#define KONA_GPTIMER_STCM0_OFFSET …
#define KONA_GPTIMER_STCS_TIMER_MATCH_SHIFT …
#define KONA_GPTIMER_STCS_COMPARE_ENABLE_SHIFT …
struct kona_bcm_timers { … };
static struct kona_bcm_timers timers;
static u32 arch_timer_rate;
static void kona_timer_disable_and_clear(void __iomem *base)
{ … }
static int
kona_timer_get_counter(void __iomem *timer_base, uint32_t *msw, uint32_t *lsw)
{ … }
static int kona_timer_set_next_event(unsigned long clc,
struct clock_event_device *unused)
{ … }
static int kona_timer_shutdown(struct clock_event_device *evt)
{ … }
static struct clock_event_device kona_clockevent_timer = …;
static void __init kona_timer_clockevents_init(void)
{ … }
static irqreturn_t kona_timer_interrupt(int irq, void *dev_id)
{ … }
static int __init kona_timer_init(struct device_node *node)
{ … }
TIMER_OF_DECLARE(brcm_kona, "brcm,kona-timer", kona_timer_init);
TIMER_OF_DECLARE(bcm_kona, "bcm,kona-timer", kona_timer_init);