time.c (5bfd643583b2e2a203163fd6b617cd9027054200) time.c (5235afa89a246c9d5ab35996bc38681c474c3ed7)
1/*
2 * Common time routines among all ppc machines.
3 *
4 * Written by Cort Dougan (cort@cs.nmt.edu) to merge
5 * Paul Mackerras' version and mine for PReP and Pmac.
6 * MPC8xx/MBX changes by Dan Malek (dmalek@jlc.net).
7 * Converted for 64-bit by Mike Corrigan (mikejc@us.ibm.com)
8 *

--- 797 unchanged lines hidden (view full) ---

806 if (!get_freq("ibm,extended-clock-frequency", 2, &ppc_proc_freq) &&
807 !get_freq("clock-frequency", 1, &ppc_proc_freq)) {
808
809 printk(KERN_ERR "WARNING: Estimating processor frequency "
810 "(not found)\n");
811 }
812}
813
1/*
2 * Common time routines among all ppc machines.
3 *
4 * Written by Cort Dougan (cort@cs.nmt.edu) to merge
5 * Paul Mackerras' version and mine for PReP and Pmac.
6 * MPC8xx/MBX changes by Dan Malek (dmalek@jlc.net).
7 * Converted for 64-bit by Mike Corrigan (mikejc@us.ibm.com)
8 *

--- 797 unchanged lines hidden (view full) ---

806 if (!get_freq("ibm,extended-clock-frequency", 2, &ppc_proc_freq) &&
807 !get_freq("clock-frequency", 1, &ppc_proc_freq)) {
808
809 printk(KERN_ERR "WARNING: Estimating processor frequency "
810 "(not found)\n");
811 }
812}
813
814int update_persistent_clock(struct timespec now)
814int update_persistent_clock64(struct timespec64 now)
815{
816 struct rtc_time tm;
817
818 if (!ppc_md.set_rtc_time)
819 return -ENODEV;
820
815{
816 struct rtc_time tm;
817
818 if (!ppc_md.set_rtc_time)
819 return -ENODEV;
820
821 to_tm(now.tv_sec + 1 + timezone_offset, &tm);
822 tm.tm_year -= 1900;
823 tm.tm_mon -= 1;
821 rtc_time64_to_tm(now.tv_sec + 1 + timezone_offset, &tm);
824
825 return ppc_md.set_rtc_time(&tm);
826}
827
828static void __read_persistent_clock(struct timespec64 *ts)
829{
830 struct rtc_time tm;
831 static int first = 1;

--- 463 unchanged lines hidden ---
822
823 return ppc_md.set_rtc_time(&tm);
824}
825
826static void __read_persistent_clock(struct timespec64 *ts)
827{
828 struct rtc_time tm;
829 static int first = 1;

--- 463 unchanged lines hidden ---