]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - cpu/nios2/interrupts.c
nios2: Fix outx/writex parameter order in io.h
[karo-tx-uboot.git] / cpu / nios2 / interrupts.c
index 1c3566ebf95610e2e171d02775a9b2cb0c59f183..5c3b5e6146ac7c8e63c037ffbd58d60a0059e5ff 100644 (file)
@@ -81,7 +81,7 @@ void tmr_isr (void *arg)
        /* Interrupt is cleared by writing anything to the
         * status register.
         */
-       writel (&tmr->status, 0);
+       writel (0, &tmr->status);
        timestamp += CONFIG_SYS_NIOS_TMRMS;
 #ifdef CONFIG_STATUS_LED
        status_led_tick(timestamp);
@@ -92,16 +92,16 @@ static void tmr_init (void)
 {
        nios_timer_t *tmr =(nios_timer_t *)CONFIG_SYS_NIOS_TMRBASE;
 
-       writel (&tmr->status, 0);
-       writel (&tmr->control, 0);
-       writel (&tmr->control, NIOS_TIMER_STOP);
+       writel (0, &tmr->status);
+       writel (0, &tmr->control);
+       writel (NIOS_TIMER_STOP, &tmr->control);
 
 #if defined(CONFIG_SYS_NIOS_TMRCNT)
-       writel (&tmr->periodl, CONFIG_SYS_NIOS_TMRCNT & 0xffff);
-       writel (&tmr->periodh, (CONFIG_SYS_NIOS_TMRCNT >> 16) & 0xffff);
+       writel (CONFIG_SYS_NIOS_TMRCNT & 0xffff, &tmr->periodl);
+       writel ((CONFIG_SYS_NIOS_TMRCNT >> 16) & 0xffff, &tmr->periodh);
 #endif
-       writel (&tmr->control, NIOS_TIMER_ITO | NIOS_TIMER_CONT |
-                         NIOS_TIMER_START );
+       writel (NIOS_TIMER_ITO | NIOS_TIMER_CONT | NIOS_TIMER_START,
+                       &tmr->control);
        irq_install_handler (CONFIG_SYS_NIOS_TMRIRQ, tmr_isr, (void *)tmr);
 }