tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8830 / rtc_reg_v3.h
1 /******************************************************************************
2  ** File Name:    rtc_reg_v3.h                                            *
3  ** Author:       mingwei.zhang                                                 *
4  ** DATE:         06/11/2010                                                  *
5  ** Copyright:    2010 Spreatrum, Incoporated. All Rights Reserved.           *
6  ** Description:                                                              *
7  ******************************************************************************/
8 /******************************************************************************
9  **                   Edit    History                                         *
10  **---------------------------------------------------------------------------*
11  ** DATE          NAME            DESCRIPTION                                 *
12  ** 06/11/2010    mingwei.zhang   Create.                                     *
13  ******************************************************************************/
14 #ifndef _RTC_REG_V3_H_
15 #define _RTC_REG_V3_H_
16 /*----------------------------------------------------------------------------*
17  **                         Dependencies                                      *
18  **------------------------------------------------------------------------- */
19
20 /**---------------------------------------------------------------------------*
21  **                             Compiler Flag                                 *
22  **--------------------------------------------------------------------------*/
23 #ifdef   __cplusplus
24 extern   "C"
25 {
26 #endif
27 /**---------------------------------------------------------------------------*
28 **                               Micro Define                                **
29 **---------------------------------------------------------------------------*/
30 #include "sprd_reg.h"
31 ////
32 /*----------Real Timer Counter Register----------*/
33 ///
34 #define RTC_BASE                        SPRD_ANA_RTC_PHYS
35 #define ANA_RTC_SEC_CNT                 (RTC_BASE + 0x00)
36 #define ANA_RTC_MIN_CNT                 (RTC_BASE + 0x04)
37 #define ANA_RTC_HOUR_CNT                (RTC_BASE + 0x08)
38 #define ANA_RTC_DAY_CNT                 (RTC_BASE + 0x0C)
39 #define ANA_RTC_SEC_UPDATE              (RTC_BASE + 0x10)
40 #define ANA_RTC_MIN_UPDATE              (RTC_BASE + 0x14)
41 #define ANA_RTC_HOUR_UPDATE             (RTC_BASE + 0x18)
42 #define ANA_RTC_DAY_UPDATE              (RTC_BASE + 0x1C)
43 #define ANA_RTC_SEC_ALM                 (RTC_BASE + 0x20)
44 #define ANA_RTC_MIN_ALM                 (RTC_BASE + 0x24)
45 #define ANA_RTC_HOUR_ALM                (RTC_BASE + 0x28)
46 #define ANA_RTC_DAY_ALM                 (RTC_BASE + 0x2C)
47 #define ANA_RTC_INT_EN                  (RTC_BASE + 0x30)
48 #define ANA_RTC_INT_RSTS                (RTC_BASE + 0x34)
49 #define ANA_RTC_INT_CLR                 (RTC_BASE + 0x38)
50 #define ANA_RTC_INT_MSK                 (RTC_BASE + 0x3C)
51
52 #define ANA_RTC_SPG_VALUE               (RTC_BASE + 0x50)
53 #define ANA_RTC_SPG_UPD                 (RTC_BASE + 0x54)
54
55 //The corresponding bit of RTC_CTL register.
56 #define RTC_SEC_BIT                 BIT_0        //Sec int enable
57 #define RTC_MIN_BIT                 BIT_1        //Min int enable
58 #define RTC_HOUR_BIT                BIT_2        //Hour int enable
59 #define RTC_DAY_BIT                 BIT_3        //Day int enable
60 #define RTC_ALARM_BIT               BIT_4        //Alarm int enable
61 #define RTCCTL_HOUR_FMT_SEL         BIT_5        //Hour format select
62 //#define RTCCTL_EN                         BIT_6        //Rtc module enable
63
64 #define RTC_SEC_ACK_BIT             BIT_8        // Sec ack int enable
65 #define RTC_MIN_ACK_BIT             BIT_9        //Min ack int enable
66 #define RTC_HOUR_ACK_BIT            BIT_10        //Hour ack int enable
67 #define RTC_DAY_ACK_BIT             BIT_11        //Day ack int enable
68 #define RTC_SEC_ALM_ACK_BIT         BIT_12        //Sec alm ack int enable
69 #define RTC_MIN_ALM_ACK_BIT         BIT_13        //Min alm ack int enable
70 #define RTC_HOUR_ALM_ACK_BIT        BIT_14        //Hour alm ack int enable
71 #define RTC_DAY_ALM_ACK_BIT         BIT_15        //Day alm ack int enable
72
73 #define RTC_UPD_TIME_MASK (RTC_SEC_ACK_BIT | RTC_MIN_ACK_BIT | RTC_HOUR_ACK_BIT | RTC_DAY_ACK_BIT)
74 #define RTC_INT_ALL_MSK (0xFFFF&(~(BIT_5|BIT_6|BIT_7)))
75
76 #define RTC_SEC_MASK 0x3F
77 #define RTC_MIN_MASK 0x3F
78 #define RTC_HOUR_MASK 0x1F
79 #define RTC_DAY_MASK 0xFFFF
80
81 /**----------------------------------------------------------------------------*
82 **                         Compiler Flag                                      **
83 **----------------------------------------------------------------------------*/
84
85 #ifdef   __cplusplus
86 }
87 #endif
88 /**---------------------------------------------------------------------------*/
89 #endif //_RTC_REG_V3_H_
90
91