summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/time.c
Commit message (Collapse)AuthorAgeFilesLines
* powerpc: apply recent changes to merged codePaul Mackerras2005-10-311-4/+0
| | | | Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix time setting bug on 32-bitPaul Mackerras2005-10-301-6/+8
| | | | | | | | | | | This fixes a bug where settimeofday would set the wrong parameters in do_gtod, resulting in gettimeofday returning a value about 4 hours after the correct time. The bug was that we divided a negative 64-bit value with do_div, which treated it as unsigned and gave us a result that was approximately 1.8e10 too large (since the divisor was 1e9). Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Add support for Book-E timer config to generic_calibrate_decrKumar Gala2005-10-261-0/+11
| | | | | | | | We need to initialize some control SPRS for timers on Book-E before we start taking decrementer interrupts. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Make sure we have an RTC before trying to adjust itKumar Gala2005-10-261-1/+1
| | | | | | | | Its valid for ppc_md.set_rtc_time to be NULL. We need to check that its non-NULL before trying to update the RTC. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix time code for 601 processorsPaul Mackerras2005-10-231-23/+56
| | | | | | | | | | The 601 doesn't have the timebase register; instead it has an RTCL register that counts nanoseconds and wraps at 1000000000, and an RTCU register that counts seconds. This makes the necessary changes for the merged time code to use the RTCL/U registers when the kernel is running on a 601. Signed-off-by: Paul Mackerras <paulus@samba.org>
* ppc64/powerpc: Fix time initialization on SMP systemsPaul Mackerras2005-10-221-13/+1
| | | | | | | | | | | This moves smp_space_timers from arch/ppc64/kernel/smp.c to arch/powerpc/kernel/time.c and makes it initialize last_jiffy[] instead of paca[].next_jiffy_update_tb, since last_jiffy[] is now what the time code uses. It also declares smp_space_timers in include/asm-powerpc/time.h and gets rid of an ifdef in div128_by_32. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix some bugs in the new merged time codePaul Mackerras2005-10-201-1/+1
| | | | | | | | | | I had the sense of the test for when to use the old 601-style RTC registers inverted. pmac_calibrate_decr and via_calibrate_decr weren't setting ppc_tb_freq, on which all the further calculations depended. Lastly, update_gtod was losing the top 32 bits of the new tb_to_xs value. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Move some calculations from xxx_calibrate_decr to time_initPaul Mackerras2005-10-201-15/+12
| | | | | | | | | | Previously the individual xxx_calibrate_decr functions would each print the timebase and cpu frequency and calculate several values such as tb_to_us and tb_to_xs. This moves those printks and calculations into time_init just after the call to the platform's calibrate_decr function. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Merge time.c and asm/time.h.Paul Mackerras2005-10-201-0/+978
We now use the merged time.c for both 32-bit and 64-bit compilation with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32. This removes setup_default_decr (folds its function into time_init) and moves wakeup_decrementer into time.c. This also makes an asm-powerpc/rtc.h. Signed-off-by: Paul Mackerras <paulus@samba.org>
OpenPOWER on IntegriCloud