4.104.114.84.95
Last change
on this file since a858910 was
18647b7,
checked in by Joel Sherrill <joel.sherrill@…>, on 04/25/97 at 16:58:10
|
updated to reflect new license per John Gwynne's permission.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | *------------------------------------------------------------------- |
---|
3 | * |
---|
4 | * This file contains the subroutines necessary to initalize |
---|
5 | * and maintain the MAX791 based watchdog timer used on efi68k |
---|
6 | * |
---|
7 | * This file has been created by John S. Gwynne for the efi68k |
---|
8 | * project. |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may in |
---|
11 | * the file LICENSE in this distribution or at |
---|
12 | * http://www.OARcorp.com/rtems/license.html. |
---|
13 | * |
---|
14 | *------------------------------------------------------------------ |
---|
15 | * |
---|
16 | * $Id$ |
---|
17 | */ |
---|
18 | #include <bsp.h> |
---|
19 | |
---|
20 | void wd_interrupt(void) { |
---|
21 | /* toggle WDI of the MAX791. A more sophisticated routine |
---|
22 | can be inserted into the exception table after booting. */ |
---|
23 | |
---|
24 | /* 3 changes guaranty a pulse independent of initial state */ |
---|
25 | *MCR |= OUT1; |
---|
26 | *MCR &= ~OUT1; |
---|
27 | *MCR |= OUT1; |
---|
28 | } |
---|
29 | |
---|
30 | /* _catchWDint is the interrupt front-end */ |
---|
31 | extern void _catchWDint(); |
---|
32 | asm(" .text |
---|
33 | .align 2 |
---|
34 | .globl _catchWDint |
---|
35 | _catchWDint: |
---|
36 | lea %sp@(4),%sp /* pop return address */ |
---|
37 | moveml %d0-%d7/%a0-%a6,%sp@- /* save registers */ |
---|
38 | jbsr wd_interrupt |
---|
39 | moveml %sp@+,%d0-%d7/%a0-%a6 |
---|
40 | rte |
---|
41 | "); |
---|
42 | |
---|
43 | void watch_dog_init(void) { |
---|
44 | set_vector(_catchWDint, WD_ISR_LEVEL+24, 0); |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.