summaryrefslogtreecommitdiffstats
path: root/arch/m68k/platform/68328/timers.c
diff options
context:
space:
mode:
authorGreg Ungerer2012-01-23 04:25:56 +0100
committerGreg Ungerer2012-03-05 00:43:03 +0100
commit9517746131f62294ddd922bcd288415be5104c23 (patch)
tree1ca5433e9d25c1c2f34197a52bfa15fdec163fac /arch/m68k/platform/68328/timers.c
parentm68knommu: remove reduntant definitions of _ramvec (diff)
downloadkernel-qcow2-linux-9517746131f62294ddd922bcd288415be5104c23.tar.gz
kernel-qcow2-linux-9517746131f62294ddd922bcd288415be5104c23.tar.xz
kernel-qcow2-linux-9517746131f62294ddd922bcd288415be5104c23.zip
m68knommu: make persistent clock code consistent with m68k
The read_persistent_clock() code is different on m68knommu, for really no reason. With a few changes to support function names and some code re-organization the code can be made the same. This will make it easier to merge the arch/m68k/kernel/time.c for m68k and m68knommu in a future patch. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/platform/68328/timers.c')
-rw-r--r--arch/m68k/platform/68328/timers.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/m68k/platform/68328/timers.c b/arch/m68k/platform/68328/timers.c
index f2678866067b..b15ddef1ec76 100644
--- a/arch/m68k/platform/68328/timers.c
+++ b/arch/m68k/platform/68328/timers.c
@@ -20,6 +20,7 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/clocksource.h>
+#include <linux/rtc.h>
#include <asm/setup.h>
#include <asm/system.h>
#include <asm/pgtable.h>
@@ -119,14 +120,17 @@ void hw_timer_init(void)
/***************************************************************************/
-void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec)
+int m68328_hwclk(int set, struct rtc_time *t)
{
- long now = RTCTIME;
-
- *year = *mon = *day = 1;
- *hour = (now >> 24) % 24;
- *min = (now >> 16) % 60;
- *sec = now % 60;
+ if (!set) {
+ long now = RTCTIME;
+ t->tm_year = t->tm_mon = t->tm_mday = 1;
+ t->tm_hour = (now >> 24) % 24;
+ t->tm_min = (now >> 16) % 60;
+ t->tm_sec = now % 60;
+ }
+
+ return 0;
}
/***************************************************************************/