4.115
Last change
on this file since 7a66986 was
7a66986,
checked in by Claas Ziemke <ziemke@…>, on 08/22/12 at 12:39:02
|
Added BeagleBoard? BSP
Coding done in course of GSoC2012.
Commit edited to be brought up-to-date with mainline by
Ben Gras <beng@…>.
|
-
Property mode set to
100644
|
File size:
950 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup beagle |
---|
5 | * |
---|
6 | * @brief Reset code. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2012 Claas Ziemke. All rights reserved. |
---|
11 | * |
---|
12 | * Claas Ziemke |
---|
13 | * Kernerstrasse 11 |
---|
14 | * 70182 Stuttgart |
---|
15 | * Germany |
---|
16 | * <claas.ziemke@gmx.net> |
---|
17 | * |
---|
18 | * The license and distribution terms for this file may be |
---|
19 | * found in the file LICENSE in this distribution or at |
---|
20 | * http://www.rtems.com/license/LICENSE. |
---|
21 | */ |
---|
22 | |
---|
23 | #include <stdbool.h> |
---|
24 | |
---|
25 | #include <bspopts.h> |
---|
26 | #include <bsp/bootcard.h> |
---|
27 | #include <bsp/beagle.h> |
---|
28 | |
---|
29 | static void watchdog_reset(void) |
---|
30 | { |
---|
31 | #ifdef BEAGLE_ENABLE_WATCHDOG_RESET |
---|
32 | //BEAGLE_TIMCLK_CTRL |= TIMCLK_CTRL_WDT; |
---|
33 | //beagle.wdt.mctrl |= WDTTIM_MCTRL_M_RES1 | WDTTIM_MCTRL_M_RES2; |
---|
34 | //beagle.wdt.emr = WDTTIM_EMR_MATCH_CTRL_SET(beagle.wdt.emr, 0x2); |
---|
35 | //beagle.wdt.ctrl |= WDTTIM_CTRL_COUNT_ENAB; |
---|
36 | //beagle.wdt.match0 = 1; |
---|
37 | //beagle.wdt.counter = 0; |
---|
38 | #endif |
---|
39 | } |
---|
40 | |
---|
41 | void bsp_reset( void) |
---|
42 | { |
---|
43 | watchdog_reset(); |
---|
44 | |
---|
45 | while (true) { |
---|
46 | /* Do nothing */ |
---|
47 | } |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.