linux/drivers/clocksource/sh_tmu.c

// SPDX-License-Identifier: GPL-2.0
/*
 * SuperH Timer Support - TMU
 *
 *  Copyright (C) 2009 Magnus Damm
 */

#include <linux/clk.h>
#include <linux/clockchips.h>
#include <linux/clocksource.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/sh_timer.h>
#include <linux/slab.h>
#include <linux/spinlock.h>

#ifdef CONFIG_SUPERH
#include <asm/platform_early.h>
#endif

enum sh_tmu_model {};

struct sh_tmu_device;

struct sh_tmu_channel {};

struct sh_tmu_device {};

#define TSTR
#define TCOR
#define TCNT
#define TCR

#define TCR_UNF
#define TCR_UNIE
#define TCR_TPSC_CLK4
#define TCR_TPSC_CLK16
#define TCR_TPSC_CLK64
#define TCR_TPSC_CLK256
#define TCR_TPSC_CLK1024
#define TCR_TPSC_MASK

static inline unsigned long sh_tmu_read(struct sh_tmu_channel *ch, int reg_nr)
{}

static inline void sh_tmu_write(struct sh_tmu_channel *ch, int reg_nr,
				unsigned long value)
{}

static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
{}

static int __sh_tmu_enable(struct sh_tmu_channel *ch)
{}

static int sh_tmu_enable(struct sh_tmu_channel *ch)
{}

static void __sh_tmu_disable(struct sh_tmu_channel *ch)
{}

static void sh_tmu_disable(struct sh_tmu_channel *ch)
{}

static void sh_tmu_set_next(struct sh_tmu_channel *ch, unsigned long delta,
			    int periodic)
{}

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

static struct sh_tmu_channel *cs_to_sh_tmu(struct clocksource *cs)
{}

static u64 sh_tmu_clocksource_read(struct clocksource *cs)
{}

static int sh_tmu_clocksource_enable(struct clocksource *cs)
{}

static void sh_tmu_clocksource_disable(struct clocksource *cs)
{}

static void sh_tmu_clocksource_suspend(struct clocksource *cs)
{}

static void sh_tmu_clocksource_resume(struct clocksource *cs)
{}

static int sh_tmu_register_clocksource(struct sh_tmu_channel *ch,
				       const char *name)
{}

static struct sh_tmu_channel *ced_to_sh_tmu(struct clock_event_device *ced)
{}

static void sh_tmu_clock_event_start(struct sh_tmu_channel *ch, int periodic)
{}

static int sh_tmu_clock_event_shutdown(struct clock_event_device *ced)
{}

static int sh_tmu_clock_event_set_state(struct clock_event_device *ced,
					int periodic)
{}

static int sh_tmu_clock_event_set_oneshot(struct clock_event_device *ced)
{}

static int sh_tmu_clock_event_set_periodic(struct clock_event_device *ced)
{}

static int sh_tmu_clock_event_next(unsigned long delta,
				   struct clock_event_device *ced)
{}

static void sh_tmu_clock_event_suspend(struct clock_event_device *ced)
{}

static void sh_tmu_clock_event_resume(struct clock_event_device *ced)
{}

static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
				       const char *name)
{}

static int sh_tmu_register(struct sh_tmu_channel *ch, const char *name,
			   bool clockevent, bool clocksource)
{}

static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, unsigned int index,
				bool clockevent, bool clocksource,
				struct sh_tmu_device *tmu)
{}

static int sh_tmu_map_memory(struct sh_tmu_device *tmu)
{}

static int sh_tmu_parse_dt(struct sh_tmu_device *tmu)
{}

static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
{}

static int sh_tmu_probe(struct platform_device *pdev)
{}

static const struct platform_device_id sh_tmu_id_table[] =;
MODULE_DEVICE_TABLE(platform, sh_tmu_id_table);

static const struct of_device_id sh_tmu_of_table[] __maybe_unused =;
MODULE_DEVICE_TABLE(of, sh_tmu_of_table);

static struct platform_driver sh_tmu_device_driver =;

static int __init sh_tmu_init(void)
{}

static void __exit sh_tmu_exit(void)
{}

#ifdef CONFIG_SUPERH
sh_early_platform_init("earlytimer", &sh_tmu_device_driver);
#endif

subsys_initcall(sh_tmu_init);
module_exit(sh_tmu_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();