Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:40

0001 /*  Blackfin RTC Registers
0002  *
0003  *  Copyright (c) 2008 Kallisti Labs, Los Gatos, CA, USA
0004  *             written by Allan Hessenflow <allanh@kallisti.com>
0005  *
0006  *  The license and distribution terms for this file may be
0007  *  found in the file LICENSE in this distribution or at
0008  *  http://www.rtems.org/license/LICENSE.
0009  */
0010 
0011 #ifndef _rtcRegs_h_
0012 #define _rtcRegs_h_
0013 
0014 /* register addresses */
0015 
0016 #define RTC_STAT                 (RTC_BASE_ADDRESS + 0x0000)
0017 #define RTC_ICTL                 (RTC_BASE_ADDRESS + 0x0004)
0018 #define RTC_ISTAT                (RTC_BASE_ADDRESS + 0x0008)
0019 #define RTC_SWCNT                (RTC_BASE_ADDRESS + 0x000c)
0020 #define RTC_ALARM                (RTC_BASE_ADDRESS + 0x0010)
0021 #define RTC_PREN                 (RTC_BASE_ADDRESS + 0x0014)
0022 
0023 
0024 /* register fields */
0025 
0026 #define RTC_STAT_DAYS_MASK                        0xfffe0000
0027 #define RTC_STAT_DAYS_SHIFT                               17
0028 #define RTC_STAT_HOURS_MASK                       0x0001f000
0029 #define RTC_STAT_HOURS_SHIFT                              12
0030 #define RTC_STAT_MINUTES_MASK                     0x00000fc0
0031 #define RTC_STAT_MINUTES_SHIFT                             6
0032 #define RTC_STAT_SECONDS_MASK                     0x0000003f
0033 #define RTC_STAT_SECONDS_SHIFT                             0
0034 
0035 #define RTC_ICTL_WCIE                                 0x8000
0036 #define RTC_ICTL_DAIE                                 0x0040
0037 #define RTC_ICTL_24HIE                                0x0020
0038 #define RTC_ICTL_HIE                                  0x0010
0039 #define RTC_ICTL_MIE                                  0x0008
0040 #define RTC_ICTL_SIE                                  0x0004
0041 #define RTC_ICTL_AIE                                  0x0002
0042 #define RTC_ICTL_SWIE                                 0x0001
0043 
0044 #define RTC_ISTAT_WC                                  0x8000
0045 #define RTC_ISTAT_WP                                  0x4000
0046 #define RTC_ISTAT_DAEF                                0x0040
0047 #define RTC_ISTAT_24HE                                0x0020
0048 #define RTC_ISTAT_HEF                                 0x0010
0049 #define RTC_ISTAT_MEF                                 0x0008
0050 #define RTC_ISTAT_SEF                                 0x0004
0051 #define RTC_ISTAT_AEF                                 0x0002
0052 #define RTC_ISTAT_SWEF                                0x0001
0053 
0054 #define RTC_ALARM_DAYS_MASK                       0xfff70000
0055 #define RTC_ALARM_DAYS_SHIFT                              17
0056 #define RTC_ALARM_HOURS_MASK                      0x0001f000
0057 #define RTC_ALARM_HOURS_SHIFT                             12
0058 #define RTC_ALARM_MINUTES_MASK                    0x00000fc0
0059 #define RTC_ALARM_MINUTES_SHIFT                           10
0060 #define RTC_ALARM_SECONDS_MASK                    0x0000003f
0061 #define RTC_ALARM_SECONDS_SHIFT                            0
0062 
0063 #define RTC_PREN_PREN                                 0x0001
0064 
0065 #endif /* _rtcRegs_h_ */