summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-26 13:31:40 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-26 13:31:40 +0000
commitfc472c9796852e8ab3b097b13ef5bf4f2aa82a6e (patch)
treef468cb989d58e7ace9e444d3e0236730ac0ea66c /c
parent2009-08-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-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')
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/ChangeLog6
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/Makefile.am1
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/startup/bspidle.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c19
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/ChangeLog6
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/Makefile.am1
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/startup/bspidle.c48
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c25
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/ChangeLog6
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am3
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspidle.c41
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c20
-rw-r--r--c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog6
-rw-r--r--c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspidle.c35
-rw-r--r--c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c22
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/ChangeLog6
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am2
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/startup/bspidle.c51
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c25
20 files changed, 250 insertions, 115 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen5200/ChangeLog b/c/src/lib/libbsp/powerpc/gen5200/ChangeLog
index d9091b90e1..bf0d8b6cc3 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/gen5200/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-08-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/bsp.h, startup/bspstart.c: Rename _Thread_Idle_body to
diff --git a/c/src/lib/libbsp/powerpc/gen5200/Makefile.am b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am
index 2880cbf322..ef777ef624 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am
@@ -116,6 +116,7 @@ libbsp_a_SOURCES += ../../shared/bootcard.c \
../../shared/bspclean.c \
startup/bspreset.c \
../../shared/bspgetworkarea.c \
+ startup/bspidle.c \
startup/bspstart.c \
startup/cpuinit.c \
startup/uboot_support.c
diff --git a/c/src/lib/libbsp/powerpc/gen5200/startup/bspidle.c b/c/src/lib/libbsp/powerpc/gen5200/startup/bspidle.c
new file mode 100644
index 0000000000..ad83c94d2e
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/startup/bspidle.c
@@ -0,0 +1,38 @@
+/*===============================================================*\
+| Project: RTEMS generic MPC5200 BSP |
++-----------------------------------------------------------------+
+| Partially based on the code references which are named below. |
+| Adaptions, modifications, enhancements and any recent parts of |
+| the code are: |
+| Copyright (c) 2005 |
+| 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. |
+| |
++-----------------------------------------------------------------+
+| this file contains the BSP initialization code |
+\*===============================================================*/
+
+#include <rtems.h>
+/*
+ * bsp_idle_thread
+ *
+ * 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 )
+{
+ for(;;) {
+ asm volatile(
+ "mfmsr 3; oris 3,3,4; sync; mtmsr 3; isync; ori 3,3,0; ori 3,3,0"
+ );
+ }
+ return 0;
+}
diff --git a/c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c
index 3c0f585851..3614da6132 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c
@@ -193,22 +193,3 @@ void bsp_start(void)
printk("Exit from bspstart\n");
#endif
}
-
-/*
- *
- * bsp_idle_thread
- *
- * 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 )
-{
- for(;;) {
- asm volatile(
- "mfmsr 3; oris 3,3,4; sync; mtmsr 3; isync; ori 3,3,0; ori 3,3,0"
- );
- }
- return 0;
-}
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;
-}
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/ChangeLog b/c/src/lib/libbsp/powerpc/mpc55xxevb/ChangeLog
index 350323837d..c52953ae1f 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/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-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
* clock/clock-config.c, include/smsc9218i.h, network/smsc9218i.c: New
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am b/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am
index ba126700e5..e777aadb4f 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am
@@ -45,7 +45,8 @@ include_bsp_HEADERS = include/mpc55xxevb.h \
# startup
libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \
../../shared/bootcard.c ../shared/src/tictac.c ../../shared/bspclean.c \
- startup/bspstart.c startup/bspgetworkarea.c ../../shared/bsppretaskinghook.c
+ startup/bspidle.c startup/bspstart.c startup/bspgetworkarea.c \
+ ../../shared/bsppretaskinghook.c
# clock
libbsp_a_SOURCES += clock/clock-config.c
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspidle.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspidle.c
new file mode 100644
index 0000000000..70dce97b67
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspidle.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ *
+ * @ingroup mpc55xx
+ *
+ * @brief BSP Idle Thread Code
+ */
+
+/*
+ * 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.
+ */
+
+#include <bsp.h>
+
+/**
+ * @brief Idle thread body.
+ */
+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 0;
+}
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c
index a4cb7b4483..32d3d42021 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c
@@ -255,23 +255,3 @@ void bsp_start(void)
rtems_cache_enable_data();
#endif
}
-
-/**
- * @brief Idle thread body.
- */
-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 0;
-}
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog b/c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog
index 84ff28db64..c7db343517 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/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-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* network/network.c: Disable use of simple vectored interrupt install
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am b/c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am
index 966f6e3130..fe4c80fbdf 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am
@@ -43,8 +43,8 @@ include_bsp_HEADERS += vectors/vectors.h
# startup
libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppredriverhook.c ../../shared/bsppost.c \
- startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
- ../../shared/gnatinstallhandler.c startup/cpuinit.c \
+ startup/bspidle.c startup/bspstart.c ../../shared/bootcard.c \
+ ../../shared/sbrk.c ../../shared/gnatinstallhandler.c startup/cpuinit.c \
../../shared/bspgetworkarea.c ../../shared/bsppretaskinghook.c
# vectors
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspidle.c b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspidle.c
new file mode 100644
index 0000000000..4ca40e88c0
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspidle.c
@@ -0,0 +1,35 @@
+/*
+ * The MPC860 specific stuff was written by Jay Monkman (jmonkman@frasca.com)
+ *
+ * Modified for the MPC8260ADS board by Andy Dachs <a.dachs@sstl.co.uk>
+ * Surrey Satellite Technology Limited, 2001
+ *
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * 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>
+
+/*
+ * bsp_idle_thread
+ *
+ * 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 )
+{
+ for( ; ; ) {
+ asm volatile(
+ "mfmsr 3; oris 3,3,4; sync; mtmsr 3; isync; ori 3,3,0; ori 3,3,0"
+ );
+ }
+
+ return 0; /* to remove warning */
+}
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c
index 1cbce38269..194aeb542f 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c
@@ -237,25 +237,3 @@ void bsp_start(void)
#endif
}
-
-/*
- *
- * _Thread_Idle_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 )
-{
-
- for( ; ; )
- {
- asm volatile(
- "mfmsr 3; oris 3,3,4; sync; mtmsr 3; isync; ori 3,3,0; ori 3,3,0"
- );
- }
-
- return 0; /* to remove warning */
-}
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/ChangeLog b/c/src/lib/libbsp/powerpc/tqm8xx/ChangeLog
index 3a85bedee0..97449c9a32 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/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-08-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* console/console.c: Disable call to rtems_interrupt_catch until it is
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am b/c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am
index d57ced5990..ead7ee2d51 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am
@@ -58,7 +58,7 @@ libbsp_a_SOURCES += timer/timer.c
# startup
libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppost.c ../../shared/bsppredriverhook.c \
- ../../shared/bsppretaskinghook.c startup/bspstart.c \
+ ../../shared/bsppretaskinghook.c startup/bspidle.c startup/bspstart.c \
startup/bspgetworkarea.c ../../shared/bootcard.c startup/mmutlbtab.c \
startup/cpuinit.c ../../shared/sbrk.c ../../shared/gnatinstallhandler.c
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspidle.c b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspidle.c
new file mode 100644
index 0000000000..29a2f0a8d8
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspidle.c
@@ -0,0 +1,51 @@
+/**
+ * @file
+ *
+ * @ingroup tqm8xx
+ *
+ * @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 <rtems.h>
+#include <libcpu/powerpc-utility.h>
+
+#include <bsp.h>
+
+/**
+ * @brief BSP 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/tqm8xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c
index ddbce47774..b02ccdb057 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c
@@ -193,28 +193,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;
-}