]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/powermac/time.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-2.6 into lvs-next-2.6
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / powermac / time.c
index a4173906e94525a56184ece0d3d1db89e4d66bf3..bbbefd64ab5991f3c30c5e7d34a074a3e224d326 100644 (file)
@@ -84,12 +84,14 @@ long __init pmac_time_init(void)
        return delta;
 }
 
+#if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU)
 static void to_rtc_time(unsigned long now, struct rtc_time *tm)
 {
        to_tm(now, tm);
        tm->tm_year -= 1900;
        tm->tm_mon -= 1;
 }
+#endif
 
 static unsigned long from_rtc_time(struct rtc_time *tm)
 {
@@ -297,49 +299,11 @@ int __init via_calibrate_decr(void)
 }
 #endif
 
-#ifdef CONFIG_PM
-/*
- * Reset the time after a sleep.
- */
-static int
-time_sleep_notify(struct pmu_sleep_notifier *self, int when)
-{
-       static unsigned long time_diff;
-       unsigned long flags;
-       unsigned long seq;
-       struct timespec tv;
-
-       switch (when) {
-       case PBOOK_SLEEP_NOW:
-               do {
-                       seq = read_seqbegin_irqsave(&xtime_lock, flags);
-                       time_diff = xtime.tv_sec - pmac_get_boot_time();
-               } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
-               break;
-       case PBOOK_WAKE:
-               tv.tv_sec = pmac_get_boot_time() + time_diff;
-               tv.tv_nsec = 0;
-               do_settimeofday(&tv);
-               break;
-       }
-       return PBOOK_SLEEP_OK;
-}
-
-static struct pmu_sleep_notifier time_sleep_notifier = {
-       time_sleep_notify, SLEEP_LEVEL_MISC,
-};
-#endif /* CONFIG_PM */
-
 /*
  * Query the OF and get the decr frequency.
  */
 void __init pmac_calibrate_decr(void)
 {
-#if defined(CONFIG_PM) && defined(CONFIG_ADB_PMU)
-       /* XXX why here? */
-       pmu_register_sleep_notifier(&time_sleep_notifier);
-#endif
-
        generic_calibrate_decr();
 
 #ifdef CONFIG_PPC32