linux/drivers/clocksource/timer-npcm7xx.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2014-2018 Nuvoton Technologies [email protected]
 * All rights reserved.
 *
 * Copyright 2017 Google, Inc.
 */

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/clockchips.h>
#include <linux/of_irq.h>
#include <linux/of_address.h>
#include "timer-of.h"

/* Timers registers */
#define NPCM7XX_REG_TCSR0
#define NPCM7XX_REG_TICR0
#define NPCM7XX_REG_TCSR1
#define NPCM7XX_REG_TICR1
#define NPCM7XX_REG_TDR1
#define NPCM7XX_REG_TISR

/* Timers control */
#define NPCM7XX_Tx_RESETINT
#define NPCM7XX_Tx_PERIOD
#define NPCM7XX_Tx_INTEN
#define NPCM7XX_Tx_COUNTEN
#define NPCM7XX_Tx_ONESHOT
#define NPCM7XX_Tx_OPER
#define NPCM7XX_Tx_MIN_PRESCALE
#define NPCM7XX_Tx_TDR_MASK_BITS
#define NPCM7XX_Tx_MAX_CNT
#define NPCM7XX_T0_CLR_INT
#define NPCM7XX_Tx_CLR_CSR

/* Timers operating mode */
#define NPCM7XX_START_PERIODIC_Tx

#define NPCM7XX_START_ONESHOT_Tx

#define NPCM7XX_START_Tx

#define NPCM7XX_DEFAULT_CSR

static int npcm7xx_timer_resume(struct clock_event_device *evt)
{}

static int npcm7xx_timer_shutdown(struct clock_event_device *evt)
{}

static int npcm7xx_timer_oneshot(struct clock_event_device *evt)
{}

static int npcm7xx_timer_periodic(struct clock_event_device *evt)
{}

static int npcm7xx_clockevent_set_next_event(unsigned long evt,
		struct clock_event_device *clk)
{}

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

static struct timer_of npcm7xx_to =;

static void __init npcm7xx_clockevents_init(void)
{}

static void __init npcm7xx_clocksource_init(void)
{}

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

TIMER_OF_DECLARE(wpcm450, "nuvoton,wpcm450-timer", npcm7xx_timer_init);
TIMER_OF_DECLARE(npcm7xx, "nuvoton,npcm750-timer", npcm7xx_timer_init);