2 * Copyright (C) 2009 Philippe Gerum <rpm@xenomai.org>.
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.
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.
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
20 #ifndef _XENO_ASM_NIOS2_CALIBRATION_H
21 #define _XENO_ASM_NIOS2_CALIBRATION_H
23 #ifndef _XENO_ASM_NIOS2_BITS_INIT_H
24 #error "please don't include asm/calibration.h directly"
27 static inline unsigned long xnarch_get_sched_latency (void)
29 #if CONFIG_XENO_OPT_TIMING_SCHEDLAT != 0
30 #define __sched_latency CONFIG_XENO_OPT_TIMING_SCHEDLAT
32 #ifdef CONFIG_ALTERA_DE2
33 #define __sched_latency 10000
35 #define __sched_latency 10000
37 #error "unsupported NIOS2 platform"
39 #endif /* CONFIG_XENO_OPT_TIMING_SCHEDLAT */
41 return __sched_latency
;
44 #undef __sched_latency
46 #endif /* !_XENO_ASM_NIOS2_CALIBRATION_H */