patch-2.3.43 linux/include/asm-arm/arch-ebsa110/time.h

Next file: linux/include/asm-arm/arch-ebsa285/time.h
Previous file: linux/include/asm-arm/arch-cl7500/time.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.42/linux/include/asm-arm/arch-ebsa110/time.h linux/include/asm-arm/arch-ebsa110/time.h
@@ -12,11 +12,8 @@
  *  28-Dec-1998	APH	Made leds code optional
  */
 
-#include <linux/config.h>
 #include <asm/leds.h>
 
-#define IRQ_TIMER IRQ_EBSA110_TIMER0
-
 #define MCLK_47_8
 
 #if defined(MCLK_42_3)
@@ -32,52 +29,27 @@
 #define PIT1_COUNT 0x85A1
 #define DIVISOR 2
 #endif
- 
-extern __inline__ unsigned long gettimeoffset (void)
-{
-	return 0;
-}
 
 static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	*PIT_T1 = (PIT1_COUNT) & 0xff;
 	*PIT_T1 = (PIT1_COUNT) >> 8;
 
-#ifdef CONFIG_LEDS
-	{
-		static int count = 50;
-		if (--count == 0) {
-			count = 50;
-			leds_event(led_timer);
-		}
-	}
-#endif
-
-	{
 #ifdef DIVISOR
+	{
 		static unsigned int divisor;
 
-		if (divisor-- == 0) {
-			divisor = DIVISOR - 1;
-#else
-		{
-#endif
-			do_timer(regs);
-		}
+		if (divisor--)
+			return;
+		divisor = DIVISOR - 1;
 	}
+#endif
+	do_leds();
+	do_timer(regs);
 }
 
-static struct irqaction timerirq = {
-	timer_interrupt,
-	0,
-	0,
-	"timer",
-	NULL,
-	NULL
-};
-
 /*
- * Set up timer interrupt, and return the current time in seconds.
+ * Set up timer interrupt.
  */
 extern __inline__ void setup_timer(void)
 {
@@ -93,12 +65,9 @@
 	*PIT_T1 = (PIT1_COUNT) & 0xff;
 	*PIT_T1 = (PIT1_COUNT) >> 8;
 
-	/*
-	 * Default the date to 1 Jan 1970 0:0:0
-	 * You will have to run a time daemon to set the
-	 * clock correctly at bootup
-	 */
-	xtime.tv_sec = mktime(1970, 1, 1, 0, 0, 0);
+	timer_irq.handler = timer_interrupt;
 
-	setup_arm_irq(IRQ_TIMER, &timerirq);
+	setup_arm_irq(IRQ_EBSA110_TIMER0, &timer_irq);
 }
+
+

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)