xref: /linux-6.15/arch/sparc/include/asm/timer_64.h (revision 89108c34)
1 /* timer.h: System timer definitions for sun5.
2  *
3  * Copyright (C) 1997, 2008 David S. Miller ([email protected])
4  */
5 
6 #ifndef _SPARC64_TIMER_H
7 #define _SPARC64_TIMER_H
8 
9 #include <linux/types.h>
10 #include <linux/init.h>
11 
12 /* The most frequently accessed fields should be first,
13  * to fit into the same cacheline.
14  */
15 struct sparc64_tick_ops {
16 	unsigned long ticks_per_nsec_quotient;
17 	unsigned long offset;
18 	unsigned long long (*get_tick)(void);
19 	int (*add_compare)(unsigned long);
20 	unsigned long softint_mask;
21 	void (*disable_irq)(void);
22 
23 	void (*init_tick)(void);
24 	unsigned long (*add_tick)(unsigned long);
25 	unsigned long (*get_frequency)(void);
26 	unsigned long frequency;
27 
28 	char *name;
29 };
30 
31 extern struct sparc64_tick_ops *tick_ops;
32 
33 unsigned long sparc64_get_clock_tick(unsigned int cpu);
34 void setup_sparc64_timer(void);
35 void __init time_init(void);
36 
37 #endif /* _SPARC64_TIMER_H */
38