Commit 5dbab45d authored by Kumar Gala's avatar Kumar Gala Committed by Linus Torvalds

[PATCH] ppc32: Add support for the Dallas 1553 RTC/NVRAM

This patch adds support for the Dallas 1553 RTC/NVRAM.
Signed-off-by: default avatarKumar Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 74d11d4c
......@@ -287,6 +287,7 @@ todc_get_rtc_time(void)
limit = 1;
switch (todc_info->rtc_type) {
case TODC_TYPE_DS1553:
case TODC_TYPE_DS1557:
case TODC_TYPE_DS1743:
case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */
......@@ -322,6 +323,7 @@ todc_get_rtc_time(void)
if (todc_info->rtc_type != TODC_TYPE_MC146818) {
switch (todc_info->rtc_type) {
case TODC_TYPE_DS1553:
case TODC_TYPE_DS1557:
case TODC_TYPE_DS1743:
case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */
......@@ -418,6 +420,7 @@ static unsigned char __init todc_read_timereg(int addr)
unsigned char save_control = 0, val;
switch (todc_info->rtc_type) {
case TODC_TYPE_DS1553:
case TODC_TYPE_DS1557:
case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */
case TODC_TYPE_DS1747:
......@@ -432,6 +435,7 @@ static unsigned char __init todc_read_timereg(int addr)
val = todc_read_val(addr);
switch (todc_info->rtc_type) {
case TODC_TYPE_DS1553:
case TODC_TYPE_DS1557:
case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */
case TODC_TYPE_DS1747:
......
......@@ -98,6 +98,7 @@ typedef struct {
#define TODC_TYPE_PC97307 10 /* PC97307 internal RTC */
#define TODC_TYPE_DS1557 11 /* Dallas DS1557 RTC */
#define TODC_TYPE_DS17285 12 /* Dallas DS17285 RTC */
#define TODC_TYPE_DS1553 13 /* Dallas DS1553 RTC */
#define TODC_TYPE_MC146818 100 /* Leave room for m48txx's */
/*
......@@ -208,6 +209,28 @@ typedef struct {
#define TODC_TYPE_DS1501_NVRAM_ADDR_REG 0x10
#define TODC_TYPE_DS1501_NVRAM_DATA_REG 0x13
#define TODC_TYPE_DS1553_NVRAM_SIZE 0x1ff0
#define TODC_TYPE_DS1553_SW_FLAGS 0
#define TODC_TYPE_DS1553_YEAR 0x1fff
#define TODC_TYPE_DS1553_MONTH 0x1ffe
#define TODC_TYPE_DS1553_DOM 0x1ffd /* Day of Month */
#define TODC_TYPE_DS1553_DOW 0x1ffc /* Day of Week */
#define TODC_TYPE_DS1553_HOURS 0x1ffb
#define TODC_TYPE_DS1553_MINUTES 0x1ffa
#define TODC_TYPE_DS1553_SECONDS 0x1ff9
#define TODC_TYPE_DS1553_CNTL_B 0x1ff9
#define TODC_TYPE_DS1553_CNTL_A 0x1ff8 /* control_a R/W regs */
#define TODC_TYPE_DS1553_WATCHDOG 0x1ff7
#define TODC_TYPE_DS1553_INTERRUPTS 0x1ff6
#define TODC_TYPE_DS1553_ALARM_DATE 0x1ff5
#define TODC_TYPE_DS1553_ALARM_HOUR 0x1ff4
#define TODC_TYPE_DS1553_ALARM_MINUTES 0x1ff3
#define TODC_TYPE_DS1553_ALARM_SECONDS 0x1ff2
#define TODC_TYPE_DS1553_CENTURY 0x1ff8
#define TODC_TYPE_DS1553_FLAGS 0x1ff0
#define TODC_TYPE_DS1553_NVRAM_ADDR_REG 0
#define TODC_TYPE_DS1553_NVRAM_DATA_REG 0
#define TODC_TYPE_DS1557_NVRAM_SIZE 0x7fff0
#define TODC_TYPE_DS1557_SW_FLAGS 0
#define TODC_TYPE_DS1557_YEAR 0x7ffff
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment