File: v850e_timer_c.h

package info (click to toggle)
linux-2.6 2.6.18.dfsg.1-12
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 287,316 kB
  • ctags: 831,064
  • sloc: ansic: 4,700,345; asm: 205,595; makefile: 13,019; perl: 3,208; python: 2,734; yacc: 2,632; sh: 2,301; cpp: 2,107; lex: 1,510; lisp: 218; awk: 99; pascal: 41
file content (48 lines) | stat: -rw-r--r-- 1,723 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * include/asm-v850/v850e_timer_c.h -- `Timer C' component often used
 *	with the V850E cpu core
 *
 *  Copyright (C) 2001,03  NEC Electronics Corporation
 *  Copyright (C) 2001,03  Miles Bader <miles@gnu.org>
 *
 * This file is subject to the terms and conditions of the GNU General
 * Public License.  See the file COPYING in the main directory of this
 * archive for more details.
 *
 * Written by Miles Bader <miles@gnu.org>
 */

/* NOTE: this include file currently contains only enough to allow us to
   use timer C as an interrupt pass-through.  */

#ifndef __V850_V850E_TIMER_C_H__
#define __V850_V850E_TIMER_C_H__

#include <asm/types.h>
#include <asm/machdep.h>	/* Pick up chip-specific defs.  */


/* Timer C (16-bit interval timers).  */

/* Control register 0 for timer C.  */
#define V850E_TIMER_C_TMCC0_ADDR(n) (V850E_TIMER_C_BASE_ADDR + 0x6 + 0x10 *(n))
#define V850E_TIMER_C_TMCC0(n)	  (*(volatile u8 *)V850E_TIMER_C_TMCC0_ADDR(n))
#define V850E_TIMER_C_TMCC0_CAE	  0x01 /* clock action enable */
#define V850E_TIMER_C_TMCC0_CE	  0x02 /* count enable */
/* ... */

/* Control register 1 for timer C.  */
#define V850E_TIMER_C_TMCC1_ADDR(n) (V850E_TIMER_C_BASE_ADDR + 0x8 + 0x10 *(n))
#define V850E_TIMER_C_TMCC1(n)	  (*(volatile u8 *)V850E_TIMER_C_TMCC1_ADDR(n))
#define V850E_TIMER_C_TMCC1_CMS0  0x01 /* capture/compare mode select (ccc0) */
#define V850E_TIMER_C_TMCC1_CMS1  0x02 /* capture/compare mode select (ccc1) */
/* ... */

/* Interrupt edge-sensitivity control for timer C.  */
#define V850E_TIMER_C_SESC_ADDR(n) (V850E_TIMER_C_BASE_ADDR + 0x9 + 0x10 *(n))
#define V850E_TIMER_C_SESC(n)	  (*(volatile u8 *)V850E_TIMER_C_SESC_ADDR(n))

/* ...etc... */


#endif /* __V850_V850E_TIMER_C_H__  */