summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-12 14:00:22 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-13 10:33:30 -0500
commit5039d92c5db14696096bcf0ee92c77cf868c1e4c (patch)
tree66c94a1054ea6b0c3a8a851ed3b622536e4e316f /c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c
parentlibcpu/m68k/mcf5272/clock/ckinit.c: Fix warnings (diff)
downloadrtems-5039d92c5db14696096bcf0ee92c77cf868c1e4c.tar.bz2
libcpu/powerpc/ppc403: Fix warnings
Diffstat (limited to '')
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c b/c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c
index 0733ddb0ba..1d7b0135bd 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c
+++ b/c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c
@@ -17,6 +17,7 @@
#include <rtems/libio.h>
#include "../irq/ictrl.h"
#include <stdlib.h> /* for atexit() */
+#include <tty_drv.h>
extern uint32_t bsp_serial_per_sec;
extern bool bsp_serial_external_clock;
@@ -149,13 +150,14 @@ static const tty0pasync tty0port = (tty0pasync)(0xEF600300 + (TTY0_USE_UART*0x
static void *tty0ttyp; /* handle for termios */
-int tty0_round(double x)
+static int
+tty0_round(double x)
{
return (int)((int)((x-(int)x)*1000)>500 ? x+1 : x);
}
-void
-tty0BaudSet(uint32_t baudrate)
+static void
+tty0BaudSet(uint32_t baudrate)
{
uint32_t tmp;
@@ -168,6 +170,7 @@ tty0BaudSet(uint32_t baudrate)
tty0port->LCR = tty0port->LCR & ~LCR_DL;
}
+
/*
* Hardware-dependent portion of tcsetattr().
*/
@@ -176,7 +179,7 @@ tty0SetAttributes (int minor, const struct termios *t)
{
int baud;
- /* FIXME: check c_cflag & CRTSCTS for hardware flowcontrol */
+ /* FIXME: check c_cflag & CRTSCTS for hardware flow control */
/* FIXME: check and IMPLEMENT XON/XOFF */
switch (t->c_cflag & CBAUD) {
default: baud = -1; break;
@@ -323,8 +326,7 @@ static rtems_isr tty0serial_ISR(rtems_vector_number v)
* deinit TTY0
*
*/
-void
-tty0DeInit(void)
+static void tty0DeInit(void)
{
/*
* disable interrupts for serial tty0port
@@ -343,7 +345,7 @@ tty0DeInit(void)
* init SPI
*
*/
-rtems_status_code
+static rtems_status_code
tty0Initialize(void)
{
register unsigned tmp;
@@ -370,6 +372,7 @@ tty0Initialize(void)
/* Disable tty0port interrupts while changing hardware */
_ier = tty0port->IER;
+ (void) _ier; /* avoid set but not used warning */
tty0port->IER = 0;
/* set up tty0port control: 8 bit,1 stop,no parity */
@@ -395,6 +398,7 @@ tty0Initialize(void)
_tmp = tty0port->LSR;
_tmp = tty0port->RBR;
_tmp = tty0port->MSR;
+ (void) _tmp; /* avoid set but not used warning */
/* Enable recive interrupts, don't enable TxInt yet */
tty0port->IER=IER_RCV;