4.104.115
Last change
on this file since 57bcaa29 was
57bcaa29,
checked in by Joel Sherrill <joel.sherrill@…>, on 08/10/09 at 03:03:08
|
2009-08-09 Joel Sherrill <joel.sherrill@…>
- Makefile.am, configure.ac: Add Skyeye reset device.
- startup/bspreset.c: New file.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2002 by Jay Monkman <jtm@smoothsmoothie.com> |
---|
3 | * |
---|
4 | * The license and distribution terms for this file may be |
---|
5 | * found in the file LICENSE in this distribution or at |
---|
6 | * http://www.rtems.com/license/LICENSE. |
---|
7 | * |
---|
8 | * $Id$ |
---|
9 | */ |
---|
10 | |
---|
11 | #include <bsp.h> |
---|
12 | |
---|
13 | void bsp_reset(void) |
---|
14 | { |
---|
15 | #if ON_SKYEYE == 1 |
---|
16 | #define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000)) |
---|
17 | |
---|
18 | SKYEYE_MAGIC_ADDRESS = 0xff; |
---|
19 | #else |
---|
20 | /* XXX TODO this code is copied from gp32.. move it to a shared place */ |
---|
21 | rtems_interrupt_level level; |
---|
22 | rtems_interrupt_disable(level); |
---|
23 | /* disable mmu, invalide i-cache and call swi #4 */ |
---|
24 | asm volatile("" |
---|
25 | "mrc p15,0,r0,c1,c0,0 \n" |
---|
26 | "bic r0,r0,#1 \n" |
---|
27 | "mcr p15,0,r0,c1,c0,0 \n" |
---|
28 | "nop \n" |
---|
29 | "nop \n" |
---|
30 | "nop \n" |
---|
31 | "nop \n" |
---|
32 | "nop \n" |
---|
33 | "mov r0,#0 \n" |
---|
34 | "MCR p15,0,r0,c7,c5,0 \n" |
---|
35 | "nop \n" |
---|
36 | "nop \n" |
---|
37 | "nop \n" |
---|
38 | "nop \n" |
---|
39 | "nop \n" |
---|
40 | "swi #4 " |
---|
41 | : |
---|
42 | : |
---|
43 | : "r0" |
---|
44 | ); |
---|
45 | /* we should be back in bios now */ |
---|
46 | #endif |
---|
47 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.