tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-tiger / watchdog_phy.h
1 /******************************************************************************
2  ** File Name:      watchdog_phy.h                                                 *
3  ** Author:         Jie Dai                                                   *
4  ** DATE:           08/02/2010                                                *
5  ** Copyright:      2010 Spreatrum, Incoporated. All Rights Reserved.         *
6  ** Description:    This file define the physical layer of I2C device.      *
7  ******************************************************************************
8
9  ******************************************************************************
10  **                        Edit History                                       *
11  ** ------------------------------------------------------------------------- *
12  ** DATE           NAME             DESCRIPTION                               *
13  ** 08/02/2010     Jie Dai            Create.                                 *
14  ******************************************************************************/
15
16 #ifndef __WATCHDOG_PHY_H__
17 #define __WATCHDOG_PHY_H__
18
19 /*----------------------------------------------------------------------------*
20  **                             Dependencies                                  *
21  **------------------------------------------------------------------------- */
22
23
24 /**---------------------------------------------------------------------------*
25  **                             Compiler Flag                                 *
26  **--------------------------------------------------------------------------*/
27 #ifdef   __cplusplus
28 extern   "C"
29 {
30 #endif
31
32 /**---------------------------------------------------------------------------*
33 **                               Macro Define                                **
34 **---------------------------------------------------------------------------*/
35 #define     WDG_RESULT_OK       (int32)(0x00000000)
36 #define     WDG_RESULT_ERR      (int32)(0xFFFFFFFF)
37
38 typedef enum
39 {
40     WDG_TIMER_STATE_STOP    = 0,    //Stop Watch Dog Timer
41     WDG_TIMER_STATE_START,          //Start Watch Dog Timer
42     WDG_TIMER_STATE_KEEP            //Don't change Watch Dog Timer State
43 }
44 WDG_TIMER_STATE;
45
46 typedef enum
47 {
48     WDG_TIMEOUT_MODE_RESET = 0,     //Set Watch Dog to Reset Mode
49     WDG_TIMEOUT_MODE_INT,           //Set Watch Dog to Interrupt Mode
50     WDG_TIMEOUT_MODE_KEEP           //Don't change Watch Dog Mode
51 } WDG_TIMEOUT_MODE;
52
53 typedef struct
54 {
55     WDG_TIMER_STATE state;
56     WDG_TIMEOUT_MODE mode;
57     uint32  val;                    //Set the Timer start val
58 } WDG_CONFIG_T;
59
60 /**----------------------------------------------------------------------------*
61 **                           Function Prototype                               **
62 **----------------------------------------------------------------------------*/
63 /*****************************************************************************/
64 //  Description:    This function config the watch dog module.
65 //  Dependency:     No
66 //  Author:         Jie.Dai
67 //  Note:
68 /*****************************************************************************/
69 PUBLIC int32 WDG_PHY_CONFIG (WDG_CONFIG_T *cfg);
70
71
72 /*****************************************************************************/
73 //  Description:    This function clear the watch dog interrupt
74 //  Dependency:     No
75 //  Author:         Jie.Dai
76 //  Note:
77 /*****************************************************************************/
78 PUBLIC int32 WDG_PHY_INT_CLR (void);
79
80 /**----------------------------------------------------------------------------*
81 **                         Compiler Flag                                      **
82 **----------------------------------------------------------------------------*/
83 #ifdef   __cplusplus
84 }
85 #endif
86 /**---------------------------------------------------------------------------*/
87 #endif
88 // End
89
90