blob: 6ff68765094def428b61f42b89b3eaa6d2556d86 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Anton Vorontsov83ff9dc2008-05-23 20:38:54 +04002/*
3 * Freescale General-purpose Timers Module
4 *
Yang Li8a56e1e2012-11-01 18:53:42 +00005 * Copyright 2006 Freescale Semiconductor, Inc.
Anton Vorontsov83ff9dc2008-05-23 20:38:54 +04006 * Shlomi Gridish <gridish@freescale.com>
7 * Jerry Huang <Chang-Ming.Huang@freescale.com>
8 * Copyright (c) MontaVista Software, Inc. 2008.
9 * Anton Vorontsov <avorontsov@ru.mvista.com>
Anton Vorontsov83ff9dc2008-05-23 20:38:54 +040010 */
11
12#ifndef __ASM_FSL_GTM_H
13#define __ASM_FSL_GTM_H
14
15#include <linux/types.h>
16
17struct gtm;
18
19struct gtm_timer {
20 unsigned int irq;
21
22 struct gtm *gtm;
23 bool requested;
24 u8 __iomem *gtcfr;
25 __be16 __iomem *gtmdr;
26 __be16 __iomem *gtpsr;
27 __be16 __iomem *gtcnr;
28 __be16 __iomem *gtrfr;
29 __be16 __iomem *gtevr;
30};
31
32extern struct gtm_timer *gtm_get_timer16(void);
33extern struct gtm_timer *gtm_get_specific_timer16(struct gtm *gtm,
34 unsigned int timer);
35extern void gtm_put_timer16(struct gtm_timer *tmr);
36extern int gtm_set_timer16(struct gtm_timer *tmr, unsigned long usec,
37 bool reload);
38extern int gtm_set_exact_timer16(struct gtm_timer *tmr, u16 usec,
39 bool reload);
40extern void gtm_stop_timer16(struct gtm_timer *tmr);
41extern void gtm_ack_timer16(struct gtm_timer *tmr, u16 events);
42
43#endif /* __ASM_FSL_GTM_H */