summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/ods68302
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-13 14:50:12 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-16 08:58:45 -0500
commitcba474ea2d7ba83d68f7ee7c2ce7028950677cc6 (patch)
treea16e9a9210d7872b9c00bdcdb5fa28cd8baf0168 /c/src/lib/libbsp/m68k/ods68302
parentlibcpu/arm/shared/../mmu: Fix warnings (diff)
downloadrtems-cba474ea2d7ba83d68f7ee7c2ce7028950677cc6.tar.bz2
m68k/ods68302: Fix warnings
Diffstat (limited to 'c/src/lib/libbsp/m68k/ods68302')
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/console/console.c46
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/bsp.h31
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/start/reset.S12
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c15
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c6
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/memcheck.c31
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/trace.c6
8 files changed, 67 insertions, 84 deletions
diff --git a/c/src/lib/libbsp/m68k/ods68302/Makefile.am b/c/src/lib/libbsp/m68k/ods68302/Makefile.am
index 7c773205a1..4b5cfed096 100644
--- a/c/src/lib/libbsp/m68k/ods68302/Makefile.am
+++ b/c/src/lib/libbsp/m68k/ods68302/Makefile.am
@@ -45,8 +45,8 @@ libbsp_a_SOURCES =
libbsp_a_SOURCES += startup/cpuboot.c startup/crc.c startup/debugport.c \
startup/gdb-hooks.c ../../shared/bootcard.c \
startup/m68302scc.c startup/m68k-stub.c \
- ../../shared/bsppretaskinghook.c startup/memcheck.c \
- ../../shared/bspgetworkarea.c startup/memcheck.c \
+ ../../shared/bsppretaskinghook.c \
+ ../../shared/bspgetworkarea.c \
startup/trace.c ../../shared/gnatinstallhandler.c ../../shared/bsplibc.c \
../../shared/bsppredriverhook.c ../../shared/bsppost.c \
../../shared/bspstart.c ../../shared/bspclean.c ../../shared/sbrk.c \
diff --git a/c/src/lib/libbsp/m68k/ods68302/console/console.c b/c/src/lib/libbsp/m68k/ods68302/console/console.c
index 24069a296f..4077904754 100644
--- a/c/src/lib/libbsp/m68k/ods68302/console/console.c
+++ b/c/src/lib/libbsp/m68k/ods68302/console/console.c
@@ -1,7 +1,9 @@
/*
* Initialize the MC68302 SCC2 for console IO board support package.
- *
- * COPYRIGHT (c) 1989-1999.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -18,14 +20,7 @@
/* console_initialize
*
* This routine initializes the console IO driver.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values:
*/
-
rtems_device_driver console_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -46,23 +41,14 @@ rtems_device_driver console_initialize(
rtems_fatal_error_occurred(status);
return RTEMS_SUCCESSFUL;
-
}
/* is_character_ready
*
* Check to see if a character is available on the MC68302's SCC2. If so,
* then return a TRUE (along with the character). Otherwise return FALSE.
- *
- * Input parameters: pointer to location in which to return character
- *
- * Output parameters: character (if available)
- *
- * Return values: TRUE - character available
- * FALSE - no character available
*/
-
-bool is_character_ready(
+static bool is_character_ready(
char *ch /* -> character */
)
{
@@ -77,15 +63,8 @@ bool is_character_ready(
/* inbyte
*
* Receive a character from the MC68302's SCC2.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values: character read
*/
-
-char inbyte( void )
+static char inbyte( void )
{
char ch;
@@ -98,14 +77,8 @@ char inbyte( void )
*
* Transmit a character out on the MC68302's SCC2.
* It may support XON/XOFF flow control.
- *
- * Input parameters:
- * ch - character to be transmitted
- *
- * Output parameters: NONE
*/
-
-void outbyte(
+static void outbyte(
char ch
)
{
@@ -115,7 +88,6 @@ void outbyte(
/*
* Open entry point
*/
-
rtems_device_driver console_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -128,7 +100,6 @@ rtems_device_driver console_open(
/*
* Close entry point
*/
-
rtems_device_driver console_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -141,7 +112,6 @@ rtems_device_driver console_close(
/*
* read bytes from the serial port. We only have stdin.
*/
-
rtems_device_driver console_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -173,7 +143,6 @@ rtems_device_driver console_read(
/*
* write bytes to the serial port. Stdout and stderr are the same.
*/
-
rtems_device_driver console_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -204,7 +173,6 @@ rtems_device_driver console_write(
/*
* IO Control entry point
*/
-
rtems_device_driver console_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
index c951696dfe..ae3699ac47 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
@@ -15,6 +15,8 @@
#ifndef _BSP_H
#define _BSP_H
+#ifndef ASM
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -62,8 +64,37 @@ rtems_isr_entry set_vector(
int type
);
+/*
+ * Prototypes for methods called only from .S files
+ */
+void boot_phase_1(void);
+void boot_phase_2(void);
+void boot_phase_3(void);
+void trace_exception(
+ unsigned long d0,
+ unsigned long d1,
+ unsigned long d2,
+ unsigned long d3,
+ unsigned long d4,
+ unsigned long d5,
+ unsigned long d6,
+ unsigned long d7,
+ unsigned long a0,
+ unsigned long a1,
+ unsigned long a2,
+ unsigned long a3,
+ unsigned long a4,
+ unsigned long a5,
+ unsigned long a6,
+ unsigned long a7,
+ unsigned long sr_pch,
+ unsigned long pcl_format
+);
+
#ifdef __cplusplus
}
#endif
#endif
+
+#endif
diff --git a/c/src/lib/libbsp/m68k/ods68302/start/reset.S b/c/src/lib/libbsp/m68k/ods68302/start/reset.S
index 481ebe4ca8..22f5d827eb 100644
--- a/c/src/lib/libbsp/m68k/ods68302/start/reset.S
+++ b/c/src/lib/libbsp/m68k/ods68302/start/reset.S
@@ -1,16 +1,18 @@
/*
+ * Manages all vectors with seperate handlers to trap unhandled
+ * execptions.
+ *
* Re-written the gen68302 start-up code.
*
* Uses gas syntax only, removed the OAR asm.h.
*
* Supplies a complete vector table in ROM.
*
- * Manages all vectors with seperate handlers to trap unhandled
- * execptions.
- *
* Uses the target specific header file to get the runtime
* configuration
- *
+ */
+
+/*
* COPYRIGHT (c) 1996
* Objective Design Systems Pty Ltd (ODS)
*
@@ -19,6 +21,8 @@
*
*/
+#include <bsp.h> /* just to indicate the dependency */
+
|
| some basic defined, this is that is required
|
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c b/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c
index 0ea119ce9a..45bfe42725 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c
@@ -1,9 +1,7 @@
-/*****************************************************************************/
/*
- Hooks for GDB
-
+ * Hooks for GDB
+ *
*/
-/*****************************************************************************/
#include <bsp.h>
#include <rtems/m68k/m68302.h>
@@ -11,6 +9,15 @@
static int initialised = 0;
+/*
+ * This file does not intend to make things part of the public interface.
+ * Methods here are only available to the GDB stub. So prototypes are
+ * needed to avoid warnings.
+ */
+void putDebugChar(char ch);
+char getDebugChar(void);
+void exceptionHandler(unsigned int vector, void *handler);
+
void putDebugChar(char ch)
{
if (!initialised)
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c b/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c
index e82bb72504..d9533efa06 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c
@@ -537,6 +537,12 @@ __asm__ (" movel %d0,%sp@-"); /* push exception onto stack */
__asm__ (" jbsr handle_exception"); /* this never returns */
__asm__ (" rts"); /* return */
+/*
+ * This is only called from assembly in this file. This file is a self
+ * contained gdb stub.
+ */
+void _returnFromException(Frame *frame);
+
void _returnFromException(Frame *frame)
{
/* if no passed in frame, use the last one */
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/memcheck.c b/c/src/lib/libbsp/m68k/ods68302/startup/memcheck.c
deleted file mode 100644
index 74d8f925bd..0000000000
--- a/c/src/lib/libbsp/m68k/ods68302/startup/memcheck.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************/
-/*
- Memory check routines.
-
- The production test is a destrucive full test.
- The boot test is a minimal, non-desctructive.
- The partial memory test performs a scetion at a time, and gets
- called in a repeated fashion to completely check the memory,
-
- */
-/*****************************************************************************/
-
-void
-production_memory_test(void)
-{
-}
-
-void
-boot_memory_test(void)
-{
-}
-
-void
-reset_partial_memory_test(void)
-{
-}
-
-void
-partial_memory_test(void)
-{
-}
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/trace.c b/c/src/lib/libbsp/m68k/ods68302/startup/trace.c
index 46114eabc1..efe8abf3dd 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/trace.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/trace.c
@@ -1,9 +1,7 @@
-/*****************************************************************************/
/*
- Trace Exception dumps a back trace to the debug serial port
-
+ * Trace Exception dumps a back trace to the debug serial port
+ *
*/
-/*****************************************************************************/
#include <bsp.h>
#include <debugport.h>