summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-19 16:05:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-19 16:05:38 +0000
commit0fed29abc5fe97416d69033dbbb01834515d16d6 (patch)
tree6f069f93f666049d4aaded281a72963eb8f46d7c /c
parent2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-0fed29abc5fe97416d69033dbbb01834515d16d6.tar.bz2
2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, include/bsp.h, startup/setvec.c: Split idle method into its own file. Properly note to confdefs.h that this BSP has its own idle thread. * startup/bspidle.c: New file.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/sparc/erc32/ChangeLog7
-rw-r--r--c/src/lib/libbsp/sparc/erc32/Makefile.am3
-rw-r--r--c/src/lib/libbsp/sparc/erc32/include/bsp.h16
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/bspidle.c29
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/setvec.c9
5 files changed, 45 insertions, 19 deletions
diff --git a/c/src/lib/libbsp/sparc/erc32/ChangeLog b/c/src/lib/libbsp/sparc/erc32/ChangeLog
index 35ef780b2a..a6b312e3a0 100644
--- a/c/src/lib/libbsp/sparc/erc32/ChangeLog
+++ b/c/src/lib/libbsp/sparc/erc32/ChangeLog
@@ -1,3 +1,10 @@
+2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * Makefile.am, include/bsp.h, startup/setvec.c: Split idle method into
+ its own file. Properly note to confdefs.h that this BSP has its own
+ idle thread.
+ * 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/sparc/erc32/Makefile.am b/c/src/lib/libbsp/sparc/erc32/Makefile.am
index 89644f8db2..0000a9232d 100644
--- a/c/src/lib/libbsp/sparc/erc32/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/Makefile.am
@@ -38,7 +38,8 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppredriverhook.c ../../sparc/shared/bspgetworkarea.c \
../../shared/bsppost.c ../../sparc/shared/bspstart.c \
../../shared/bootcard.c ../../shared/sbrk.c startup/setvec.c \
- startup/spurious.c startup/erc32mec.c startup/boardinit.S
+ startup/spurious.c startup/erc32mec.c startup/boardinit.S \
+ startup/bspidle.c
# gnatsupp
libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
# console
diff --git a/c/src/lib/libbsp/sparc/erc32/include/bsp.h b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
index 24bf09fb5f..8ce20cce72 100644
--- a/c/src/lib/libbsp/sparc/erc32/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
@@ -36,19 +36,18 @@ extern "C" {
#include <rtems/console.h>
/*
- * confdefs.h overrides for this BSP:
- * - two termios serial ports
- * - Interrupt stack space is not minimum if defined.
+ * BSP provides its own Idle thread body
*/
-
-#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
+void *bsp_idle_thread( uintptr_t ignored );
+#define BSP_IDLE_TASK_BODY bsp_idle_thread
/*
* Network driver configuration
*/
-
struct rtems_bsdnet_ifconfig;
-extern int rtems_erc32_sonic_driver_attach (struct rtems_bsdnet_ifconfig *config);
+extern int rtems_erc32_sonic_driver_attach(
+ struct rtems_bsdnet_ifconfig *config
+);
#define RTEMS_BSP_NETWORK_DRIVER_NAME "sonic1"
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_erc32_sonic_driver_attach
@@ -56,8 +55,7 @@ extern int rtems_erc32_sonic_driver_attach (struct rtems_bsdnet_ifconfig *config
* Simple spin delay in microsecond units for device drivers.
* This is very dependent on the clock speed of the target.
*/
-
-extern void Clock_delay(uint32_t microseconds);
+extern void Clock_delay(uint32_t microseconds);
#define delay( microseconds ) Clock_delay(microseconds)
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/bspidle.c b/c/src/lib/libbsp/sparc/erc32/startup/bspidle.c
new file mode 100644
index 0000000000..0e92e3d9d6
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/erc32/startup/bspidle.c
@@ -0,0 +1,29 @@
+/*
+ * ERC32 Idle Thread with power-down function
+ *
+ * COPYRIGHT (c) 1989-2009.
+ * 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.
+ *
+ * Ported to ERC32 implementation of the SPARC by On-Line Applications
+ * Research Corporation (OAR) under contract to the European Space
+ * Agency (ESA).
+ *
+ * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
+ * European Space Agency.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+
+void *bsp_idle_thread( uintptr_t ignored )
+{
+ while (1) {
+ ERC32_MEC.Power_Down = 0; /* value is irrelevant */
+ }
+ return NULL;
+}
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/setvec.c b/c/src/lib/libbsp/sparc/erc32/startup/setvec.c
index d3ae717425..3a7601d012 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/setvec.c
+++ b/c/src/lib/libbsp/sparc/erc32/startup/setvec.c
@@ -59,12 +59,3 @@ rtems_isr_entry set_vector( /* returns old vector */
return previous_isr;
}
-
-/* ERC32 power-down function */
-
-void *_CPU_Thread_Idle_body( uintptr_t ignored )
-{
- while (1) {
- ERC32_MEC.Power_Down = 0; /* value is irrelevant */
- }
-}