Tom Rini | 155d424 | 2013-08-28 09:00:28 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> |
| 3 | * |
| 4 | * Based on: |
| 5 | * |
| 6 | * ------------------------------------------------------------------------- |
| 7 | * |
| 8 | * linux/include/asm-arm/arch-davinci/hardware.h |
| 9 | * |
| 10 | * Copyright (C) 2006 Texas Instruments. |
| 11 | * |
| 12 | * SPDX-License-Identifier: GPL-2.0 |
| 13 | */ |
| 14 | #ifndef __ASM_DAVINCI_RTC_H |
| 15 | #define __ASM_DAVINCI_RTC_H |
| 16 | |
| 17 | struct davinci_rtc { |
| 18 | unsigned int second; |
| 19 | unsigned int minutes; |
| 20 | unsigned int hours; |
| 21 | unsigned int day; |
| 22 | unsigned int month; /* 0x10 */ |
| 23 | unsigned int year; |
| 24 | unsigned int dotw; |
| 25 | unsigned int resv1; |
| 26 | unsigned int alarmsecond; /* 0x20 */ |
| 27 | unsigned int alarmminute; |
| 28 | unsigned int alarmhour; |
| 29 | unsigned int alarmday; |
| 30 | unsigned int alarmmonth; /* 0x30 */ |
| 31 | unsigned int alarmyear; |
| 32 | unsigned int resv2[2]; |
| 33 | unsigned int ctrl; /* 0x40 */ |
| 34 | unsigned int status; |
| 35 | unsigned int irq; |
| 36 | unsigned int complsb; |
| 37 | unsigned int compmsb; /* 0x50 */ |
| 38 | unsigned int osc; |
| 39 | unsigned int resv3[2]; |
| 40 | unsigned int scratch0; /* 0x60 */ |
| 41 | unsigned int scratch1; |
| 42 | unsigned int scratch2; |
| 43 | unsigned int kick0r; |
| 44 | unsigned int kick1r; /* 0x70 */ |
| 45 | }; |
| 46 | |
| 47 | #define RTC_STATE_BUSY 0x01 |
| 48 | #define RTC_STATE_RUN 0x02 |
| 49 | |
| 50 | #define RTC_KICK0R_WE 0x83e70b13 |
| 51 | #define RTC_KICK1R_WE 0x95a4f1e0 |
| 52 | #endif |