tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8825 / wdg_drvapi.h
1 /******************************************************************************
2  ** File Name:      wdg_drvapi.h                                                  *
3  ** Author:         Jie Dai                                                   *
4  ** DATE:           08/02/2010                                                *
5  ** Copyright:      2010 Spreatrum, Incoporated. All Rights Reserved.         *
6  ** Description:    This file defines the basic input and output operations   *
7  **                 on hardware, it can be treated as a hardware abstract     *
8  **                 layer interface.                                          *
9  ******************************************************************************
10
11  ******************************************************************************
12  **                        Edit History                                       *
13  ** ------------------------------------------------------------------------- *
14  ** DATE           NAME             DESCRIPTION                               *
15  ** 06/12/2010     Xuepeng.Zhang    Create.                                   *
16  ******************************************************************************/
17
18 #ifndef _WDG_DRVAPI_H_
19 #define _WDG_DRVAPI_H_
20
21 /*----------------------------------------------------------------------------*
22  **                             Dependencies                                  *
23  **------------------------------------------------------------------------- */
24
25
26 /**---------------------------------------------------------------------------*
27  **                             Compiler Flag                                 *
28  **--------------------------------------------------------------------------*/
29 #ifdef   __cplusplus
30 extern   "C"
31 {
32 #endif
33
34 /**---------------------------------------------------------------------------*
35 **                               Macro Define                                **
36 **---------------------------------------------------------------------------*/
37 #define WDG_MAX_COUNT           (0xFFFFFFFF)
38
39 /**----------------------------------------------------------------------------*
40 **                           Function Prototype                               **
41 **----------------------------------------------------------------------------*/
42
43 /*****************************************************************************/
44 //  Description:    This function disable WDG timer
45 //  Author:         Jimmy.Jia
46 //  Note:           no rtc_clk to drive the counter
47 //
48 /*****************************************************************************/
49 PUBLIC void WDG_TimerStop (void);
50
51
52 /*****************************************************************************/
53 //  Description:    This function initialize and setup timer with given value
54 //  Author:         Jimmy.Jia
55 //  Note:           rtc_clk drive the counter
56 //                  load regiter is 32 bits wide so that don't check if param's valid
57 /*****************************************************************************/
58 PUBLIC void WDG_TimerStart (uint32 init_val);
59
60
61 /*****************************************************************************/
62 //  Description:    This function handle WatchDog Interrupt
63 //  Author:         Binggo Zhou
64 //  Note:
65 /*****************************************************************************/
66 PUBLIC void WDG_TimerHandler (uint32 int_num);
67 /*****************************************************************************/
68 //  Description:    This function init WatchDog
69 //  Author:         Binggo Zhou
70 //  Note:
71 /*****************************************************************************/
72 PUBLIC void WDG_TimerInit (void);
73
74 /*****************************************************************************/
75 //  Description:    This function Reset MCU
76 //  Author:         Younger.Yang
77 //  Note:
78 /*****************************************************************************/
79 PUBLIC void WDG_ResetMCU (void);
80
81 /*****************************************************************************/
82 //  Description:    This function Load WatchDog Timer Value
83 //  Author:         Binggo Zhou
84 //  Note:
85 /*****************************************************************************/
86 PUBLIC void WDG_TimerLoad (uint32 time_ms);
87 PUBLIC void WDG_ClockOn(void);
88 PUBLIC uint32 WDG_PHY_RST_INT_ON(void);
89
90 /**----------------------------------------------------------------------------*
91 **                         Compiler Flag                                      **
92 **----------------------------------------------------------------------------*/
93
94 #ifdef __cplusplus
95 }
96 #endif
97
98 #endif  // _WDG_DRVAPI_H_
99
100