diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-26 13:31:40 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-26 13:31:40 +0000 |
commit | fc472c9796852e8ab3b097b13ef5bf4f2aa82a6e (patch) | |
tree | f468cb989d58e7ace9e444d3e0236730ac0ea66c /c/src/lib/libbsp/powerpc/gen83xx | |
parent | 2009-08-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-fc472c9796852e8ab3b097b13ef5bf4f2aa82a6e.tar.bz2 |
2009-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, startup/bspstart.c: Rename BSP specific idle thread to
bsp_idle_thread and split into its own file.
* startup/bspidle.c: New file.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/gen83xx')
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/Makefile.am | 1 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/startup/bspidle.c | 48 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c | 25 |
4 files changed, 55 insertions, 25 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog b/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog index 7ff00db7b3..7caff43450 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog +++ b/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog @@ -1,3 +1,9 @@ +2009-08-26 Joel Sherrill <joel.sherrill@oarcorp.com> + + * Makefile.am, startup/bspstart.c: Rename BSP specific idle thread to + bsp_idle_thread and split into its own file. + * startup/bspidle.c: New file. + 2009-07-16 Joel Sherrill <joel.sherrill@oarcorp.com> * configure.ac: Rename BSP_BOOTCARD_OPTIONS to diff --git a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am index c59cb47dc9..e78fae24b9 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am +++ b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am @@ -52,6 +52,7 @@ libbsp_a_SOURCES += ../../shared/bsplibc.c \ ../../shared/gnatinstallhandler.c \ ../shared/src/tictac.c \ startup/cpuinit.c \ + startup/bspidle.c \ startup/bspstart.c \ ../../shared/bspclean.c \ startup/bspreset.c \ diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspidle.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspidle.c new file mode 100644 index 0000000000..541fa6cae5 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspidle.c @@ -0,0 +1,48 @@ +/** + * @file + * + * @ingroup mpc83xx + * + * @brief Source for BSP Idle Thread + */ + +/* + * Copyright (c) 2008 + * Embedded Brains GmbH + * Obere Lagerstr. 30 + * D-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. + * + * $Id$ + */ + +#include <bsp.h> + +/** + * @brief Idle thread body. + * + * Replaces the one in c/src/exec/score/src/threadidlebody.c + * The MSR[POW] bit is set to put the CPU into the low power mode + * defined in HID0. HID0 is set during starup in start.S. + */ +void *bsp_idle_thread( uintptr_t ignored ) +{ + + while (1) { + asm volatile ( + "mfmsr 3;" + "oris 3, 3, 4;" + "sync;" + "mtmsr 3;" + "isync;" + "ori 3, 3, 0;" + "ori 3, 3, 0" + ); + } + + return NULL; +} diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c index 2764b3543f..6cfa7e2853 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c @@ -152,28 +152,3 @@ void bsp_start( void) printk("Exit from bspstart\n"); #endif } - -/** - * @brief Idle thread body. - * - * Replaces the one in c/src/exec/score/src/threadidlebody.c - * The MSR[POW] bit is set to put the CPU into the low power mode - * defined in HID0. HID0 is set during starup in start.S. - */ -void *_Thread_Idle_body( uintptr_t ignored ) -{ - - while (1) { - asm volatile ( - "mfmsr 3;" - "oris 3, 3, 4;" - "sync;" - "mtmsr 3;" - "isync;" - "ori 3, 3, 0;" - "ori 3, 3, 0" - ); - } - - return NULL; -} |