#include <asm/ptrace.h>
#include <common.h>
#include <command.h>
+#include <watchdog.h>
+#ifdef CONFIG_STATUS_LED
+#include <status_led.h>
+#endif
/****************************************************************************/
ulong get_timer (ulong base)
{
+ WATCHDOG_RESET ();
return (timestamp - base);
}
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
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++ ) {
}
/*************************************************************************/
-#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) {
return (0);
}
-#endif /* CONFIG_COMMANDS & CFG_CMD_IRQ */
+#endif