[PPC] Move include/asm-ppc/arch-* to arch/ppc/*/include/mach
[barebox-mini2440.git] / include / watchdog.h
blob9265be9737245d7a1e8468c398aef12d07945bad
1 /*
2 * (C) Copyright 2001
3 * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com.
5 * See file CREDITS for list of people who contributed to this
6 * project.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
25 * Watchdog functions and macros.
27 #ifndef _WATCHDOG_H_
28 #define _WATCHDOG_H_
30 #if defined(CONFIG_HW_WATCHDOG) && defined(CONFIG_WATCHDOG)
31 # error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together."
32 #endif
34 #if defined(__ASSEMBLY__) && defined(__NIOS__)
35 # error "Configuration error: WATCHDOG_RESET inside assembler not supported for Nios platforms."
36 #endif
39 * Hardware watchdog
41 #ifdef CONFIG_HW_WATCHDOG
42 #if defined(__ASSEMBLY__)
43 #define WATCHDOG_RESET bl hw_watchdog_reset
44 #else
45 extern void hw_watchdog_reset(void);
47 #define WATCHDOG_RESET hw_watchdog_reset
48 #endif /* __ASSEMBLY__ */
49 #else
51 * Maybe a software watchdog?
53 #if defined(CONFIG_WATCHDOG)
54 #if defined(__ASSEMBLY__)
55 #define WATCHDOG_RESET bl watchdog_reset
56 #else
57 extern void watchdog_reset(void);
59 #define WATCHDOG_RESET watchdog_reset
60 #endif
61 #else
63 * No hardware or software watchdog.
65 #if defined(__ASSEMBLY__)
66 #define WATCHDOG_RESET /*XXX DO_NOT_DEL_THIS_COMMENT*/
67 #else
68 #define WATCHDOG_RESET() {}
69 #endif /* __ASSEMBLY__ */
70 #endif /* CONFIG_WATCHDOG && !__ASSEMBLY__ */
71 #endif /* CONFIG_HW_WATCHDOG */
74 * Prototypes from $(CPU)/cpu.c.
77 /* MPC 8xx */
78 #if (defined(CONFIG_8xx) || defined(CONFIG_MPC860)) && !defined(__ASSEMBLY__)
79 void reset_8xx_watchdog(volatile immap_t *immr);
80 #endif
82 /* MPC 5xx */
83 #if defined(CONFIG_5xx) && !defined(__ASSEMBLY__)
84 void reset_5xx_watchdog(volatile immap_t *immr);
85 #endif
87 /* AMCC 4xx */
88 #if defined(CONFIG_4xx) && !defined(__ASSEMBLY__)
89 void reset_4xx_watchdog(void);
90 #endif
92 #endif /* _WATCHDOG_H_ */