Commit 5d119c3c authored by Ralf Bächle's avatar Ralf Bächle Committed by Linus Torvalds

[PATCH] DS1286 cleanups

Remove #ifdef'ed hooks for the DS1286 driver through the kernel.  While
cleaning make it work as a module also and add back the core of the driver
got lost when drivers/sgi/ was shredded.
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d6d8fbc4
......@@ -583,7 +583,7 @@ CONFIG_WATCHDOG=y
CONFIG_INDYDOG=m
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
CONFIG_SGI_DS1286=y
CONFIG_SGI_DS1286=m
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
......
......@@ -583,7 +583,7 @@ CONFIG_WATCHDOG=y
CONFIG_INDYDOG=m
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
CONFIG_SGI_DS1286=y
CONFIG_SGI_DS1286=m
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
......
......@@ -753,6 +753,17 @@ config RTC
To compile this driver as a module, choose M here: the
module will be called rtc.
config SGI_DS1286
tristate "SGI DS1286 RTC support"
depends on SGI_IP22
help
If you say Y here and create a character special file /dev/rtc with
major number 10 and minor number 135 using mknod ("man mknod"), you
will get access to the real time clock built into your computer.
Every SGI has such a clock built in. It reports status information
via the file /proc/rtc and its behaviour is set by various ioctls on
/dev/rtc.
config GEN_RTC
tristate "Generic /dev/rtc emulation"
depends on RTC!=y && !IA64
......
......@@ -56,6 +56,7 @@ obj-$(CONFIG_RTC) += rtc.o
obj-$(CONFIG_HPET) += hpet.o
obj-$(CONFIG_GEN_RTC) += genrtc.o
obj-$(CONFIG_EFI_RTC) += efirtc.o
obj-$(CONFIG_SGI_DS1286) += ds1286.o
ifeq ($(CONFIG_GENERIC_NVRAM),y)
obj-$(CONFIG_NVRAM) += generic_nvram.o
else
......
This diff is collapsed.
......@@ -65,7 +65,6 @@ static unsigned char misc_minors[DYNAMIC_MINORS / 8];
extern int rtc_DP8570A_init(void);
extern int rtc_MK48T08_init(void);
extern int ds1286_init(void);
extern int pmu_device_init(void);
extern int tosh_init(void);
extern int i8k_init(void);
......@@ -314,9 +313,6 @@ static int __init misc_init(void)
#ifdef CONFIG_BVME6000
rtc_DP8570A_init();
#endif
#ifdef CONFIG_SGI_DS1286
ds1286_init();
#endif
#ifdef CONFIG_PMAC_PBOOK
pmu_device_init();
#endif
......
......@@ -66,9 +66,6 @@ extern int get_filesystem_list(char *);
extern int get_exec_domain_list(char *);
extern int get_dma_list(char *);
extern int get_locks_status (char *, char **, off_t, int);
#ifdef CONFIG_SGI_DS1286
extern int get_ds1286_status(char *);
#endif
static int proc_calc_metrics(char *page, char **start, off_t off,
int count, int *eof, int len)
......@@ -528,15 +525,6 @@ static int cmdline_read_proc(char *page, char **start, off_t off,
return proc_calc_metrics(page, start, off, count, eof, len);
}
#ifdef CONFIG_SGI_DS1286
static int ds1286_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
int len = get_ds1286_status(page);
return proc_calc_metrics(page, start, off, count, eof, len);
}
#endif
static int locks_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
......@@ -670,9 +658,6 @@ void __init proc_misc_init(void)
{"devices", devices_read_proc},
{"filesystems", filesystems_read_proc},
{"cmdline", cmdline_read_proc},
#ifdef CONFIG_SGI_DS1286
{"rtc", ds1286_read_proc},
#endif
{"locks", locks_read_proc},
{"execdomains", execdomains_read_proc},
{NULL,}
......
/*
* Copyright (C) 1998, 1999, 2003 Ralf Baechle
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#ifndef __LINUX_DS1286_H
#define __LINUX_DS1286_H
#include <asm/ds1286.h>
/**********************************************************************
* register summary
**********************************************************************/
#define RTC_HUNDREDTH_SECOND 0
#define RTC_SECONDS 1
#define RTC_MINUTES 2
#define RTC_MINUTES_ALARM 3
#define RTC_HOURS 4
#define RTC_HOURS_ALARM 5
#define RTC_DAY 6
#define RTC_DAY_ALARM 7
#define RTC_DATE 8
#define RTC_MONTH 9
#define RTC_YEAR 10
#define RTC_CMD 11
#define RTC_WHSEC 12
#define RTC_WSEC 13
#define RTC_UNUSED 14
/* RTC_*_alarm is always true if 2 MSBs are set */
# define RTC_ALARM_DONT_CARE 0xC0
/*
* Bits in the month register
*/
#define RTC_EOSC 0x80
#define RTC_ESQW 0x40
/*
* Bits in the Command register
*/
#define RTC_TDF 0x01
#define RTC_WAF 0x02
#define RTC_TDM 0x04
#define RTC_WAM 0x08
#define RTC_PU_LVL 0x10
#define RTC_IBH_LO 0x20
#define RTC_IPSW 0x40
#define RTC_TE 0x80
#endif /* __LINUX_DS1286_H */
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