Xenomai  3.1
calibration.h
1 /*
2  * Copyright (C) 2015 Philippe Gerum <rpm@xenomai.org>.
3  *
4  * Xenomai is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published
6  * by the Free Software Foundation; either version 2 of the License,
7  * or (at your option) any later version.
8  *
9  * Xenomai is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Xenomai; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17  * 02111-1307, USA.
18  */
19 #ifndef _COBALT_ARM64_ASM_CALIBRATION_H
20 #define _COBALT_ARM64_ASM_CALIBRATION_H
21 
22 static inline void xnarch_get_latencies(struct xnclock_gravity *p)
23 {
24  unsigned int ulat;
25 #if CONFIG_XENO_OPT_TIMING_SCHEDLAT != 0
26  ulat = CONFIG_XENO_OPT_TIMING_SCHEDLAT;
27 #elif defined(CONFIG_ARCH_HISI)
28  ulat = 4000;
29 #else
30  ulat = 4000;
31 #endif
32  p->user = xnclock_ns_to_ticks(&nkclock, ulat);
33  p->kernel = xnclock_ns_to_ticks(&nkclock, CONFIG_XENO_OPT_TIMING_KSCHEDLAT);
34  p->irq = xnclock_ns_to_ticks(&nkclock, CONFIG_XENO_OPT_TIMING_IRQLAT);
35 }
36 
37 #endif /* !_COBALT_ARM64_ASM_CALIBRATION_H */