Index: c/src/lib/libcpu/bfin/serial/uart.c
===================================================================
--- c/src/lib/libcpu/bfin/serial/uart.c	(revision c49985691f1cd3769ef4bfaa503f3c6eb7e4385a)
+++ c/src/lib/libcpu/bfin/serial/uart.c	(revision ed6365aa08fed6dc44d2d1e3876e77bcac44a400)
@@ -1,4 +1,6 @@
 /*  UART driver for Blackfin
- *
+ */
+
+/*
  *  Copyright (c) 2008 Kallisti Labs, Los Gatos, CA, USA
  *             written by Allan Hessenflow <allanh@kallisti.com>
@@ -9,5 +11,4 @@
  */
  
-
 #include <rtems.h>
 #include <rtems/libio.h>
@@ -23,9 +24,8 @@
 #define BFIN_UART_XMIT_BUSY 0x01
 
-
 static bfin_uart_config_t *uartsConfig;
 
-
-static int pollRead(int minor) {
+static int pollRead(int minor)
+{
   int c;
   uint32_t base;
@@ -45,5 +45,6 @@
 }
 
-char bfin_uart_poll_read(rtems_device_minor_number minor) {
+char bfin_uart_poll_read(rtems_device_minor_number minor)
+{
   int c;
 
@@ -55,5 +56,6 @@
 }
 
-void bfin_uart_poll_write(int minor, char c) {
+void bfin_uart_poll_write(int minor, char c)
+{
   uint32_t base;
 
@@ -65,52 +67,4 @@
 }
 
-/* begin BISON */
-void debug_write_char(char c) {
-  bfin_uart_poll_write(0, c);
-}
-
-void debug_write_string(char *s) {
-
-  while (s && *s) {
-    if (*s == '\n')
-      debug_write_char('\r');
-    debug_write_char(*s++);
-  }
-}
-
-void debug_write_crlf(void) {
-
-  debug_write_char('\r');
-  debug_write_char('\n');
-}
-
-void debug_write_nybble(int nybble) {
-
-  nybble &= 0x0f;
-  debug_write_char((nybble > 9) ? 'a' + (nybble - 10) : '0' + nybble);
-}
-
-void debug_write_byte(int byte) {
-
-  byte &= 0xff;
-  debug_write_nybble(byte >> 4);
-  debug_write_nybble(byte & 0x0f);
-}
-
-void debug_write_half(int half) {
-
-  half &= 0xffff;
-  debug_write_byte(half >> 8);
-  debug_write_byte(half & 0xff);
-}
-
-void debug_write_word(int word) {
-
-  word &= 0xffffffff;
-  debug_write_half(word >> 16);
-  debug_write_half(word & 0xffff);
-}
-/* end BISON */
-
 /*
  *  Console Termios Support Entry Points
@@ -118,6 +72,6 @@
  */
 
-static ssize_t pollWrite(int minor, const char *buf, size_t len) {
-
+static ssize_t pollWrite(int minor, const char *buf, size_t len)
+{
   size_t count;
   for ( count = 0; count < len; count++ )
@@ -127,5 +81,4 @@
 }
 
-
 /**
  * Routine to initialize the hardware. It initialize the DMA,
@@ -133,5 +86,6 @@
  * @param channel channel information
  */
-static void initializeHardware(bfin_uart_channel_t *channel) {
+static void initializeHardware(bfin_uart_channel_t *channel)
+{
   uint16_t divisor        = 0;
   uint32_t base           = 0;
@@ -189,6 +143,4 @@
     */
   }
-
-  return;
 }
 
@@ -200,5 +152,6 @@
  * @return
  */
-static int setAttributes(int minor, const struct termios *termios) {
+static int setAttributes(int minor, const struct termios *termios)
+{
   uint32_t base;
   int baud;
@@ -208,94 +161,44 @@
   base = uartsConfig->channels[minor].uart_baseAddress;
   switch (termios->c_cflag & CBAUD) {
-  case B0:
-    baud = 0;
-    break;
-  case B50:
-    baud = 50;
-    break;
-  case B75:
-    baud = 75;
-    break;
-  case B110:
-    baud = 110;
-    break;
-  case B134:
-    baud = 134;
-    break;
-  case B150:
-    baud = 150;
-    break;
-  case B200:
-    baud = 200;
-    break;
-  case B300:
-    baud = 300;
-    break;
-  case B600:
-    baud = 600;
-    break;
-  case B1200:
-    baud = 1200;
-    break;
-  case B1800:
-    baud = 1800;
-    break;
-  case B2400:
-    baud = 2400;
-    break;
-  case B4800:
-    baud = 4800;
-    break;
-  case B9600:
-    baud = 9600;
-    break;
-  case B19200:
-    baud = 19200;
-    break;
-  case B38400:
-    baud = 38400;
-    break;
-  case B57600:
-    baud = 57600;
-    break;
-  case B115200:
-    baud = 115200;
-    break;
-  case B230400:
-    baud = 230400;
-    break;
-  case B460800:
-    baud = 460800;
-    break;
-  default:
-    baud = -1;
-    break;
+    case B0:      baud = 0;      break;
+    case B50:     baud = 50;     break;
+    case B75:     baud = 75;     break;
+    case B110:    baud = 110;    break;
+    case B134:    baud = 134;    break;
+    case B150:    baud = 150;    break;
+    case B200:    baud = 200;    break;
+    case B300:    baud = 300;    break;
+    case B600:    baud = 600;    break;
+    case B1200:   baud = 1200;   break;
+    case B1800:   baud = 1800;   break;
+    case B2400:   baud = 2400;   break;
+    case B4800:   baud = 4800;   break;
+    case B9600:   baud = 9600;   break;
+    case B19200:  baud = 19200;  break;
+    case B38400:  baud = 38400;  break;
+    case B57600:  baud = 57600;  break;
+    case B115200: baud = 115200; break;
+    case B230400: baud = 230400; break;
+    case B460800: baud = 460800; break;
+    default: baud = -1; break;
   }
   if (baud > 0 && uartsConfig->channels[minor].uart_baud)
     baud = uartsConfig->channels[minor].uart_baud;
   switch (termios->c_cflag & CSIZE) {
-  case CS5:
-    lcr = UART_LCR_WLS_5;
-    break;
-  case CS6:
-    lcr = UART_LCR_WLS_6;
-    break;
-  case CS7:
-    lcr = UART_LCR_WLS_7;
-    break;
-  case CS8:
+  case CS5: lcr = UART_LCR_WLS_5; break;
+  case CS6: lcr = UART_LCR_WLS_6; break;
+  case CS7: lcr = UART_LCR_WLS_7; break;
   default:
-    lcr = UART_LCR_WLS_8;
-    break;
+  case CS8: lcr = UART_LCR_WLS_8; break;
   }
   switch (termios->c_cflag & (PARENB | PARODD)) {
-  case PARENB:
-    lcr |= UART_LCR_PEN | UART_LCR_EPS;
-    break;
-  case PARENB | PARODD:
-  lcr |= UART_LCR_PEN;
-  break;
-  default:
-    break;
+    case PARENB:
+      lcr |= UART_LCR_PEN | UART_LCR_EPS;
+      break;
+    case PARENB | PARODD:
+      lcr |= UART_LCR_PEN;
+      break;
+    default:
+      break;
   }
   if (termios->c_cflag & CSTOPB)
@@ -321,5 +224,6 @@
  * @return
  */
-static ssize_t uart_interruptWrite(int minor, const char *buf, size_t len) {
+static ssize_t uart_interruptWrite(int minor, const char *buf, size_t len)
+{
   uint32_t              base      = 0;
   bfin_uart_channel_t*  channel   = NULL;
@@ -352,6 +256,6 @@
 
 /**
-* This function implements RX ISR
-*/
+ * This function implements RX ISR
+ */
 void bfinUart_rxIsr(void *_arg)
 {
@@ -359,7 +263,5 @@
    * TODO: UART RX ISR implementation.
    */
-
-}
-
+}
 
 /**
@@ -371,5 +273,6 @@
  * @param _arg gets the channel information.
  */
-void bfinUart_txIsr(void *_arg) {
+void bfinUart_txIsr(void *_arg)
+{
   bfin_uart_channel_t*  channel = NULL;
   uint32_t              base    = 0;
@@ -391,10 +294,5 @@
 
   rtems_termios_dequeue_characters(channel->termios, channel->length);
-
-  return;
-}
-
-
-
+}
 
 /**
@@ -407,5 +305,6 @@
  * @return data already written
  */
-static ssize_t uart_DmaWrite(int minor, const char *buf, size_t len) {
+static ssize_t uart_DmaWrite(int minor, const char *buf, size_t len)
+{
   uint32_t              base        = 0;
   bfin_uart_channel_t*  channel     = NULL;
@@ -444,5 +343,4 @@
 }
 
-
 /**
  * RX DMA ISR.
@@ -451,5 +349,6 @@
  * @param _arg
  */
-void bfinUart_rxDmaIsr(void *_arg) {
+void bfinUart_rxDmaIsr(void *_arg)
+{
 /**
  * TODO: Implementation of RX DMA
@@ -468,5 +367,6 @@
  * channel argument.
  */
-void bfinUart_txDmaIsr(void *_arg) {
+void bfinUart_txDmaIsr(void *_arg)
+{
   bfin_uart_channel_t*  channel     = NULL;
   uint32_t              tx_dma_base = 0;
@@ -496,6 +396,4 @@
      */
   }
-
-  return;
 }
 
@@ -503,10 +401,9 @@
  * Function called during exit
  */
-void uart_exit(void)
+static void uart_exit(void)
 {
   /**
    * TODO: Flushing of quques
    */
-
 }
 
@@ -572,5 +469,4 @@
   };
 
-
   if ( NULL == uartsConfig || 0 > minor || minor >= uartsConfig->num_channels) {
     return RTEMS_INVALID_NUMBER;
@@ -599,5 +495,4 @@
 }
 
-
 /**
 * Uart initialization function.
@@ -606,6 +501,9 @@
 * @return rtems status code
 */
-rtems_status_code bfin_uart_initialize(rtems_device_major_number major,
-    bfin_uart_config_t *config) {
+rtems_status_code bfin_uart_initialize(
+  rtems_device_major_number major,
+  bfin_uart_config_t *config
+)
+{
   rtems_status_code sc = RTEMS_NOT_DEFINED;
   int               i  = 0;
