root/include/asm-sparc/clock.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /* clock.h:  Definitions for the clock/timer chips on the Sparc.
   2  *
   3  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
   4  */
   5 
   6 /* Clock timer structures. The interrupt timer has two properties which
   7  * are the counter (which is handled in do_timer in sched.c) and the limit.
   8  * This limit is where the timer's counter 'wraps' around. Oddly enough,
   9  * the sun4c timer when it hits the limit wraps back to 1 and not zero
  10  * thus when calculating the value at which it will fire a microsecond you
  11  * must adjust by one.  Thanks SUN for designing such great hardware ;(
  12  */
  13 
  14 /* Note that I am only going to use the timer that interrupts at
  15  * Sparc IRQ 10.  There is another one available that can fire at
  16  * IRQ 14. If I can think of some creative uses for it this may
  17  * change. It might make a nice kernel/user profiler etc.
  18  */
  19 
  20 struct sparc_timer_info {
  21   unsigned int cur_count10;
  22   unsigned int timer_limit10;
  23   unsigned int cur_count14;
  24   unsigned int timer_limit14;
  25 };
  26 
  27 struct sparc_clock_info {
  28   unsigned char hsec;
  29   unsigned char hr;
  30   unsigned char min;
  31   unsigned char sec;
  32   unsigned char mon;
  33   unsigned char day;
  34   unsigned char yr;
  35   unsigned char wkday;
  36   unsigned char ram_hsec;
  37   unsigned char ram_hr;
  38   unsigned char ram_min;
  39   unsigned char ram_sec;
  40   unsigned char ram_mon;
  41   unsigned char ram_day;
  42   unsigned char ram_year;
  43   unsigned char ram_wkday;
  44   unsigned char intr_reg;
  45   unsigned char cmd_reg;
  46   unsigned char foo[14];
  47 };
  48 
  49 #define TIMER_PHYSADDR   0xf3000000
  50 
  51 /* YUCK YUCK YUCK, grrr... */
  52 #define  TIMER_STRUCT  ((struct sparc_timer_info *)((struct sparc_clock_info *) TIMER_VADDR))
  53 

/* [previous][next][first][last][top][bottom][index][help] */