1 | /* Blackfin RTC Registers |
---|
2 | * |
---|
3 | * Copyright (c) 2008 Kallisti Labs, Los Gatos, CA, USA |
---|
4 | * written by Allan Hessenflow <allanh@kallisti.com> |
---|
5 | * |
---|
6 | * The license and distribution terms for this file may be |
---|
7 | * found in the file LICENSE in this distribution or at |
---|
8 | * http://www.rtems.com/license/LICENSE. |
---|
9 | * |
---|
10 | * $Id$ |
---|
11 | */ |
---|
12 | |
---|
13 | #ifndef _rtcRegs_h_ |
---|
14 | #define _rtcRegs_h_ |
---|
15 | |
---|
16 | /* register addresses */ |
---|
17 | |
---|
18 | #define RTC_STAT (RTC_BASE_ADDRESS + 0x0000) |
---|
19 | #define RTC_ICTL (RTC_BASE_ADDRESS + 0x0004) |
---|
20 | #define RTC_ISTAT (RTC_BASE_ADDRESS + 0x0008) |
---|
21 | #define RTC_SWCNT (RTC_BASE_ADDRESS + 0x000c) |
---|
22 | #define RTC_ALARM (RTC_BASE_ADDRESS + 0x0010) |
---|
23 | #define RTC_PREN (RTC_BASE_ADDRESS + 0x0014) |
---|
24 | |
---|
25 | |
---|
26 | /* register fields */ |
---|
27 | |
---|
28 | #define RTC_STAT_DAYS_MASK 0xfffe0000 |
---|
29 | #define RTC_STAT_DAYS_SHIFT 17 |
---|
30 | #define RTC_STAT_HOURS_MASK 0x0001f000 |
---|
31 | #define RTC_STAT_HOURS_SHIFT 12 |
---|
32 | #define RTC_STAT_MINUTES_MASK 0x00000fc0 |
---|
33 | #define RTC_STAT_MINUTES_SHIFT 6 |
---|
34 | #define RTC_STAT_SECONDS_MASK 0x0000003f |
---|
35 | #define RTC_STAT_SECONDS_SHIFT 0 |
---|
36 | |
---|
37 | #define RTC_ICTL_WCIE 0x8000 |
---|
38 | #define RTC_ICTL_DAIE 0x0040 |
---|
39 | #define RTC_ICTL_24HIE 0x0020 |
---|
40 | #define RTC_ICTL_HIE 0x0010 |
---|
41 | #define RTC_ICTL_MIE 0x0008 |
---|
42 | #define RTC_ICTL_SIE 0x0004 |
---|
43 | #define RTC_ICTL_AIE 0x0002 |
---|
44 | #define RTC_ICTL_SWIE 0x0001 |
---|
45 | |
---|
46 | #define RTC_ISTAT_WC 0x8000 |
---|
47 | #define RTC_ISTAT_WP 0x4000 |
---|
48 | #define RTC_ISTAT_DAEF 0x0040 |
---|
49 | #define RTC_ISTAT_24HE 0x0020 |
---|
50 | #define RTC_ISTAT_HEF 0x0010 |
---|
51 | #define RTC_ISTAT_MEF 0x0008 |
---|
52 | #define RTC_ISTAT_SEF 0x0004 |
---|
53 | #define RTC_ISTAT_AEF 0x0002 |
---|
54 | #define RTC_ISTAT_SWEF 0x0001 |
---|
55 | |
---|
56 | #define RTC_ALARM_DAYS_MASK 0xfff70000 |
---|
57 | #define RTC_ALARM_DAYS_SHIFT 17 |
---|
58 | #define RTC_ALARM_HOURS_MASK 0x0001f000 |
---|
59 | #define RTC_ALARM_HOURS_SHIFT 12 |
---|
60 | #define RTC_ALARM_MINUTES_MASK 0x00000fc0 |
---|
61 | #define RTC_ALARM_MINUTES_SHIFT 10 |
---|
62 | #define RTC_ALARM_SECONDS_MASK 0x0000003f |
---|
63 | #define RTC_ALARM_SECONDS_SHIFT 0 |
---|
64 | |
---|
65 | #define RTC_PREN_PREN 0x0001 |
---|
66 | |
---|
67 | #endif /* _rtcRegs_h_ */ |
---|
68 | |
---|