4.104.114.95
Last change
on this file since 82bd8d9d was
82bd8d9d,
checked in by Thomas Doerfler <Thomas.Doerfler@…>, on 09/03/08 at 15:39:03
|
Converted to use shared
exception and interrupt code.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * This is a dummy bsp_cleanup routine. |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-1999. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | * |
---|
11 | * $Id$ |
---|
12 | */ |
---|
13 | |
---|
14 | #include <rtems.h> |
---|
15 | #include <rtems/bspIo.h> |
---|
16 | #include <bsp.h> |
---|
17 | #include <bsp/mpc5200.h> |
---|
18 | #include <bsp/bootcard.h> |
---|
19 | |
---|
20 | extern int mpc5200_uart_pollRead(int minor); |
---|
21 | |
---|
22 | void bsp_cleanup( void ) |
---|
23 | { |
---|
24 | |
---|
25 | #if (BENCHMARK_IRQ_PROCESSING == 1) |
---|
26 | { |
---|
27 | BSP_IRQ_Benchmarking_Report(); |
---|
28 | } |
---|
29 | #endif |
---|
30 | |
---|
31 | #if defined(BSP_PRESS_KEY_FOR_RESET) |
---|
32 | printk( "\nEXECUTIVE SHUTDOWN! Any key to reboot..." ); |
---|
33 | |
---|
34 | /* |
---|
35 | * Wait for a key to be pressed |
---|
36 | */ |
---|
37 | while ( mpc5200_uart_pollRead(0) == -1 ) ; |
---|
38 | #endif |
---|
39 | |
---|
40 | /* |
---|
41 | * Check both conditions -- if you want to ask for reboot, then |
---|
42 | * you must have meant to reset the board. |
---|
43 | */ |
---|
44 | #if defined(BSP_PRESS_KEY_FOR_RESET) || defined(BSP_RESET_BOARD_AT_EXIT) |
---|
45 | /* |
---|
46 | * Now reset the CPU |
---|
47 | */ |
---|
48 | _ISR_Set_level( 0 ); |
---|
49 | |
---|
50 | mpc5200.gpt[0].count_in = 0xf; |
---|
51 | mpc5200.gpt[0].emsel = 0x9004; |
---|
52 | #endif |
---|
53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.