summaryrefslogtreecommitdiff
path: root/cpu/arm920t/ks8695
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/arm920t/ks8695')
-rw-r--r--cpu/arm920t/ks8695/Makefile3
-rw-r--r--cpu/arm920t/ks8695/timer.c (renamed from cpu/arm920t/ks8695/interrupts.c)12
2 files changed, 6 insertions, 9 deletions
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 @@ include $(TOPDIR)/config.mk
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
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 @@ void reset_timer_masked(void)
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 @@ void udelay(ulong usec)
ulong start = get_timer_masked();
ulong end;
- if (!timer_inited)
- reset_timer();
-
/* Only 1ms resolution :-( */
end = usec / 1000;
while (get_timer(start) < end)