diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
commit | f1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch) | |
tree | 562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /include/asm-ppc/time.h | |
parent | 00f11569ac8ca73cbcdef8822de1583e79aee571 (diff) |
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'include/asm-ppc/time.h')
-rw-r--r-- | include/asm-ppc/time.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h new file mode 100644 index 000000000..05d791546 --- /dev/null +++ b/include/asm-ppc/time.h @@ -0,0 +1,42 @@ +/* + * $Id: time.h,v 1.12 1999/08/27 04:21:23 cort Exp $ + * Common time prototypes and such for all ppc machines. + * + * Written by Cort Dougan (cort@cs.nmt.edu) to merge + * Paul Mackerras' version and mine for PReP and Pmac. + */ + +#include <linux/config.h> +#include <linux/mc146818rtc.h> + +#include <asm/processor.h> + +/* time.c */ +extern unsigned decrementer_count; +extern unsigned count_period_num; +extern unsigned count_period_den; +extern unsigned long mktime(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int, unsigned int); +extern void to_tm(int tim, struct rtc_time * tm); +extern time_t last_rtc_update; + +int via_calibrate_decr(void); + +/* Accessor functions for the decrementer register. */ +static __inline__ unsigned int get_dec(void) +{ +#if defined(CONFIG_4xx) + return (mfspr(SPRN_PIT)); +#else + return (mfspr(SPRN_DEC)); +#endif +} + +static __inline__ void set_dec(unsigned int val) +{ +#if defined(CONFIG_4xx) + mtspr(SPRN_PIT, val); +#else + mtspr(SPRN_DEC, val); +#endif +} |