#define pr_fmt(fmt) …
#include <linux/clk.h>
#include <linux/clocksource.h>
#include <linux/clockchips.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/mfd/syscon.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/sched_clock.h>
#include <linux/time.h>
#define CR_TIMER_CTRL_CFG …
#define TIMER_ME_GLOBAL …
#define CR_TIMER_REV …
#define TIMER_CFG …
#define TIMER_ME_LOCAL …
#define TIMER_RELOAD_VALUE …
#define TIMER_CURRENT_VALUE …
#define TIMER_CURRENT_OVERFLOW_VALUE …
#define TIMER_IRQ_STATUS …
#define TIMER_IRQ_CLEAR …
#define TIMER_IRQ_MASK …
#define PERIP_TIMER_CONTROL …
#define RELOAD_VALUE …
struct pistachio_clocksource { … };
static struct pistachio_clocksource pcs_gpt;
#define to_pistachio_clocksource(cs) …
static inline u32 gpt_readl(void __iomem *base, u32 offset, u32 gpt_id)
{ … }
static inline void gpt_writel(void __iomem *base, u32 value, u32 offset,
u32 gpt_id)
{ … }
static u64 notrace
pistachio_clocksource_read_cycles(struct clocksource *cs)
{ … }
static u64 notrace pistachio_read_sched_clock(void)
{ … }
static void pistachio_clksrc_set_mode(struct clocksource *cs, int timeridx,
int enable)
{ … }
static void pistachio_clksrc_enable(struct clocksource *cs, int timeridx)
{ … }
static void pistachio_clksrc_disable(struct clocksource *cs, int timeridx)
{ … }
static int pistachio_clocksource_enable(struct clocksource *cs)
{ … }
static void pistachio_clocksource_disable(struct clocksource *cs)
{ … }
static struct pistachio_clocksource pcs_gpt = …;
static int __init pistachio_clksrc_of_init(struct device_node *node)
{ … }
TIMER_OF_DECLARE(pistachio_gptimer, "img,pistachio-gptimer",
pistachio_clksrc_of_init);