source: rtems/c/src/lib/libbsp/arm/smdk2410/startup/bspreset.c @ 08bcf01

4.115
Last change on this file since 08bcf01 was 08bcf01, checked in by Joel Sherrill <joel.sherrill@…>, on 09/02/14 at 23:02:49

smdk2410/.../bspreset.c: Eliminate warning for set not used variable

  • 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.org/license/LICENSE.
7 */
8
9#include <bsp.h>
10
11void bsp_reset(void)
12{
13#if ON_SKYEYE == 1
14  #define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000))
15
16  SKYEYE_MAGIC_ADDRESS = 0xff;
17#else
18  /* XXX TODO this code is copied from gp32.. move it to a shared place */
19  rtems_interrupt_level level;
20
21  (void) 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.