0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef _LINUX_RTC_M48T59_H_
0013 #define _LINUX_RTC_M48T59_H_
0014
0015
0016
0017
0018 #define M48T59_YEAR 0xf
0019 #define M48T59_MONTH 0xe
0020 #define M48T59_MDAY 0xd
0021 #define M48T59_WDAY 0xc
0022 #define M48T59_WDAY_CB 0x20
0023 #define M48T59_WDAY_CEB 0x10
0024 #define M48T59_HOUR 0xb
0025 #define M48T59_MIN 0xa
0026 #define M48T59_SEC 0x9
0027 #define M48T59_CNTL 0x8
0028 #define M48T59_CNTL_READ 0x40
0029 #define M48T59_CNTL_WRITE 0x80
0030 #define M48T59_WATCHDOG 0x7
0031 #define M48T59_INTR 0x6
0032 #define M48T59_INTR_AFE 0x80
0033 #define M48T59_INTR_ABE 0x20
0034 #define M48T59_ALARM_DATE 0x5
0035 #define M48T59_ALARM_HOUR 0x4
0036 #define M48T59_ALARM_MIN 0x3
0037 #define M48T59_ALARM_SEC 0x2
0038 #define M48T59_UNUSED 0x1
0039 #define M48T59_FLAGS 0x0
0040 #define M48T59_FLAGS_WDT 0x80
0041 #define M48T59_FLAGS_AF 0x40
0042 #define M48T59_FLAGS_BF 0x10
0043
0044 #define M48T59RTC_TYPE_M48T59 0
0045 #define M48T59RTC_TYPE_M48T02 1
0046 #define M48T59RTC_TYPE_M48T08 2
0047
0048 struct m48t59_plat_data {
0049
0050 void (*write_byte)(struct device *dev, u32 ofs, u8 val);
0051 unsigned char (*read_byte)(struct device *dev, u32 ofs);
0052
0053 int type;
0054
0055
0056 void __iomem *ioaddr;
0057
0058 unsigned int offset;
0059 };
0060
0061 #endif