summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-01-09 09:28:19 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-01-09 16:45:24 +0100
commitd4e2f337607031d6c97a68ebccd98516d637854f (patch)
tree16b6defb8011673c2f3ad0c2bf680bb6db924834
parentbsp/gen83xx: Delete obsolete region (diff)
downloadrtems-d4e2f337607031d6c97a68ebccd98516d637854f.tar.bz2
bsp/gen83xx: Add bsp_restart()
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/Makefile.am1
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h2
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/startup/bsprestart.c24
3 files changed, 27 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am
index 4ee0d2464e..7d970ae7fa 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am
@@ -66,6 +66,7 @@ libbsp_a_SOURCES += ../../shared/bsplibc.c \
startup/bspstart.c \
../../shared/bspclean.c \
startup/bspreset.c \
+ startup/bsprestart.c \
../../shared/bspgetworkarea.c \
../../shared/src/bsp-uboot-board-info.c \
../shared/uboot_getenv.c
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
index fcead98b7e..cc97cdc071 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
@@ -145,6 +145,8 @@ void mpc83xx_zero_4( void *dest, size_t n);
void cpu_init( void);
+void bsp_restart(void *addr);
+
#ifdef __cplusplus
}
#endif
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bsprestart.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bsprestart.c
new file mode 100644
index 0000000000..c09547872c
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/bsprestart.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#include <bsp.h>
+
+void bsp_restart(void *addr)
+{
+ rtems_interrupt_level level;
+ void (*start)(void) = addr;
+
+ rtems_interrupt_disable(level);
+ (*start)();
+}