linux/drivers/clocksource/ingenic-timer.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Ingenic SoCs TCU IRQ driver
 * Copyright (C) 2019 Paul Cercueil <[email protected]>
 * Copyright (C) 2020 周琰杰 (Zhou Yanjie) <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/clockchips.h>
#include <linux/clocksource.h>
#include <linux/cpuhotplug.h>
#include <linux/interrupt.h>
#include <linux/mfd/ingenic-tcu.h>
#include <linux/mfd/syscon.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/overflow.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/sched_clock.h>

#include <dt-bindings/clock/ingenic,tcu.h>

static DEFINE_PER_CPU(call_single_data_t, ingenic_cevt_csd);

struct ingenic_soc_info {};

struct ingenic_tcu_timer {};

struct ingenic_tcu {};

static struct ingenic_tcu *ingenic_tcu;

static u64 notrace ingenic_tcu_timer_read(void)
{}

static u64 notrace ingenic_tcu_timer_cs_read(struct clocksource *cs)
{}

static inline struct ingenic_tcu *
to_ingenic_tcu(struct ingenic_tcu_timer *timer)
{}

static inline struct ingenic_tcu_timer *
to_ingenic_tcu_timer(struct clock_event_device *evt)
{}

static int ingenic_tcu_cevt_set_state_shutdown(struct clock_event_device *evt)
{}

static int ingenic_tcu_cevt_set_next(unsigned long next,
				     struct clock_event_device *evt)
{}

static void ingenic_per_cpu_event_handler(void *info)
{}

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

static struct clk *ingenic_tcu_get_clock(struct device_node *np, int id)
{}

static int ingenic_tcu_setup_cevt(unsigned int cpu)
{}

static int __init ingenic_tcu_clocksource_init(struct device_node *np,
					       struct ingenic_tcu *tcu)
{}

static const struct ingenic_soc_info jz4740_soc_info =;

static const struct ingenic_soc_info jz4725b_soc_info =;

static const struct of_device_id ingenic_tcu_of_match[] =;

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

TIMER_OF_DECLARE(jz4740_tcu_intc,  "ingenic,jz4740-tcu",  ingenic_tcu_init);
TIMER_OF_DECLARE(jz4725b_tcu_intc, "ingenic,jz4725b-tcu", ingenic_tcu_init);
TIMER_OF_DECLARE(jz4760_tcu_intc,  "ingenic,jz4760-tcu",  ingenic_tcu_init);
TIMER_OF_DECLARE(jz4770_tcu_intc,  "ingenic,jz4770-tcu",  ingenic_tcu_init);
TIMER_OF_DECLARE(x1000_tcu_intc,  "ingenic,x1000-tcu",  ingenic_tcu_init);

static int __init ingenic_tcu_probe(struct platform_device *pdev)
{}

static int ingenic_tcu_suspend(struct device *dev)
{}

static int ingenic_tcu_resume(struct device *dev)
{}

static const struct dev_pm_ops ingenic_tcu_pm_ops =;

static struct platform_driver ingenic_tcu_driver =;
builtin_platform_driver_probe();