Xenomai  3.0.8
calibration.h
1 /*
2  * Copyright (C) 2005 Philippe Gerum <rpm@xenomai.org>.
3  *
4  * Xenomai is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (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_BLACKFIN_ASM_CALIBRATION_H
20 #define _COBALT_BLACKFIN_ASM_CALIBRATION_H
21 
22 static inline void xnarch_get_latencies(struct xnclock_gravity *p)
23 {
24 #if CONFIG_XENO_OPT_TIMING_SCHEDLAT != 0
25 #define __sched_latency CONFIG_XENO_OPT_TIMING_SCHEDLAT
26 #elif defined(CONFIG_BF533)
27 #define __sched_latency 5000
28 #elif defined(CONFIG_BF537)
29 #define __sched_latency 4800
30 #elif defined(CONFIG_BF53x)
31 #define __sched_latency 5000
32 #elif defined(CONFIG_BF538)
33 #define __sched_latency 5000
34 #elif defined(CONFIG_BF561)
35 #define __sched_latency 4500
36 #elif defined(CONFIG_BF609)
37 #define __sched_latency 5500
38 #elif defined(CONFIG_BF54x)
39 #define __sched_latency 5000
40 #elif defined(CONFIG_BF52x)
41 #define __sched_latency 7000
42 #elif defined(CONFIG_BF51x)
43 #define __sched_latency 6000
44 #elif defined(CONFIG_BF60x)
45 #define __sched_latency 5500
46 #else
47 #error "unsupported Blackfin processor"
48 #endif
49  p->user = __sched_latency;
50  p->kernel = CONFIG_XENO_OPT_TIMING_KSCHEDLAT;
51  p->irq = CONFIG_XENO_OPT_TIMING_IRQLAT;
52 }
53 
54 #undef __sched_latency
55 
56 #endif /* !_COBALT_BLACKFIN_ASM_CALIBRATION_H */