aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2008-11-18 14:45:20 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2008-12-28 14:00:00 -0500
commit40f7f9c1c22aef049ed7339d9e45624aa980a1a0 (patch)
treee7a8b0a840ef082c5638eaba4e48833a4ca9339a /arch
parent4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff)
m68k: Reinstate mac rtc
Reinstate the Mac hardware clock for CUDA ADB and Mac II ADB models. It doesn't work properly on Mac IIsi ADB and PMU ADB yet, so leave them out. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/m68k/mac/config.c3
-rw-r--r--arch/m68k/mac/misc.c16
2 files changed, 10 insertions, 9 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index c45e18449f32..8819b97be324 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -162,10 +162,7 @@ void __init config_mac(void)
162 mach_init_IRQ = mac_init_IRQ; 162 mach_init_IRQ = mac_init_IRQ;
163 mach_get_model = mac_get_model; 163 mach_get_model = mac_get_model;
164 mach_gettimeoffset = mac_gettimeoffset; 164 mach_gettimeoffset = mac_gettimeoffset;
165#warning move to adb/via init
166#if 0
167 mach_hwclk = mac_hwclk; 165 mach_hwclk = mac_hwclk;
168#endif
169 mach_set_clock_mmss = mac_set_clock_mmss; 166 mach_set_clock_mmss = mac_set_clock_mmss;
170 mach_reset = mac_reset; 167 mach_reset = mac_reset;
171 mach_halt = mac_poweroff; 168 mach_halt = mac_poweroff;
diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c
index 56d1f5676ade..a44c7086ab39 100644
--- a/arch/m68k/mac/misc.c
+++ b/arch/m68k/mac/misc.c
@@ -93,7 +93,7 @@ static void cuda_write_pram(int offset, __u8 data)
93#define cuda_write_pram NULL 93#define cuda_write_pram NULL
94#endif 94#endif
95 95
96#ifdef CONFIG_ADB_PMU68K 96#if 0 /* def CONFIG_ADB_PMU68K */
97static long pmu_read_time(void) 97static long pmu_read_time(void)
98{ 98{
99 struct adb_request req; 99 struct adb_request req;
@@ -148,7 +148,7 @@ static void pmu_write_pram(int offset, __u8 data)
148#define pmu_write_pram NULL 148#define pmu_write_pram NULL
149#endif 149#endif
150 150
151#ifdef CONFIG_ADB_MACIISI 151#if 0 /* def CONFIG_ADB_MACIISI */
152extern int maciisi_request(struct adb_request *req, 152extern int maciisi_request(struct adb_request *req,
153 void (*done)(struct adb_request *), int nbytes, ...); 153 void (*done)(struct adb_request *), int nbytes, ...);
154 154
@@ -717,13 +717,18 @@ int mac_hwclk(int op, struct rtc_time *t)
717 unmktime(now, 0, 717 unmktime(now, 0,
718 &t->tm_year, &t->tm_mon, &t->tm_mday, 718 &t->tm_year, &t->tm_mon, &t->tm_mday,
719 &t->tm_hour, &t->tm_min, &t->tm_sec); 719 &t->tm_hour, &t->tm_min, &t->tm_sec);
720#if 0
720 printk("mac_hwclk: read %04d-%02d-%-2d %02d:%02d:%02d\n", 721 printk("mac_hwclk: read %04d-%02d-%-2d %02d:%02d:%02d\n",
721 t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); 722 t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
723 t->tm_hour, t->tm_min, t->tm_sec);
724#endif
722 } else { /* write */ 725 } else { /* write */
726#if 0
723 printk("mac_hwclk: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n", 727 printk("mac_hwclk: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n",
724 t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); 728 t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
729 t->tm_hour, t->tm_min, t->tm_sec);
730#endif
725 731
726#if 0 /* it trashes my rtc */
727 now = mktime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, 732 now = mktime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
728 t->tm_hour, t->tm_min, t->tm_sec); 733 t->tm_hour, t->tm_min, t->tm_sec);
729 734
@@ -742,7 +747,6 @@ int mac_hwclk(int op, struct rtc_time *t)
742 case MAC_ADB_IISI: 747 case MAC_ADB_IISI:
743 maciisi_write_time(now); 748 maciisi_write_time(now);
744 } 749 }
745#endif
746 } 750 }
747 return 0; 751 return 0;
748} 752}