source: rtems/c/src/lib/libbsp/arm/rtl22xx/startup/bspclean.c @ ac654234

4.104.114.9
Last change on this file since ac654234 was ac654234, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 6, 2007 at 10:50:42 PM

2007-11-03 Ray Xu <rayx.cn@…>

  • start/start.S, startup/bspclean.c: Add veneer between ARM and Thumb instructions. also moved bss init after CPSR/stack init in start.S
  • Property mode set to 100644
File size: 1009 bytes
Line 
1/*
2 * Philips LPC22XX/LPC21xx BSP Shutdown  code
3 * Copyright (c) 2007 by Ray Xu <rayx.cn@gmail.com>
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *
8 *  http://www.rtems.com/license/LICENSE.
9 *
10 *
11 *  $Id$
12*/
13
14#include <bsp.h>
15#include <rtems/bspIo.h>
16#include <rtems/libio.h>
17
18int uart_poll_read(int);
19
20void rtemsReboot (void)
21{
22#ifdef __thumb__
23  int tmp;
24  asm volatile (" .code 16            \n" \
25                "ldr %[tmp], =_start  \n" \
26                "bx  %[tmp]           \n" \
27                "nop                  \n" \
28                : [tmp]"=&r" (tmp) );
29#else                   
30  asm volatile ("b _start");
31#endif   
32}
33
34void bsp_cleanup(void)
35{
36  /*
37   * AT this point, the console driver is disconnected => we must
38   * use polled output/input. This is exactly what printk
39   * does.
40   */
41  printk("\nEXECUTIVE SHUTDOWN! Any key to reboot...");
42  while (uart_poll_read(0) < 0) continue;
43
44  /* rtemsReboot(); */
45}
Note: See TracBrowser for help on using the repository browser.