linux/drivers/clocksource/timer-pistachio.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Pistachio clocksource based on general-purpose timers
 *
 * Copyright (C) 2015 Imagination Technologies
 */

#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>

/* Top level reg */
#define CR_TIMER_CTRL_CFG
#define TIMER_ME_GLOBAL
#define CR_TIMER_REV

/* Timer specific registers */
#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

/* Timer specific configuration Values */
#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)
{}

/* Desirable clock source for pistachio platform */
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);