linux/drivers/clocksource/timer-gxp.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2022 Hewlett-Packard Enterprise Development Company, L.P. */

#include <linux/clk.h>
#include <linux/clockchips.h>
#include <linux/clocksource.h>
#include <linux/interrupt.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/sched_clock.h>

#define TIMER0_FREQ
#define GXP_TIMER_CNT_OFS
#define GXP_TIMESTAMP_OFS
#define GXP_TIMER_CTRL_OFS

/* TCS Stands for Timer Control/Status: these are masks to be used in */
/* the Timer Count Registers */
#define MASK_TCS_ENABLE
#define MASK_TCS_PERIOD
#define MASK_TCS_RELOAD
#define MASK_TCS_TC

struct gxp_timer {};

static struct gxp_timer *gxp_timer;

static void __iomem *system_clock __ro_after_init;

static inline struct gxp_timer *to_gxp_timer(struct clock_event_device *evt_dev)
{}

static u64 notrace gxp_sched_read(void)
{}

static int gxp_time_set_next_event(unsigned long event, struct clock_event_device *evt_dev)
{}

static irqreturn_t gxp_timer_interrupt(int irq, void *dev_id)
{}

static int __init gxp_timer_init(struct device_node *node)
{}

/*
 * This probe gets called after the timer is already up and running. This will create
 * the watchdog device as a child since the registers are shared.
 */

static int gxp_timer_probe(struct platform_device *pdev)
{}

static const struct of_device_id gxp_timer_of_match[] =;

static struct platform_driver gxp_timer_driver =;

builtin_platform_driver();

TIMER_OF_DECLARE(gxp, "hpe,gxp-timer", gxp_timer_init);