aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/dmtimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/include/plat/dmtimer.h')
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 5da73562e486..19e7fa577bd0 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -55,23 +55,17 @@
55#define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 55#define OMAP_TIMER_TRIGGER_OVERFLOW 0x01
56#define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 56#define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02
57 57
58/*
59 * IP revision identifier so that Highlander IP
60 * in OMAP4 can be distinguished.
61 */
62#define OMAP_TIMER_IP_VERSION_1 0x1
63
64/* timer capabilities used in hwmod database */ 58/* timer capabilities used in hwmod database */
65#define OMAP_TIMER_SECURE 0x80000000 59#define OMAP_TIMER_SECURE 0x80000000
66#define OMAP_TIMER_ALWON 0x40000000 60#define OMAP_TIMER_ALWON 0x40000000
67#define OMAP_TIMER_HAS_PWM 0x20000000 61#define OMAP_TIMER_HAS_PWM 0x20000000
62#define OMAP_TIMER_NEEDS_RESET 0x10000000
68 63
69struct omap_timer_capability_dev_attr { 64struct omap_timer_capability_dev_attr {
70 u32 timer_capability; 65 u32 timer_capability;
71}; 66};
72 67
73struct omap_dm_timer; 68struct omap_dm_timer;
74struct clk;
75 69
76struct timer_regs { 70struct timer_regs {
77 u32 tidr; 71 u32 tidr;
@@ -96,16 +90,12 @@ struct timer_regs {
96}; 90};
97 91
98struct dmtimer_platform_data { 92struct dmtimer_platform_data {
93 /* set_timer_src - Only used for OMAP1 devices */
99 int (*set_timer_src)(struct platform_device *pdev, int source); 94 int (*set_timer_src)(struct platform_device *pdev, int source);
100 int timer_ip_version; 95 u32 timer_capability;
101 u32 needs_manual_reset:1;
102 bool reserved;
103
104 bool loses_context;
105
106 int (*get_context_loss_count)(struct device *dev);
107}; 96};
108 97
98int omap_dm_timer_reserve_systimer(int id);
109struct omap_dm_timer *omap_dm_timer_request(void); 99struct omap_dm_timer *omap_dm_timer_request(void);
110struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id); 100struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id);
111int omap_dm_timer_free(struct omap_dm_timer *timer); 101int omap_dm_timer_free(struct omap_dm_timer *timer);
@@ -272,13 +262,11 @@ struct omap_dm_timer {
272 unsigned reserved:1; 262 unsigned reserved:1;
273 unsigned posted:1; 263 unsigned posted:1;
274 struct timer_regs context; 264 struct timer_regs context;
275 bool loses_context;
276 int ctx_loss_count; 265 int ctx_loss_count;
277 int revision; 266 int revision;
267 u32 capability;
278 struct platform_device *pdev; 268 struct platform_device *pdev;
279 struct list_head node; 269 struct list_head node;
280
281 int (*get_context_loss_count)(struct device *dev);
282}; 270};
283 271
284int omap_dm_timer_prepare(struct omap_dm_timer *timer); 272int omap_dm_timer_prepare(struct omap_dm_timer *timer);