patch-2.2.0-pre6 linux/include/asm-arm/arch-ebsa285/time.h
Next file: linux/include/asm-arm/arch-ebsa285/uncompress.h
Previous file: linux/include/asm-arm/arch-ebsa285/system.h
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Thu Jan 7 15:51:33 1999
- Orig file:
v2.2.0-pre5/linux/include/asm-arm/arch-ebsa285/time.h
- Orig date:
Tue Dec 22 14:16:58 1998
diff -u --recursive --new-file v2.2.0-pre5/linux/include/asm-arm/arch-ebsa285/time.h linux/include/asm-arm/arch-ebsa285/time.h
@@ -9,24 +9,29 @@
* Changelog:
* 21-Mar-1998 RMK Created
* 27-Aug-1998 PJB CATS support
+ * 28-Dec-1998 APH Made leds optional
*/
#define RTC_PORT(x) (0x72+(x))
#define RTC_ALWAYS_BCD 1
+#include <linux/config.h>
#include <asm/leds.h>
#include <asm/system.h>
#include <linux/mc146818rtc.h>
extern __inline__ unsigned long gettimeoffset (void)
{
- return 0;
+ unsigned long value = LATCH - *CSR_TIMER1_VALUE;
+
+ return (tick * value) / LATCH;
}
extern __inline__ int reset_timer (void)
{
*CSR_TIMER1_CLR = 0;
+#ifdef CONFIG_LEDS
/*
* Do the LEDs thing on EBSA-285 hardware.
*/
@@ -47,7 +52,8 @@
leds_event(led_timer);
}
}
-
+#endif
+
return 1;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov