X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cpu%2Fnios%2Finterrupts.c;h=75e491d8436cbbc1f3bd3e432c42d6da111f039b;hb=5798b1c4650e9a8713c95b25c1e669a2bc80a97b;hp=981b8f7d80f140b1398964f18568eb93daacf159;hpb=4a5517094dd30bb1f271403b62e23053301668e6;p=oweals%2Fu-boot.git diff --git a/cpu/nios/interrupts.c b/cpu/nios/interrupts.c index 981b8f7d80..75e491d843 100644 --- a/cpu/nios/interrupts.c +++ b/cpu/nios/interrupts.c @@ -30,6 +30,10 @@ #include #include #include +#include +#ifdef CONFIG_STATUS_LED +#include +#endif /****************************************************************************/ @@ -51,6 +55,7 @@ void reset_timer (void) ulong get_timer (ulong base) { + WATCHDOG_RESET (); return (timestamp - base); } @@ -72,6 +77,9 @@ void timer_interrupt (struct pt_regs *regs) nios_timer_t *tmr = (nios_timer_t *)CFG_NIOS_TMRBASE; tmr->status = 0; timestamp += CFG_NIOS_TMRMS; +#ifdef CONFIG_STATUS_LED + status_led_tick(timestamp); +#endif } #endif @@ -122,6 +130,10 @@ int interrupt_init (void) tmr->control &= ~NIOS_TIMER_ITO; tmr->control |= NIOS_TIMER_STOP; +#if defined(CFG_NIOS_TMRCNT) + tmr->periodl = CFG_NIOS_TMRCNT & 0xffff; + tmr->periodh = (CFG_NIOS_TMRCNT >> 16) & 0xffff; +#endif #endif for (vec=0; vec<64; vec++ ) { @@ -161,13 +173,13 @@ void irq_install_handler (int vec, interrupt_handler_t *handler, void *arg) } /*************************************************************************/ -#if (CONFIG_COMMANDS & CFG_CMD_IRQ) +#if defined(CONFIG_CMD_IRQ) int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { int vec; printf ("\nInterrupt-Information:\n"); - printf ("Nr Routine Arg CouIt's ok to cnt\n"); + printf ("Nr Routine Arg Count\n"); for (vec=0; vec<64; vec++) { if (irq_vecs[vec].handler != NULL) { @@ -181,4 +193,4 @@ int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return (0); } -#endif /* CONFIG_COMMANDS & CFG_CMD_IRQ */ +#endif