My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
secure_timer.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 /*
24  * secure timer declarations.
25  */
26 
27 #ifndef __SECURE_TIMER_H__
28 #define __SECURE_TIMER_H__
29 
30 #include <sw_types.h>
31 
32 
33 #define FREE_RUNNING_CNTR 0
34 #define TICK_TIMER 1
35 
36 
44 };
45 
51 void secure_timer_init(u32 timer_base);
52 
59 void secure_timer_clearirq(u32 timer_base, u32 timer_module_index);
60 
67 void secure_timer_disable(u32 timer_base, u32 timer_module_index);
68 
75 void secure_timer_enable(u32 timer_base, u32 timer_module_index);
76 
85 u32 secure_timer_read_mis(u32 timer_base, u32 tim_mod_index);
86 
95 u32 secure_timer_read_ris(u32 timer_base, u32 tim_mod_index);
96 
105 void secure_set_timer(u32 timer_base, u32 tim_mod_index, u32 mode, u32 usecs);
106 
115 u32 secure_read_timer(u32 timer_base, u32 tim_mod_index);
116 
117 
125 void secure_timer_irq_handler(int irq);
126 
127 #endif /* __VE_RS1_TIMER_H__ */
128 
u32 secure_read_timer(u32 timer_base, u32 tim_mod_index)
Reads the timer value of the requested timer base.
Definition: secure_timer.h:41
Definition: secure_timer.h:42
timer_mode
Definition: global.h:104
void secure_timer_enable(u32 timer_base, u32 timer_module_index)
Disable the secure timer.
void secure_timer_clearirq(u32 timer_base, u32 timer_module_index)
Clears the interrupt register of the secure timer.
void secure_set_timer(u32 timer_base, u32 tim_mod_index, u32 mode, u32 usecs)
Sets the requested timer base value based on the mode.
void secure_timer_irq_handler(int irq)
Handler for secure timer interrupt request.
Definition: timer.c:189
u32 secure_timer_read_mis(u32 timer_base, u32 tim_mod_index)
Reads the masked interrupt status register of SP804 timer.
Definition: secure_timer.h:43
u32 secure_timer_read_ris(u32 timer_base, u32 tim_mod_index)
Reads the Raw interrupt status register of SP804 timer.
void secure_timer_init(u32 timer_base)
Secure timer initialization.
void secure_timer_disable(u32 timer_base, u32 timer_module_index)
Enable the Secure timer.