arm: timer and interrupt init rework

actually the timer init use the interrupt_init as init callback
which make the interrupt and timer implementation difficult to follow

so now rename it as int timer_init(void) and use interrupt_init for interrupt

btw also remane the corresponding file to the functionnality implemented

as ixp arch implement two timer - one based on interrupt - so all the timer
related code is moved to timer.c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/cpu/arm920t/ks8695/Makefile b/cpu/arm920t/ks8695/Makefile
index f6b0063..f53fdc2 100644
--- a/cpu/arm920t/ks8695/Makefile
+++ b/cpu/arm920t/ks8695/Makefile
@@ -25,9 +25,10 @@
 
 LIB	= $(obj)lib$(SOC).a
 
-COBJS	= interrupts.o
 SOBJS	= lowlevel_init.o
 
+COBJS	= timer.o
+
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
 
diff --git a/cpu/arm920t/ks8695/interrupts.c b/cpu/arm920t/ks8695/timer.c
similarity index 93%
rename from cpu/arm920t/ks8695/interrupts.c
rename to cpu/arm920t/ks8695/timer.c
index 883d689..22987bc 100644
--- a/cpu/arm920t/ks8695/interrupts.c
+++ b/cpu/arm920t/ks8695/timer.c
@@ -29,13 +29,13 @@
 #define	ks8695_read(a)    *((volatile ulong *) (KS8695_IO_BASE + (a)))
 #define	ks8695_write(a,v) *((volatile ulong *) (KS8695_IO_BASE + (a))) = (v)
 
-int timer_inited;
 ulong timer_ticks;
 
-int interrupt_init (void)
+int timer_init (void)
 {
-	/* nothing happens here - we don't setup any IRQs */
-	return (0);
+	reset_timer();
+
+	return 0;
 }
 
 /*
@@ -53,7 +53,6 @@
 	ks8695_write(KS8695_TIMER1_PCOUNT, TIMER_PULSE);
 	ks8695_write(KS8695_TIMER_CTRL, 0x2);
 	timer_ticks = 0;
-	timer_inited++;
 }
 
 void reset_timer(void)
@@ -87,9 +86,6 @@
 	ulong start = get_timer_masked();
 	ulong end;
 
-	if (!timer_inited)
-		reset_timer();
-
 	/* Only 1ms resolution :-( */
 	end = usec / 1000;
 	while (get_timer(start) < end)