summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-22 21:50:31 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-22 21:50:31 +0000
commit788870e168b06a612fbcbed7d2464cb7a3443ea8 (patch)
treecb4e2488c8ec3ac44e2e7966f04fb59e8cd03853
parent2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-788870e168b06a612fbcbed7d2464cb7a3443ea8.tar.bz2
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* shared/console/inch.c, shared/startup/panic.c: Use standardized bsp_cleanup() which can optionally print a message, poll for user to press key, and call bsp_reset(). Using this eliminates the various bsp_cleanup() implementations which had their own implementation and variety of string constants. * shared/console/bspreset.c: New file. * shared/console/reboot.c: Removed.
-rw-r--r--c/src/lib/libbsp/powerpc/ChangeLog10
-rw-r--r--c/src/lib/libbsp/powerpc/shared/console/bspreset.c (renamed from c/src/lib/libbsp/powerpc/shared/console/reboot.c)6
-rw-r--r--c/src/lib/libbsp/powerpc/shared/console/inch.c3
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/panic.c3
4 files changed, 17 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/powerpc/ChangeLog b/c/src/lib/libbsp/powerpc/ChangeLog
index 99353ed806..1839ec9059 100644
--- a/c/src/lib/libbsp/powerpc/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/ChangeLog
@@ -1,3 +1,13 @@
+2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * shared/console/inch.c, shared/startup/panic.c: Use standardized
+ bsp_cleanup() which can optionally print a message, poll for user to
+ press key, and call bsp_reset(). Using this eliminates the various
+ bsp_cleanup() implementations which had their own implementation and
+ variety of string constants.
+ * shared/console/bspreset.c: New file.
+ * shared/console/reboot.c: Removed.
+
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* shared/startup/bspgetworkarea.c, shared/startup/sbrk.c: Remove
diff --git a/c/src/lib/libbsp/powerpc/shared/console/reboot.c b/c/src/lib/libbsp/powerpc/shared/console/bspreset.c
index cf5e378ef1..ddba02ad44 100644
--- a/c/src/lib/libbsp/powerpc/shared/console/reboot.c
+++ b/c/src/lib/libbsp/powerpc/shared/console/bspreset.c
@@ -5,13 +5,13 @@
#include <libcpu/stackTrace.h>
/*-------------------------------------------------------------------------+
-| Function: rtemsReboot
+| Function: bsp_reset
| Description: Reboot the PC.
| Global Variables: None.
| Arguments: None.
| Returns: Nothing.
+--------------------------------------------------------------------------*/
-void rtemsReboot(void)
+void bsp_reset(void)
{
printk("Printing a stack trace for your convenience :-)\n");
CPU_print_stack();
@@ -22,4 +22,4 @@ void rtemsReboot(void)
#if defined(mvme2100)
*(unsigned char*)0xffe00000 |= 0x80;
#endif
-} /* rtemsReboot */
+} /* bsp_reset */
diff --git a/c/src/lib/libbsp/powerpc/shared/console/inch.c b/c/src/lib/libbsp/powerpc/shared/console/inch.c
index f9a2bffdd1..a6e36effd0 100644
--- a/c/src/lib/libbsp/powerpc/shared/console/inch.c
+++ b/c/src/lib/libbsp/powerpc/shared/console/inch.c
@@ -20,6 +20,7 @@
*/
#include <bsp.h>
+#include <bsp/bootcard.h>
#ifdef BSP_KBD_IOBASE
#include <bsp/irq.h>
@@ -154,7 +155,7 @@ _IBMPC_scankey(char *outChar)
case 0x53:
if (ctrl_pressed && alt_pressed)
- rtemsReboot(); /* ctrl+alt+del -> reboot */
+ bsp_reset(); /* ctrl+alt+del -> reboot */
break;
/*
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/panic.c b/c/src/lib/libbsp/powerpc/shared/startup/panic.c
index 5e54410fae..86c1675c2e 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/panic.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/panic.c
@@ -1,5 +1,6 @@
#include <rtems.h>
#include <bsp.h>
+#include <bsp/bootcard.h>
#include <bsp/uart.h>
#include <rtems/bspIo.h>
#include <rtems/error.h>
@@ -10,7 +11,7 @@ rebootQuestion()
{
printk("Press a key to reboot\n");
BSP_poll_char_via_serial();
- rtemsReboot();
+ bsp_reset();
}
void BSP_panic(char *s)