/* SPDX-License-Identifier: GPL-2.0-only */1/*2* TI DaVinci clocksource driver3*4* Copyright (C) 2019 Texas Instruments5* Author: Bartosz Golaszewski <[email protected]>6*/78#ifndef __TIMER_DAVINCI_H__9#define __TIMER_DAVINCI_H__1011#include <linux/clk.h>12#include <linux/ioport.h>1314enum {15DAVINCI_TIMER_CLOCKEVENT_IRQ,16DAVINCI_TIMER_CLOCKSOURCE_IRQ,17DAVINCI_TIMER_NUM_IRQS,18};1920/**21* struct davinci_timer_cfg - davinci clocksource driver configuration struct22* @reg: register range resource23* @irq: clockevent and clocksource interrupt resources24* @cmp_off: if set - it specifies the compare register used for clockevent25*26* Note: if the compare register is specified, the driver will use the bottom27* clock half for both clocksource and clockevent and the compare register28* to generate event irqs. The user must supply the correct compare register29* interrupt number.30*31* This is only used by da830 the DSP of which uses the top half. The timer32* driver still configures the top half to run in free-run mode.33*/34struct davinci_timer_cfg {35struct resource reg;36struct resource irq[DAVINCI_TIMER_NUM_IRQS];37unsigned int cmp_off;38};3940int __init davinci_timer_register(struct clk *clk,41const struct davinci_timer_cfg *data);4243#endif /* __TIMER_DAVINCI_H__ */444546