Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dw_apb_timer.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2009 Intel Corporation
3  * Author: Jacob Pan ([email protected])
4  *
5  * Shared with ARM platforms, Jamie Iles, Picochip 2011
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * Support for the Synopsys DesignWare APB Timers.
12  */
13 #ifndef __DW_APB_TIMER_H__
14 #define __DW_APB_TIMER_H__
15 
16 #include <linux/clockchips.h>
17 #include <linux/clocksource.h>
18 #include <linux/interrupt.h>
19 
20 #define APBTMRS_REG_SIZE 0x14
21 
22 struct dw_apb_timer {
23  void __iomem *base;
24  unsigned long freq;
25  int irq;
26 };
27 
29  struct clock_event_device ced;
32  void (*eoi)(struct dw_apb_timer *);
33 };
34 
37  struct clocksource cs;
38 };
39 
44 
46 dw_apb_clockevent_init(int cpu, const char *name, unsigned rating,
47  void __iomem *base, int irq, unsigned long freq);
48 struct dw_apb_clocksource *
49 dw_apb_clocksource_init(unsigned rating, const char *name, void __iomem *base,
50  unsigned long freq);
55 
56 extern struct sys_timer dw_apb_timer;
57 #endif /* __DW_APB_TIMER_H__ */