]> git.sur5r.net Git - u-boot/blobdiff - arch/avr32/cpu/interrupts.c
avr32:portmux: fix setup for macb1
[u-boot] / arch / avr32 / cpu / interrupts.c
index 8406f912246114e77c804d13f41fd4e0c5c6470d..49a00f1c8ca7e4b6e57edb32844dc1f348c0dac1 100644 (file)
@@ -62,13 +62,6 @@ unsigned long long get_ticks(void)
        return ((unsigned long long)hi_now << 32) | lo;
 }
 
-void reset_timer(void)
-{
-       sysreg_write(COUNT, 0);
-       cpu_sync_pipeline();    /* process any pending interrupts */
-       timer_overflow = 0;
-}
-
 unsigned long get_timer(unsigned long base)
 {
        u64 now = get_ticks();
@@ -114,7 +107,7 @@ static int set_interrupt_handler(unsigned int nr, void (*handler)(void),
        return 0;
 }
 
-void timer_init(void)
+int timer_init(void)
 {
        extern void timer_interrupt_handler(void);
        u64 tmp;
@@ -127,8 +120,9 @@ void timer_init(void)
        tb_factor = (u32)tmp;
 
        if (set_interrupt_handler(0, &timer_interrupt_handler, 3))
-               return;
+               return -EINVAL;
 
        /* For all practical purposes, this gives us an overflow interrupt */
        sysreg_write(COMPARE, 0xffffffff);
+       return 0;
 }