File: timex.h

package info (click to toggle)
kernel-image-2.4.17-hppa 32.4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 156,356 kB
  • ctags: 442,585
  • sloc: ansic: 2,542,442; asm: 144,771; makefile: 8,468; sh: 3,097; perl: 2,578; yacc: 1,177; tcl: 577; lex: 352; awk: 251; lisp: 218; sed: 72
file content (36 lines) | stat: -rw-r--r-- 926 bytes parent folder | download | duplicates (5)
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
/*
 * linux/include/asm-cris/timex.h
 *
 * CRIS architecture timex specifications
 */
#ifndef _ASM_CRIS_TIMEX_H
#define _ASM_CRIS_TIMEX_H

#define CLOCK_TICK_RATE 19200 /* Underlying frequency of the HZ timer */

/* The timer0 values gives ~52.1us resolution (1/19200) but interrupts at HZ*/
#define TIMER0_FREQ (CLOCK_TICK_RATE)
#define TIMER0_CLKSEL c19k2Hz
#define TIMER0_DIV (TIMER0_FREQ/(HZ))
/* This is the slow one: */
/*
#define GET_JIFFIES_USEC() \
  ( (*R_TIMER0_DATA - TIMER0_DIV) * (1000000/HZ)/TIMER0_DIV )
*/
/* This is the fast version: */
extern unsigned short cris_timer0_value_us[TIMER0_DIV+1]; /* in kernel/time.c */
#define GET_JIFFIES_USEC() (cris_timer0_value_us[*R_TIMER0_DATA])

/*
 * We don't have a cycle-counter.. but we do not support SMP anyway where this is
 * used so it does not matter.
 */

typedef unsigned int cycles_t;

static inline cycles_t get_cycles(void)
{
        return 0;
}

#endif