Skip to contentSkip to conversation

MIPS RTC driver again

PATCH New Jun Sun 1 participant 1 message Nov 27, 2001

Subsystems (3)
lore
Share & tools
lore

Jun Sun

author
#0 lore raw

PATCH 1/1 MIPS RTC driver again

In last round of RFC, I heard several voices:

. some similar ones are already there, drivers/macintosh/rtc.c. But we can't really use it unless we modified it to interface with MIPS kernel rtc routines and fix a couple of other minor stuff. Even then it seems a little politically incorrect to use a Macintosh driver for MIPS boards. :-)

. Tom Rini wants to do a universal RTC driver. Cool, we need to wait.

Meanwhile I also heard people who want the driver. So it seems to me it makes sense to check in this driver. Right now there are nine boards using NEW_TIME_C, which can benefit from this driver immediately. I expect more boards will use NEW_TIME_C soon.

So here is my updated patch. Please consider for applying.

Jun

Documentation/Configure.help renamed from Documentation/Configure.help.orig +11 -0
diff -Nru linux/Documentation/Configure.help.orig linux/Documentation/Configure.help
@@ -15163,6 +15163,17 @@
 #EFI Real Time Clock Services
 #CONFIG_EFI_RTC
 
+Generic MIPS RTC Support
+CONFIG_MIPS_RTC
+
+  If your machine is a MIPS machine, this option provides a simple,
+  generic RTC driver for /dev/rtc device.  It only implements two IOCTL 
+  operations of the standard PC RTC driver: RTC_RD_TIME and RTC_SET_TIME.
+  It is sufficient to run hwclock program. 
+
+  You should say Y here if there is no machine-specific RTC driver for your
+  MIPS machine but you do want a simple RTC driver for your RTC device.
+
 Tadpole ANA H8 Support
 CONFIG_H8
   The Hitachi H8/337 is a microcontroller used to deal with the power
drivers/char/Config.in renamed from drivers/char/Config.in.orig +3 -0
diff -Nru linux/drivers/char/Config.in.orig linux/drivers/char/Config.in
@@ -213,6 +213,9 @@
 if [ "$CONFIG_OBSOLETE" = "y" -a "$CONFIG_ALPHA_BOOK1" = "y" ]; then
    bool 'Tadpole ANA H8 Support'  CONFIG_H8
 fi
+if [ "$CONFIG_MIPS" = "y" -a "$CONFIG_NEW_TIME_C" = "y" ]; then
+   tristate 'Generic MIPS RTC Support' CONFIG_MIPS_RTC
+fi
 
 tristate 'Double Talk PC internal speech card support' CONFIG_DTLK
 tristate 'Siemens R3964 line discipline' CONFIG_R3964
drivers/char/Makefile renamed from drivers/char/Makefile.orig +1 -0
diff -Nru linux/drivers/char/Makefile.orig linux/drivers/char/Makefile
@@ -196,6 +196,7 @@
 obj-$(CONFIG_PC110_PAD) += pc110pad.o
 obj-$(CONFIG_RTC) += rtc.o
 obj-$(CONFIG_EFI_RTC) += efirtc.o
+obj-$(CONFIG_MIPS_RTC) += mips_rtc.o
 ifeq ($(CONFIG_PPC),)
   obj-$(CONFIG_NVRAM) += nvram.o
 endif
drivers/char/mips_rtc.c renamed from drivers/char/mips_rtc.c.orig +221 -0

221 lines not on this page · raw message