linux/drivers/clocksource/timer-rda.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * RDA8810PL SoC timer driver
 *
 * Copyright RDA Microelectronics Company Limited
 * Copyright (c) 2017 Andreas Färber
 * Copyright (c) 2018 Manivannan Sadhasivam
 *
 * RDA8810PL has two independent timers: OSTIMER (56 bit) and HWTIMER (64 bit).
 * Each timer provides optional interrupt support. In this driver, OSTIMER is
 * used for clockevents and HWTIMER is used for clocksource.
 */

#include <linux/init.h>
#include <linux/interrupt.h>

#include "timer-of.h"

#define RDA_OSTIMER_LOADVAL_L
#define RDA_OSTIMER_CTRL
#define RDA_HWTIMER_LOCKVAL_L
#define RDA_HWTIMER_LOCKVAL_H
#define RDA_TIMER_IRQ_MASK_SET
#define RDA_TIMER_IRQ_MASK_CLR
#define RDA_TIMER_IRQ_CLR

#define RDA_OSTIMER_CTRL_ENABLE
#define RDA_OSTIMER_CTRL_REPEAT
#define RDA_OSTIMER_CTRL_LOAD

#define RDA_TIMER_IRQ_MASK_OSTIMER

#define RDA_TIMER_IRQ_CLR_OSTIMER

static int rda_ostimer_start(void __iomem *base, bool periodic, u64 cycles)
{}

static int rda_ostimer_stop(void __iomem *base)
{}

static int rda_ostimer_set_state_shutdown(struct clock_event_device *evt)
{}

static int rda_ostimer_set_state_oneshot(struct clock_event_device *evt)
{}

static int rda_ostimer_set_state_periodic(struct clock_event_device *evt)
{}

static int rda_ostimer_tick_resume(struct clock_event_device *evt)
{}

static int rda_ostimer_set_next_event(unsigned long evt,
				      struct clock_event_device *ev)
{}

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

static struct timer_of rda_ostimer_of =;

static u64 rda_hwtimer_read(struct clocksource *cs)
{}

static struct clocksource rda_hwtimer_clocksource =;

static int __init rda_timer_init(struct device_node *np)
{}

TIMER_OF_DECLARE(rda8810pl, "rda,8810pl-timer", rda_timer_init);