m68k: Reinstate mac rtc
authorFinn Thain <fthain@telegraphics.com.au>
Tue, 18 Nov 2008 19:45:20 +0000 (20:45 +0100)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 28 Dec 2008 19:00:00 +0000 (20:00 +0100)
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>
arch/m68k/mac/config.c
arch/m68k/mac/misc.c

index c45e18449f321b820f08dc12409dfadc0083cf60..8819b97be32401b096587de6dcdda41e504a1749 100644 (file)
@@ -162,10 +162,7 @@ void __init config_mac(void)
        mach_init_IRQ = mac_init_IRQ;
        mach_get_model = mac_get_model;
        mach_gettimeoffset = mac_gettimeoffset;
-#warning move to adb/via init
-#if 0
        mach_hwclk = mac_hwclk;
-#endif
        mach_set_clock_mmss = mac_set_clock_mmss;
        mach_reset = mac_reset;
        mach_halt = mac_poweroff;
index 56d1f5676ade43628f578c8786dd1e3bf7d1f818..a44c7086ab39a3b9352f2b3c5f0202b9e57bd471 100644 (file)
@@ -93,7 +93,7 @@ static void cuda_write_pram(int offset, __u8 data)
 #define cuda_write_pram NULL
 #endif
 
-#ifdef CONFIG_ADB_PMU68K
+#if 0 /* def CONFIG_ADB_PMU68K */
 static long pmu_read_time(void)
 {
        struct adb_request req;
@@ -148,7 +148,7 @@ static void pmu_write_pram(int offset, __u8 data)
 #define pmu_write_pram NULL
 #endif
 
-#ifdef CONFIG_ADB_MACIISI
+#if 0 /* def CONFIG_ADB_MACIISI */
 extern int maciisi_request(struct adb_request *req,
                        void (*done)(struct adb_request *), int nbytes, ...);
 
@@ -717,13 +717,18 @@ int mac_hwclk(int op, struct rtc_time *t)
                unmktime(now, 0,
                         &t->tm_year, &t->tm_mon, &t->tm_mday,
                         &t->tm_hour, &t->tm_min, &t->tm_sec);
+#if 0
                printk("mac_hwclk: read %04d-%02d-%-2d %02d:%02d:%02d\n",
-                       t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
+                       t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
+                       t->tm_hour, t->tm_min, t->tm_sec);
+#endif
        } else { /* write */
+#if 0
                printk("mac_hwclk: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n",
-                       t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
+                       t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
+                       t->tm_hour, t->tm_min, t->tm_sec);
+#endif
 
-#if 0  /* it trashes my rtc */
                now = mktime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
                             t->tm_hour, t->tm_min, t->tm_sec);
 
@@ -742,7 +747,6 @@ int mac_hwclk(int op, struct rtc_time *t)
                case MAC_ADB_IISI:
                        maciisi_write_time(now);
                }
-#endif
        }
        return 0;
 }