55#ifndef _GRLIB_GPTIMER_REGS_H
56#define _GRLIB_GPTIMER_REGS_H
95#define GPTIMER_TCNTVAL_TCVAL_SHIFT 0
96#define GPTIMER_TCNTVAL_TCVAL_MASK 0xffffffffU
97#define GPTIMER_TCNTVAL_TCVAL_GET( _reg ) \
98 ( ( ( _reg ) & GPTIMER_TCNTVAL_TCVAL_MASK ) >> \
99 GPTIMER_TCNTVAL_TCVAL_SHIFT )
100#define GPTIMER_TCNTVAL_TCVAL_SET( _reg, _val ) \
101 ( ( ( _reg ) & ~GPTIMER_TCNTVAL_TCVAL_MASK ) | \
102 ( ( ( _val ) << GPTIMER_TCNTVAL_TCVAL_SHIFT ) & \
103 GPTIMER_TCNTVAL_TCVAL_MASK ) )
104#define GPTIMER_TCNTVAL_TCVAL( _val ) \
105 ( ( ( _val ) << GPTIMER_TCNTVAL_TCVAL_SHIFT ) & \
106 GPTIMER_TCNTVAL_TCVAL_MASK )
119#define GPTIMER_TRLDVAL_TRLDVAL_SHIFT 0
120#define GPTIMER_TRLDVAL_TRLDVAL_MASK 0xffffffffU
121#define GPTIMER_TRLDVAL_TRLDVAL_GET( _reg ) \
122 ( ( ( _reg ) & GPTIMER_TRLDVAL_TRLDVAL_MASK ) >> \
123 GPTIMER_TRLDVAL_TRLDVAL_SHIFT )
124#define GPTIMER_TRLDVAL_TRLDVAL_SET( _reg, _val ) \
125 ( ( ( _reg ) & ~GPTIMER_TRLDVAL_TRLDVAL_MASK ) | \
126 ( ( ( _val ) << GPTIMER_TRLDVAL_TRLDVAL_SHIFT ) & \
127 GPTIMER_TRLDVAL_TRLDVAL_MASK ) )
128#define GPTIMER_TRLDVAL_TRLDVAL( _val ) \
129 ( ( ( _val ) << GPTIMER_TRLDVAL_TRLDVAL_SHIFT ) & \
130 GPTIMER_TRLDVAL_TRLDVAL_MASK )
142#define GPTIMER_TCTRL_WS 0x100U
144#define GPTIMER_TCTRL_WN 0x80U
146#define GPTIMER_TCTRL_DH 0x40U
148#define GPTIMER_TCTRL_CH 0x20U
150#define GPTIMER_TCTRL_IP 0x10U
152#define GPTIMER_TCTRL_IE 0x8U
154#define GPTIMER_TCTRL_LD 0x4U
156#define GPTIMER_TCTRL_RS 0x2U
158#define GPTIMER_TCTRL_EN 0x1U
170#define GPTIMER_TLATCH_LTCV_SHIFT 0
171#define GPTIMER_TLATCH_LTCV_MASK 0xffffffffU
172#define GPTIMER_TLATCH_LTCV_GET( _reg ) \
173 ( ( ( _reg ) & GPTIMER_TLATCH_LTCV_MASK ) >> \
174 GPTIMER_TLATCH_LTCV_SHIFT )
175#define GPTIMER_TLATCH_LTCV_SET( _reg, _val ) \
176 ( ( ( _reg ) & ~GPTIMER_TLATCH_LTCV_MASK ) | \
177 ( ( ( _val ) << GPTIMER_TLATCH_LTCV_SHIFT ) & \
178 GPTIMER_TLATCH_LTCV_MASK ) )
179#define GPTIMER_TLATCH_LTCV( _val ) \
180 ( ( ( _val ) << GPTIMER_TLATCH_LTCV_SHIFT ) & \
181 GPTIMER_TLATCH_LTCV_MASK )
232#define GPTIMER_SCALER_SCALER_SHIFT 0
233#define GPTIMER_SCALER_SCALER_MASK 0xffffU
234#define GPTIMER_SCALER_SCALER_GET( _reg ) \
235 ( ( ( _reg ) & GPTIMER_SCALER_SCALER_MASK ) >> \
236 GPTIMER_SCALER_SCALER_SHIFT )
237#define GPTIMER_SCALER_SCALER_SET( _reg, _val ) \
238 ( ( ( _reg ) & ~GPTIMER_SCALER_SCALER_MASK ) | \
239 ( ( ( _val ) << GPTIMER_SCALER_SCALER_SHIFT ) & \
240 GPTIMER_SCALER_SCALER_MASK ) )
241#define GPTIMER_SCALER_SCALER( _val ) \
242 ( ( ( _val ) << GPTIMER_SCALER_SCALER_SHIFT ) & \
243 GPTIMER_SCALER_SCALER_MASK )
256#define GPTIMER_SRELOAD_SRELOAD_SHIFT 0
257#define GPTIMER_SRELOAD_SRELOAD_MASK 0xffffU
258#define GPTIMER_SRELOAD_SRELOAD_GET( _reg ) \
259 ( ( ( _reg ) & GPTIMER_SRELOAD_SRELOAD_MASK ) >> \
260 GPTIMER_SRELOAD_SRELOAD_SHIFT )
261#define GPTIMER_SRELOAD_SRELOAD_SET( _reg, _val ) \
262 ( ( ( _reg ) & ~GPTIMER_SRELOAD_SRELOAD_MASK ) | \
263 ( ( ( _val ) << GPTIMER_SRELOAD_SRELOAD_SHIFT ) & \
264 GPTIMER_SRELOAD_SRELOAD_MASK ) )
265#define GPTIMER_SRELOAD_SRELOAD( _val ) \
266 ( ( ( _val ) << GPTIMER_SRELOAD_SRELOAD_SHIFT ) & \
267 GPTIMER_SRELOAD_SRELOAD_MASK )
279#define GPTIMER_CONFIG_EV 0x2000U
281#define GPTIMER_CONFIG_ES 0x1000U
283#define GPTIMER_CONFIG_EL 0x800U
285#define GPTIMER_CONFIG_EE 0x400U
287#define GPTIMER_CONFIG_DF 0x200U
289#define GPTIMER_CONFIG_SI 0x100U
291#define GPTIMER_CONFIG_IRQ_SHIFT 3
292#define GPTIMER_CONFIG_IRQ_MASK 0xf8U
293#define GPTIMER_CONFIG_IRQ_GET( _reg ) \
294 ( ( ( _reg ) & GPTIMER_CONFIG_IRQ_MASK ) >> \
295 GPTIMER_CONFIG_IRQ_SHIFT )
296#define GPTIMER_CONFIG_IRQ_SET( _reg, _val ) \
297 ( ( ( _reg ) & ~GPTIMER_CONFIG_IRQ_MASK ) | \
298 ( ( ( _val ) << GPTIMER_CONFIG_IRQ_SHIFT ) & \
299 GPTIMER_CONFIG_IRQ_MASK ) )
300#define GPTIMER_CONFIG_IRQ( _val ) \
301 ( ( ( _val ) << GPTIMER_CONFIG_IRQ_SHIFT ) & \
302 GPTIMER_CONFIG_IRQ_MASK )
304#define GPTIMER_CONFIG_TIMERS_SHIFT 0
305#define GPTIMER_CONFIG_TIMERS_MASK 0x7U
306#define GPTIMER_CONFIG_TIMERS_GET( _reg ) \
307 ( ( ( _reg ) & GPTIMER_CONFIG_TIMERS_MASK ) >> \
308 GPTIMER_CONFIG_TIMERS_SHIFT )
309#define GPTIMER_CONFIG_TIMERS_SET( _reg, _val ) \
310 ( ( ( _reg ) & ~GPTIMER_CONFIG_TIMERS_MASK ) | \
311 ( ( ( _val ) << GPTIMER_CONFIG_TIMERS_SHIFT ) & \
312 GPTIMER_CONFIG_TIMERS_MASK ) )
313#define GPTIMER_CONFIG_TIMERS( _val ) \
314 ( ( ( _val ) << GPTIMER_CONFIG_TIMERS_SHIFT ) & \
315 GPTIMER_CONFIG_TIMERS_MASK )
328#define GPTIMER_LATCHCFG_LATCHSEL_SHIFT 0
329#define GPTIMER_LATCHCFG_LATCHSEL_MASK 0xffffffffU
330#define GPTIMER_LATCHCFG_LATCHSEL_GET( _reg ) \
331 ( ( ( _reg ) & GPTIMER_LATCHCFG_LATCHSEL_MASK ) >> \
332 GPTIMER_LATCHCFG_LATCHSEL_SHIFT )
333#define GPTIMER_LATCHCFG_LATCHSEL_SET( _reg, _val ) \
334 ( ( ( _reg ) & ~GPTIMER_LATCHCFG_LATCHSEL_MASK ) | \
335 ( ( ( _val ) << GPTIMER_LATCHCFG_LATCHSEL_SHIFT ) & \
336 GPTIMER_LATCHCFG_LATCHSEL_MASK ) )
337#define GPTIMER_LATCHCFG_LATCHSEL( _val ) \
338 ( ( ( _val ) << GPTIMER_LATCHCFG_LATCHSEL_SHIFT ) & \
339 GPTIMER_LATCHCFG_LATCHSEL_MASK )
struct gptimer_timer gptimer_timer
This structure defines the GPTIMER TIMER register block memory map.
struct gptimer gptimer
This structure defines the GPTIMER register block memory map.
This structure defines the GPTIMER TIMER register block memory map.
Definition: gptimer-regs.h:188
uint32_t tctrl
See Timer n control register (TCTRL).
Definition: gptimer-regs.h:202
uint32_t trldval
See Timer n counter reload value register (TRLDVAL).
Definition: gptimer-regs.h:197
uint32_t tcntval
See Timer n counter value register (TCNTVAL).
Definition: gptimer-regs.h:192
uint32_t tlatch
See Timer n latch register (TLATCH).
Definition: gptimer-regs.h:207
This structure defines the GPTIMER register block memory map.
Definition: gptimer-regs.h:346
gptimer_timer timer[15]
See GPTIMER TIMER.
Definition: gptimer-regs.h:370
uint32_t sreload
See Scaler reload value register (SRELOAD).
Definition: gptimer-regs.h:355
uint32_t scaler
See Scaler value register (SCALER).
Definition: gptimer-regs.h:350
uint32_t config
See Configuration register (CONFIG).
Definition: gptimer-regs.h:360
uint32_t latchcfg
See Timer latch configuration register (LATCHCFG).
Definition: gptimer-regs.h:365