David S. Miller | cf3d7c1 | 2008-03-26 01:11:55 -0700 | [diff] [blame] | 1 | /* timer.h: System timer definitions for sun5. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * |
David S. Miller | cf3d7c1 | 2008-03-26 01:11:55 -0700 | [diff] [blame] | 3 | * Copyright (C) 1997, 2008 David S. Miller (davem@davemloft.net) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef _SPARC64_TIMER_H |
| 7 | #define _SPARC64_TIMER_H |
| 8 | |
| 9 | #include <linux/types.h> |
David S. Miller | cf3d7c1 | 2008-03-26 01:11:55 -0700 | [diff] [blame] | 10 | #include <linux/init.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | struct sparc64_tick_ops { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | unsigned long (*get_tick)(void); |
David S. Miller | 112f487 | 2007-03-05 15:28:37 -0800 | [diff] [blame] | 14 | int (*add_compare)(unsigned long); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | unsigned long softint_mask; |
David S. Miller | 112f487 | 2007-03-05 15:28:37 -0800 | [diff] [blame] | 16 | void (*disable_irq)(void); |
| 17 | |
| 18 | void (*init_tick)(void); |
| 19 | unsigned long (*add_tick)(unsigned long); |
| 20 | |
| 21 | char *name; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | }; |
| 23 | |
| 24 | extern struct sparc64_tick_ops *tick_ops; |
| 25 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | extern unsigned long sparc64_get_clock_tick(unsigned int cpu); |
David S. Miller | cf3d7c1 | 2008-03-26 01:11:55 -0700 | [diff] [blame] | 27 | extern void __devinit setup_sparc64_timer(void); |
| 28 | extern void __init time_init(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
| 30 | #endif /* _SPARC64_TIMER_H */ |