My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gen_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 #ifndef __GEN_TIMER_H_
24 #define __GEN_TIMER_H_
25 
26 #include <sw_types.h>
27 
28 #define SEC_GEN_TIMER_INT 29
29 
30 /* Timer PL1 control Registers */
31 #define PL0PTEN (1 << 9)
32 #define PL0VTEN (1 << 8)
33 #define EVNTI (0xF0)
34 #define EVNTDIR (1 << 3)
35 #define EVNTEN (1 << 2)
36 #define PL0VCTEN (1 << 1)
37 #define PL0PCTEN (1 << 0)
38 
39 #define CNTFRQ_VAL 0x5f5e100
40 
41 #ifdef __CCODE__
42 
47 ulong get_cntv_ctl(void);
48 
54 ulong get_cntpct(void);
55 
61 ulong get_cntp_ctl(void);
62 
68 void set_cntp_ctl(ulong);
69 
75 void set_cntfrq(ulong);
76 
82 void set_cnthp_ctl(ulong);
83 
89 void set_cnthp_cval(ulong);
90 
94 void disable_secure_timer(void);
95 
99 void enable_secure_timer(void);
100 
106 void set_secure_timer(ulong);
107 
113 void sw_set_timer_cntr_freq(ulong hz);
114 
115 #endif
116 #endif
void sw_set_timer_cntr_freq(ulong hz)
Definition: timer.c:93