rtai_timer.h

00001 /*
00002  * /include/asm/arch/mach-clps711x/timer.h
00003  *
00004  * Don't include directly - it's included through asm-arm/rtai.h
00005  *
00006  * Copyright (c) 2002 Thomas Gleixner, autronix automation <gleixner@autronix.de>
00007  * Copyright (c) 2002, Alex Züpke, SYSGO RTS GmbH (azu@sysgo.de)
00008  * 
00009 This program is free software; you can redistribute it and/or modify
00010 it under the terms of version 2 of the GNU General Public License as
00011 published by the Free Software Foundation.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with this program; if not, write to the Free Software
00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  * This are the mach_clps711x (ARM7) timer inlines for 
00023  * RTAI Real Time Application Interface
00024  *
00025  * Thanks to Guennadi Liakhovetski, DSA GmbH (gl@dsa-ac.de) for review and 
00026  * a helping hand in unterstanding RTAI. 
00027  *
00028  * TODO's:      Beautify, test, test, test
00029  */
00030 /*
00031 --------------------------------------------------------------------------
00032 Acknowledgements
00033 - Paolo Mantegazza      (mantegazza@aero.polimi.it)
00034         creator of RTAI 
00035 */
00036 #ifndef _ASM_ARCH_RTAI_TIMER_H_
00037 #define _ASM_ARCH_RTAI_TIMER_H_
00038 
00039 #include <asm/proc/hard_system.h>
00040 #include <linux/sched.h>
00041 
00042 #define CPU_FREQ (tuned.cpu_freq)
00043 #define CHECK_TC2_BOUNDS
00044 #define DEBUG_INLINE 0
00045 #if DEBUG_INLINE > 0
00046 #define DI1(x) x
00047 #else
00048 #define DI1(x)
00049 #endif
00050 
00051 extern unsigned long rtai_lasttsc;
00052 extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern unsigned long rtai_TC2latchtspan class="keyword">extern