From f0f6481d8d82c4451cc0507cd0959ef5167b2cbc Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 17 Nov 2005 16:23:43 +0000 Subject: [PATCH] --- yaml --- r: 14325 b: refs/heads/master c: cd017fbdd33f2d8294b0e0324faa1dc7750b4af0 h: refs/heads/master i: 14323: e2beeb68f90a94eb7ca6e16ec67594b974bfc47f v: v3 --- [refs] | 2 +- trunk/include/linux/ds1742rtc.h | 53 +++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 trunk/include/linux/ds1742rtc.h diff --git a/[refs] b/[refs] index b4c3c4ecb3b2..f0834159122f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 443bf3292f04c53e92bf0588f1aa2c9b421545e2 +refs/heads/master: cd017fbdd33f2d8294b0e0324faa1dc7750b4af0 diff --git a/trunk/include/linux/ds1742rtc.h b/trunk/include/linux/ds1742rtc.h new file mode 100644 index 000000000000..a83cdd1cafc9 --- /dev/null +++ b/trunk/include/linux/ds1742rtc.h @@ -0,0 +1,53 @@ +/* + * ds1742rtc.h - register definitions for the Real-Time-Clock / CMOS RAM + * + * Copyright (C) 1999-2001 Toshiba Corporation + * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org) + * + * Permission is hereby granted to copy, modify and redistribute this code + * in terms of the GNU Library General Public License, Version 2 or later, + * at your option. + */ +#ifndef __LINUX_DS1742RTC_H +#define __LINUX_DS1742RTC_H + +#include + +#define RTC_BRAM_SIZE 0x800 +#define RTC_OFFSET 0x7f8 + +/* + * Register summary + */ +#define RTC_CONTROL (RTC_OFFSET + 0) +#define RTC_CENTURY (RTC_OFFSET + 0) +#define RTC_SECONDS (RTC_OFFSET + 1) +#define RTC_MINUTES (RTC_OFFSET + 2) +#define RTC_HOURS (RTC_OFFSET + 3) +#define RTC_DAY (RTC_OFFSET + 4) +#define RTC_DATE (RTC_OFFSET + 5) +#define RTC_MONTH (RTC_OFFSET + 6) +#define RTC_YEAR (RTC_OFFSET + 7) + +#define RTC_CENTURY_MASK 0x3f +#define RTC_SECONDS_MASK 0x7f +#define RTC_DAY_MASK 0x07 + +/* + * Bits in the Control/Century register + */ +#define RTC_WRITE 0x80 +#define RTC_READ 0x40 + +/* + * Bits in the Seconds register + */ +#define RTC_STOP 0x80 + +/* + * Bits in the Day register + */ +#define RTC_BATT_FLAG 0x80 +#define RTC_FREQ_TEST 0x40 + +#endif /* __LINUX_DS1742RTC_H */