My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sp804_sleep_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  * SP804 timer declarations for use with various sleep functions
25  * */
26 
27 #ifndef __SP804_SLEEP_TIMER_H__
28 #define __SP804_SLEEP_TIMER_H__
29 
30 #include <sw_types.h>
31 #include <sp804_timer.h>
32 #include <sw_io.h>
33 #include <gic.h>
34 #include <sw_board.h>
35 
36 #define SLEEP_TIMER_OFFSET 0x20
37 #define SLEEP_TIMER_DURATION 100000 /*current clock speed is 100Mhz.*/
38 
44 void sp804_sleep_timer_init(u32 timer_base);
45 
51 void sp804_sleep_timer_enable(u32 timer_base);
52 
60 u32 sp804_sleep_timer_read_value(u32 timer_base);
61 
67 void sp804_sleep_timer_irq_handler(u32 timer_base);
68 
74 u64 get_current_ticks();
75 
76 #endif
u32 sp804_sleep_timer_read_value(u32 timer_base)
void sp804_sleep_timer_init(u32 timer_base)
void sp804_sleep_timer_irq_handler(u32 timer_base)
u64 get_current_ticks()
void sp804_sleep_timer_enable(u32 timer_base)