summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-16 15:12:34 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-19 17:00:56 -0500
commitf3a66a3e6862f47cd77276885bfe2b139228be86 (patch)
tree9db5ac6d6a2e5113be55269341b734641ef5e80f
parentcsb350/console/console-io.c: Fix warnings (diff)
downloadrtems-f3a66a3e6862f47cd77276885bfe2b139228be86.tar.bz2
mips/hurricane: Fix warnings
-rw-r--r--c/src/lib/libbsp/mips/hurricane/console/console.c78
-rw-r--r--c/src/lib/libbsp/mips/hurricane/include/bsp.h11
-rw-r--r--c/src/lib/libbsp/mips/hurricane/start/start.S1
-rw-r--r--c/src/lib/libbsp/mips/hurricane/startup/inittlb.c3
4 files changed, 27 insertions, 66 deletions
diff --git a/c/src/lib/libbsp/mips/hurricane/console/console.c b/c/src/lib/libbsp/mips/hurricane/console/console.c
index f2aa3a4dc6..ccc6f93aa9 100644
--- a/c/src/lib/libbsp/mips/hurricane/console/console.c
+++ b/c/src/lib/libbsp/mips/hurricane/console/console.c
@@ -1,6 +1,8 @@
/*
* This file contains the IDT 4650 console IO package.
- *
+ */
+
+/*
* Author: Craig Lebakken <craigl@transition.com>
*
* COPYRIGHT (c) 1996 by Transition Networks Inc.
@@ -31,8 +33,8 @@
#include <ctype.h>
/* PMON entry points */
-int mon_read(int fd, char *buf, int cnt); /* stdin is fd=0 */
-int mon_write(int fd, char *buf, int cnt); /* stdout is fd=1 */
+int mon_read(int fd, char *buf, int cnt); /* stdin is fd=0 */
+int mon_write(int fd, char *buf, int cnt); /* stdout is fd=1 */
/* console_initialize
*
@@ -44,7 +46,6 @@ int mon_write(int fd, char *buf, int cnt); /* stdout is fd=1 */
*
* Return values:
*/
-
rtems_device_driver console_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -65,81 +66,42 @@ rtems_device_driver console_initialize(
return RTEMS_SUCCESSFUL;
}
-
-/* is_character_ready
- *
- * This routine returns TRUE if a character is available.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values:
- */
-
-bool is_character_ready(
- char *ch
-)
-{
- *ch = '\0'; /* return NULL for no particular reason */
- return true;
-}
-
/* inbyte
*
* This routine reads a character from the SOURCE.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values:
- * character read from SOURCE
*/
-
-char inbyte( void )
+static char inbyte( void )
{
- char buf[10];
+ char buf[10];
+
/*
* If polling, wait until a character is available.
*/
+ mon_read(0, buf, 1); /* stdin is fd=0, read 1 byte */
- mon_read(0, buf, 1); /* stdin is fd=0, read 1 byte */
-
- return (buf[0]);
+ return (buf[0]);
}
/* outbyte
*
* This routine transmits a character out the SOURCE. It may support
* XON/XOFF flow control.
- *
- * Input parameters:
- * ch - character to be transmitted
- *
- * Output parameters: NONE
*/
-
-void outbyte(
+static void outbyte(
char ch
)
{
- char buf[10];
+ char buf[10];
/*
* If polling, wait for the transmitter to be ready.
* Check for flow control requests and process.
* Then output the character.
*/
- buf[0] = ch;
+ buf[0] = ch;
- mon_write( 1, buf, 1 ); /* stdout is fd=1, write 1 byte */
+ mon_write( 1, buf, 1 ); /* stdout is fd=1, write 1 byte */
}
-
-#if 0
-static int console_fd = -1;
-#endif
-
/*
* Open entry point
*/
@@ -150,9 +112,6 @@ rtems_device_driver console_open(
void * arg
)
{
-#if 0
- int console_fd = open("tty0", 2); /* open for read/write */
-#endif
return RTEMS_SUCCESSFUL;
}
@@ -166,17 +125,12 @@ rtems_device_driver console_close(
void * arg
)
{
-#if 0
- if ( console_fd )
- close( console_fd );
-#endif
return RTEMS_SUCCESSFUL;
}
/*
* 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,
@@ -208,7 +162,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,
@@ -239,7 +192,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,
@@ -251,7 +203,7 @@ rtems_device_driver console_control(
#include <rtems/bspIo.h>
-void hurricane_output_char(char c) { outbyte( c ); }
+static void hurricane_output_char(char c) { outbyte( c ); }
BSP_output_char_function_type BSP_output_char = hurricane_output_char;
BSP_polling_getchar_function_type BSP_poll_char = NULL;
diff --git a/c/src/lib/libbsp/mips/hurricane/include/bsp.h b/c/src/lib/libbsp/mips/hurricane/include/bsp.h
index 92453d5bde..e297ba8788 100644
--- a/c/src/lib/libbsp/mips/hurricane/include/bsp.h
+++ b/c/src/lib/libbsp/mips/hurricane/include/bsp.h
@@ -1,6 +1,5 @@
/**
* @file
- *
*/
/*
@@ -15,6 +14,8 @@
#ifndef _BSP_H
#define _BSP_H
+#ifndef ASM
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -66,8 +67,16 @@ extern uint32_t mips_get_timer( void );
#define RAM_START 0
#define RAM_END 0x100000
+/*
+ * Prototypes for methods called from .S for dependency tracking
+ */
+void init_tlb(void);
+void resettlb(int i);
+
#ifdef __cplusplus
}
#endif
+#endif /* !ASM */
+
#endif /* __HURRICANE_BSP_h */
diff --git a/c/src/lib/libbsp/mips/hurricane/start/start.S b/c/src/lib/libbsp/mips/hurricane/start/start.S
index 0e24995edf..e3d97cd167 100644
--- a/c/src/lib/libbsp/mips/hurricane/start/start.S
+++ b/c/src/lib/libbsp/mips/hurricane/start/start.S
@@ -33,6 +33,7 @@ LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
#include <rtems/mips/idtcpu.h>
#include <rtems/asm.h>
+#include <bsp.h>
#if 0
.extern _fdata,4 /* this is defined by the linker */
diff --git a/c/src/lib/libbsp/mips/hurricane/startup/inittlb.c b/c/src/lib/libbsp/mips/hurricane/startup/inittlb.c
index 27518d0ad0..800cf3d23c 100644
--- a/c/src/lib/libbsp/mips/hurricane/startup/inittlb.c
+++ b/c/src/lib/libbsp/mips/hurricane/startup/inittlb.c
@@ -1,7 +1,6 @@
+#include <bsp.h>
#include <rtems/mips/idtcpu.h>
-extern void resettlb( int i );
-
void init_tlb(void)
{
int i;