]> git.sur5r.net Git - u-boot/blobdiff - cpu/at32ap/interrupts.c
AVR32: Resource management rewrite
[u-boot] / cpu / at32ap / interrupts.c
index d720cfa942b32edc9622326aa7ae5fa8421de009..85420a4248a89c5a3d6074031b346cec6854c98d 100644 (file)
@@ -27,7 +27,7 @@
 #include <asm/processor.h>
 #include <asm/sysreg.h>
 
-#include <asm/arch/platform.h>
+#include <asm/arch/memory-map.h>
 
 #define HANDLER_MASK   0x00ffffff
 #define INTLEV_SHIFT   30
@@ -44,8 +44,6 @@ volatile unsigned long timer_overflow;
  */
 static unsigned long tb_factor;
 
-static const struct device *intc_dev;
-
 unsigned long get_tbclk(void)
 {
        return gd->cpu_hz;
@@ -126,7 +124,7 @@ static int set_interrupt_handler(unsigned int nr, void (*handler)(void),
 
        intpr = (handler_addr & HANDLER_MASK);
        intpr |= (priority & INTLEV_MASK) << INTLEV_SHIFT;
-       writel(intpr, intc_dev->regs + 4 * nr);
+       writel(intpr, (void *)INTC_BASE + 4 * nr);
 
        return 0;
 }
@@ -143,10 +141,7 @@ void timer_init(void)
        do_div(tmp, gd->cpu_hz);
        tb_factor = (u32)tmp;
 
-       intc_dev = get_device(DEVICE_INTC);
-
-       if (!intc_dev
-           || set_interrupt_handler(0, &timer_interrupt_handler, 3))
+       if (set_interrupt_handler(0, &timer_interrupt_handler, 3))
                return;
 
        /* For all practical purposes, this gives us an overflow interrupt */