1 #ifndef __ARM_TIME_H__ 2 #define __ARM_TIME_H__ 3 4 #define DT_MATCH_TIMER \ 5 DT_MATCH_COMPATIBLE("arm,armv7-timer"), \ 6 DT_MATCH_COMPATIBLE("arm,armv8-timer") 7 8 typedef unsigned long cycles_t; 9 get_cycles(void)10static inline cycles_t get_cycles (void) 11 { 12 return 0; 13 } 14 15 /* List of timer's IRQ */ 16 enum timer_ppi 17 { 18 TIMER_PHYS_SECURE_PPI = 0, 19 TIMER_PHYS_NONSECURE_PPI = 1, 20 TIMER_VIRT_PPI = 2, 21 TIMER_HYP_PPI = 3, 22 MAX_TIMER_PPI = 4, 23 }; 24 25 /* 26 * Value of "clock-frequency" in the DT timer node if present. 27 * 0 means the property doesn't exist. 28 */ 29 extern uint32_t timer_dt_clock_frequency; 30 31 /* Get one of the timer IRQ number */ 32 unsigned int timer_get_irq(enum timer_ppi ppi); 33 34 /* Set up the timer interrupt on this CPU */ 35 extern void init_timer_interrupt(void); 36 37 /* Counter value at boot time */ 38 extern uint64_t boot_count; 39 40 extern s_time_t ticks_to_ns(uint64_t ticks); 41 extern uint64_t ns_to_ticks(s_time_t ns); 42 43 void preinit_xen_time(void); 44 45 #endif /* __ARM_TIME_H__ */ 46 /* 47 * Local variables: 48 * mode: C 49 * c-file-style: "BSD" 50 * c-basic-offset: 4 51 * indent-tabs-mode: nil 52 * End: 53 */ 54