Documentation: SubmittingDrivers: Resources
[safe/jmp/linux-2.6] / arch / m68k / mac / misc.c
index 99dd2c1..0f118ca 100644 (file)
@@ -2,14 +2,12 @@
  * Miscellaneous Mac68K-specific stuff
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/miscdevice.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
-#include <linux/slab.h>
 #include <linux/time.h>
 #include <linux/rtc.h>
 #include <linux/mm.h>
@@ -36,7 +34,6 @@
 
 #define RTC_OFFSET 2082844800
 
-extern struct mac_booter_data mac_bi_data;
 static void (*rom_reset)(void);
 
 #ifdef CONFIG_ADB_CUDA
@@ -94,7 +91,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;
@@ -149,7 +146,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, ...);
 
@@ -572,12 +569,13 @@ void mac_reset(void)
                /* make a 1-to-1 mapping, using the transparent tran. reg. */
                unsigned long virt = (unsigned long) mac_reset;
                unsigned long phys = virt_to_phys(mac_reset);
+               unsigned long addr = (phys&0xFF000000)|0x8777;
                unsigned long offset = phys-virt;
                local_irq_disable(); /* lets not screw this up, ok? */
                __asm__ __volatile__(".chip 68030\n\t"
                                     "pmove %0,%/tt0\n\t"
                                     ".chip 68k"
-                                    : : "m" ((phys&0xFF000000)|0x8777));
+                                    : : "m" (addr));
                /* Now jump to physical address so we can disable MMU */
                __asm__ __volatile__(
                     ".chip 68030\n\t"
@@ -717,13 +715,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 +745,6 @@ int mac_hwclk(int op, struct rtc_time *t)
                case MAC_ADB_IISI:
                        maciisi_write_time(now);
                }
-#endif
        }
        return 0;
 }