#include <linux/clk.h>
#include <linux/clockchips.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/sched_clock.h>
#include <linux/slab.h>
#include "timer-of.h"
static void __iomem *system_clock;
#define OSTM_CMP …
#define OSTM_CNT …
#define OSTM_TE …
#define OSTM_TS …
#define OSTM_TT …
#define OSTM_CTL …
#define TE …
#define TS …
#define TT …
#define CTL_PERIODIC …
#define CTL_ONESHOT …
#define CTL_FREERUN …
static void ostm_timer_stop(struct timer_of *to)
{ … }
static int __init ostm_init_clksrc(struct timer_of *to)
{ … }
static u64 notrace ostm_read_sched_clock(void)
{ … }
static void __init ostm_init_sched_clock(struct timer_of *to)
{ … }
static int ostm_clock_event_next(unsigned long delta,
struct clock_event_device *ced)
{ … }
static int ostm_shutdown(struct clock_event_device *ced)
{ … }
static int ostm_set_periodic(struct clock_event_device *ced)
{ … }
static int ostm_set_oneshot(struct clock_event_device *ced)
{ … }
static irqreturn_t ostm_timer_interrupt(int irq, void *dev_id)
{ … }
static int __init ostm_init_clkevt(struct timer_of *to)
{ … }
static int __init ostm_init(struct device_node *np)
{ … }
TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init);
#if defined(CONFIG_ARCH_RZG2L) || defined(CONFIG_ARCH_R9A09G057)
static int __init ostm_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
return ostm_init(dev->of_node);
}
static const struct of_device_id ostm_of_table[] = {
{ .compatible = "renesas,ostm", },
{ }
};
static struct platform_driver ostm_device_driver = {
.driver = {
.name = "renesas_ostm",
.of_match_table = of_match_ptr(ostm_of_table),
.suppress_bind_attrs = true,
},
};
builtin_platform_driver_probe(ostm_device_driver, ostm_probe);
#endif