source: rtems/c/src/lib/libbsp/arm/lpc24xx/misc/restart.c @ 4a6cc2a

4.115
Last change on this file since 4a6cc2a was 4a6cc2a, checked in by Sebastian Huber <sebastian.huber@…>, on 11/08/11 at 10:39:46

2011-11-08 Sebastian Huber <sebastian.huber@…>

  • include/lpc17xx.h: New file.
  • Makefile.am, preinstall.am: Reflect change above. Update due to API changes.
  • configure.ac, console/console-config.c, include/bsp.h, include/io.h, include/irq.h, include/lcd.h, include/lpc-clock-config.h, include/lpc24xx.h, include/start-config.h, irq/irq-dispatch.c, irq/irq.c, misc/bspidle.c, misc/io.c, misc/lcd.c, misc/restart.c, misc/system-clocks.c, ssp/ssp.c, startup/bspreset.c, startup/bspstart.c, startup/bspstarthooks.c, startup/start-config-emc-dynamic.c, startup/start-config-emc-static.c, startup/start-config-pinsel.c: Basic support for LPC17XX. New memory configurations for W9825G2JB75I, IS42S32800B, and SST39VF3201.
  • Property mode set to 100644
File size: 792 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup lpc24xx
5 *
6 * @brief Restart implementation.
7 */
8
9/*
10 * Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
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 * $Id$
23 */
24
25#include <rtems.h>
26
27#include <bsp.h>
28
29void bsp_restart(void *addr)
30{
31  #ifdef ARM_MULTILIB_ARCH_V4
32    ARM_SWITCH_REGISTERS;
33    rtems_interrupt_level level;
34
35    rtems_interrupt_disable(level);
36
37    asm volatile (
38      ARM_SWITCH_TO_ARM
39      "mov pc, %[addr]\n"
40      ARM_SWITCH_BACK
41      : ARM_SWITCH_OUTPUT
42      : [addr] "r" (addr)
43    );
44  #endif
45}
Note: See TracBrowser for help on using the repository browser.