Skip to content

Commit 1d513f4

Browse files
tmlinddlezcano
authored andcommitted
clocksource/drivers/timer-ti-dm: Move private defines to the driver
These defines are only used by timer-ti-dm driver. Signed-off-by: Tony Lindgren <[email protected]> Reviewed-by: Janusz Krzysztofik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent f32bdac commit 1d513f4

File tree

2 files changed

+62
-62
lines changed

2 files changed

+62
-62
lines changed

drivers/clocksource/timer-ti-dm.c

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,68 @@
3333

3434
#include <clocksource/timer-ti-dm.h>
3535

36+
/*
37+
* timer errata flags
38+
*
39+
* Errata i103/i767 impacts all OMAP3/4/5 devices including AM33xx. This
40+
* errata prevents us from using posted mode on these devices, unless the
41+
* timer counter register is never read. For more details please refer to
42+
* the OMAP3/4/5 errata documents.
43+
*/
44+
#define OMAP_TIMER_ERRATA_I103_I767 0x80000000
45+
46+
/* posted mode types */
47+
#define OMAP_TIMER_NONPOSTED 0x00
48+
#define OMAP_TIMER_POSTED 0x01
49+
50+
/* register offsets with the write pending bit encoded */
51+
#define WPSHIFT 16
52+
53+
#define OMAP_TIMER_WAKEUP_EN_REG (_OMAP_TIMER_WAKEUP_EN_OFFSET \
54+
| (WP_NONE << WPSHIFT))
55+
56+
#define OMAP_TIMER_CTRL_REG (_OMAP_TIMER_CTRL_OFFSET \
57+
| (WP_TCLR << WPSHIFT))
58+
59+
#define OMAP_TIMER_COUNTER_REG (_OMAP_TIMER_COUNTER_OFFSET \
60+
| (WP_TCRR << WPSHIFT))
61+
62+
#define OMAP_TIMER_LOAD_REG (_OMAP_TIMER_LOAD_OFFSET \
63+
| (WP_TLDR << WPSHIFT))
64+
65+
#define OMAP_TIMER_TRIGGER_REG (_OMAP_TIMER_TRIGGER_OFFSET \
66+
| (WP_TTGR << WPSHIFT))
67+
68+
#define OMAP_TIMER_WRITE_PEND_REG (_OMAP_TIMER_WRITE_PEND_OFFSET \
69+
| (WP_NONE << WPSHIFT))
70+
71+
#define OMAP_TIMER_MATCH_REG (_OMAP_TIMER_MATCH_OFFSET \
72+
| (WP_TMAR << WPSHIFT))
73+
74+
#define OMAP_TIMER_CAPTURE_REG (_OMAP_TIMER_CAPTURE_OFFSET \
75+
| (WP_NONE << WPSHIFT))
76+
77+
#define OMAP_TIMER_IF_CTRL_REG (_OMAP_TIMER_IF_CTRL_OFFSET \
78+
| (WP_NONE << WPSHIFT))
79+
80+
#define OMAP_TIMER_CAPTURE2_REG (_OMAP_TIMER_CAPTURE2_OFFSET \
81+
| (WP_NONE << WPSHIFT))
82+
83+
#define OMAP_TIMER_TICK_POS_REG (_OMAP_TIMER_TICK_POS_OFFSET \
84+
| (WP_TPIR << WPSHIFT))
85+
86+
#define OMAP_TIMER_TICK_NEG_REG (_OMAP_TIMER_TICK_NEG_OFFSET \
87+
| (WP_TNIR << WPSHIFT))
88+
89+
#define OMAP_TIMER_TICK_COUNT_REG (_OMAP_TIMER_TICK_COUNT_OFFSET \
90+
| (WP_TCVR << WPSHIFT))
91+
92+
#define OMAP_TIMER_TICK_INT_MASK_SET_REG \
93+
(_OMAP_TIMER_TICK_INT_MASK_SET_OFFSET | (WP_TOCR << WPSHIFT))
94+
95+
#define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \
96+
(_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))
97+
3698
static u32 omap_reserved_systimers;
3799
static LIST_HEAD(omap_timer_list);
38100
static DEFINE_SPINLOCK(dm_timer_lock);

include/clocksource/timer-ti-dm.h

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,13 @@
5252
#define OMAP_TIMER_TRIGGER_OVERFLOW 0x01
5353
#define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02
5454

55-
/* posted mode types */
56-
#define OMAP_TIMER_NONPOSTED 0x00
57-
#define OMAP_TIMER_POSTED 0x01
58-
5955
/* timer capabilities used in hwmod database */
6056
#define OMAP_TIMER_SECURE 0x80000000
6157
#define OMAP_TIMER_ALWON 0x40000000
6258
#define OMAP_TIMER_HAS_PWM 0x20000000
6359
#define OMAP_TIMER_NEEDS_RESET 0x10000000
6460
#define OMAP_TIMER_HAS_DSP_IRQ 0x08000000
6561

66-
/*
67-
* timer errata flags
68-
*
69-
* Errata i103/i767 impacts all OMAP3/4/5 devices including AM33xx. This
70-
* errata prevents us from using posted mode on these devices, unless the
71-
* timer counter register is never read. For more details please refer to
72-
* the OMAP3/4/5 errata documents.
73-
*/
74-
#define OMAP_TIMER_ERRATA_I103_I767 0x80000000
75-
7662
struct timer_regs {
7763
u32 ocp_cfg;
7864
u32 tidr;
@@ -192,52 +178,4 @@ u32 omap_dm_timer_modify_idlect_mask(u32 inputmask);
192178
#define _OMAP_TIMER_TICK_INT_MASK_SET_OFFSET 0x54 /* TOCR, 34xx only */
193179
#define _OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET 0x58 /* TOWR, 34xx only */
194180

195-
/* register offsets with the write pending bit encoded */
196-
#define WPSHIFT 16
197-
198-
#define OMAP_TIMER_WAKEUP_EN_REG (_OMAP_TIMER_WAKEUP_EN_OFFSET \
199-
| (WP_NONE << WPSHIFT))
200-
201-
#define OMAP_TIMER_CTRL_REG (_OMAP_TIMER_CTRL_OFFSET \
202-
| (WP_TCLR << WPSHIFT))
203-
204-
#define OMAP_TIMER_COUNTER_REG (_OMAP_TIMER_COUNTER_OFFSET \
205-
| (WP_TCRR << WPSHIFT))
206-
207-
#define OMAP_TIMER_LOAD_REG (_OMAP_TIMER_LOAD_OFFSET \
208-
| (WP_TLDR << WPSHIFT))
209-
210-
#define OMAP_TIMER_TRIGGER_REG (_OMAP_TIMER_TRIGGER_OFFSET \
211-
| (WP_TTGR << WPSHIFT))
212-
213-
#define OMAP_TIMER_WRITE_PEND_REG (_OMAP_TIMER_WRITE_PEND_OFFSET \
214-
| (WP_NONE << WPSHIFT))
215-
216-
#define OMAP_TIMER_MATCH_REG (_OMAP_TIMER_MATCH_OFFSET \
217-
| (WP_TMAR << WPSHIFT))
218-
219-
#define OMAP_TIMER_CAPTURE_REG (_OMAP_TIMER_CAPTURE_OFFSET \
220-
| (WP_NONE << WPSHIFT))
221-
222-
#define OMAP_TIMER_IF_CTRL_REG (_OMAP_TIMER_IF_CTRL_OFFSET \
223-
| (WP_NONE << WPSHIFT))
224-
225-
#define OMAP_TIMER_CAPTURE2_REG (_OMAP_TIMER_CAPTURE2_OFFSET \
226-
| (WP_NONE << WPSHIFT))
227-
228-
#define OMAP_TIMER_TICK_POS_REG (_OMAP_TIMER_TICK_POS_OFFSET \
229-
| (WP_TPIR << WPSHIFT))
230-
231-
#define OMAP_TIMER_TICK_NEG_REG (_OMAP_TIMER_TICK_NEG_OFFSET \
232-
| (WP_TNIR << WPSHIFT))
233-
234-
#define OMAP_TIMER_TICK_COUNT_REG (_OMAP_TIMER_TICK_COUNT_OFFSET \
235-
| (WP_TCVR << WPSHIFT))
236-
237-
#define OMAP_TIMER_TICK_INT_MASK_SET_REG \
238-
(_OMAP_TIMER_TICK_INT_MASK_SET_OFFSET | (WP_TOCR << WPSHIFT))
239-
240-
#define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \
241-
(_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))
242-
243181
#endif /* __CLOCKSOURCE_DMTIMER_H */

0 commit comments

Comments
 (0)