8 #include <linux/timex.h>
9 #include <linux/time.h>
13 #include <linux/sched.h>
17 #include <asm/types.h>
18 #include <asm/signal.h>
20 #include <asm/delay.h>
22 #include <asm/irq_regs.h>
24 #include <hwregs/reg_map.h>
26 #include <hwregs/timer_defs.h>
27 #include <hwregs/intr_vect_defs.h>
28 #ifdef CONFIG_CRIS_MACH_ARTPEC3
33 #define ETRAX_WD_KEY_MASK 0x7F
34 #define ETRAX_WD_HZ 763
36 #define ETRAX_WD_CNT ((2*ETRAX_WD_HZ)/HZ + 1)
45 .name =
"crisv32_rotime",
47 .read = read_cont_rotime,
52 static int __init etrax_init_cont_rotime(
void)
54 clocksource_register_khz(&cont_rotime, 100000);
70 #ifdef CONFIG_CPU_FREQ
102 #define start_watchdog reset_watchdog
104 #if defined(CONFIG_ETRAX_WATCHDOG)
105 static short int watchdog_key = 42;
110 #define WATCHDOG_MIN_FREE_PAGES 8
114 #if defined(CONFIG_ETRAX_WATCHDOG)
124 wd_ctrl.
key = watchdog_key;
134 #if defined(CONFIG_ETRAX_WATCHDOG)
139 wd_ctrl.
key = watchdog_key;
148 #if defined(CONFIG_ETRAX_WATCHDOG)
149 extern int cause_of_death;
155 if (cause_of_death == 0xbedead) {
156 #ifdef CONFIG_CRIS_MACH_ARTPEC3
173 #ifndef CONFIG_ETRAX_WATCHDOG_NICE_DOGGY
195 if (!masked_intr.
tmr0)
250 timer_intr_mask.
tmr0 = 1;
280 #if defined(CONFIG_ETRAX_WATCHDOG)
296 #ifdef CONFIG_CPU_FREQ
302 #ifdef CONFIG_CPU_FREQ