tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8825 / syscnt_drvapi.h
1 /******************************************************************************
2  ** File Name:      syscnt_drvapi.h                                                 *
3  ** Author:         Nick.zhao                                                  *
4  ** DATE:           01/20/2007                                                *
5  ** Copyright:      2002 Spreatrum, Incoporated. All Rights Reserved.         *
6  ** Description:    This file define the basic interfaces of System Counter     *
7  ******************************************************************************
8
9  ******************************************************************************
10  **                        Edit History                                       *
11  ** ------------------------------------------------------------------------- *
12  ** DATE           NAME             DESCRIPTION                               *
13  ** 01/20/2007     Nick.zhao        Create.                                   *
14  ******************************************************************************/
15 #ifndef _SYSCNT_DRVAPI_H_
16 #define _SYSCNT_DRVAPI_H_
17
18 /**---------------------------------------------------------------------------*
19  **                         Dependencies                                      *
20  **---------------------------------------------------------------------------*/
21
22 /**---------------------------------------------------------------------------*
23  **                         Debugging Flag                                    *
24  **---------------------------------------------------------------------------*/
25
26 /**---------------------------------------------------------------------------*
27  **                         Compiler Flag                                     *
28  **---------------------------------------------------------------------------*/
29 #ifdef   __cplusplus
30 extern   "C"
31 {
32 #endif
33 /**---------------------------------------------------------------------------*
34  **                         MACRO Definations                                     *
35  **---------------------------------------------------------------------------*/
36 #define MIN_SYS_TIMER_TIME       0x1
37
38 //define the syscnt timer callback type
39 typedef void (*SYSCNT_CALLBACK) (uint32);
40
41
42 /**---------------------------------------------------------------------------*
43  **                      Function  Prototype
44  **---------------------------------------------------------------------------*/
45 /*********************************************************************/
46 //  Description: Initialize the System counter
47 //  Input:
48 //      param         not use
49 //  Return:
50 //      None
51 //  Note:
52 //      None
53 /*********************************************************************/
54 PUBLIC void Syscnt_Init (void);
55
56
57 /*********************************************************************/
58 //  Description: Set the syscnt timer
59 //  Input:
60 //      time     The time to be set (ms)
61 //      st_fun   The callback function
62 //      param    The callback function's parameter
63 //  Return:
64 //      0        Successfully
65 //  Note:
66 //      None
67 /*********************************************************************/
68 PUBLIC uint32 Syscnt_SetTimer (uint32 time, SYSCNT_CALLBACK st_fun, uint32 param);
69
70 /*********************************************************************/
71 //  Description: the Syscnt timer's isr
72 //  Input:
73 //      none
74 //  Return:
75 //      none
76 //  Note:
77 //      None
78 /*********************************************************************/
79 PUBLIC void Syscnt_ISR (uint32 int_num);
80
81 /*********************************************************************/
82 //  Description: Clear the current timer
83 //  Input:
84 //  Return:
85 //  Note:
86 //      None
87 /*********************************************************************/
88 void Syscnt_ClearTimer (void);
89
90
91 /**---------------------------------------------------------------------------*
92  **                         Compiler Flag                                     *
93  **---------------------------------------------------------------------------*/
94 #ifdef   __cplusplus
95 }
96 #endif
97
98 #endif //_SYSCNT_DRVAPI_H_