Changeset 5039d92 in rtems


Ignore:
Timestamp:
10/12/14 19:00:22 (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, master
Children:
11c1657a
Parents:
5105833c
git-author:
Joel Sherrill <joel.sherrill@…> (10/12/14 19:00:22)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/13/14 15:33:30)
Message:

libcpu/powerpc/ppc403: Fix warnings

Location:
c/src/lib/libcpu/powerpc/ppc403
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/ppc403/clock/clock.c

    r5105833c r5039d92  
    229229}
    230230
    231 void Install_clock(void (*clock_isr)(void *))
     231static void Install_clock(void (*clock_isr)(void *))
    232232{
    233233  rtems_irq_connect_data clockIrqConnData;
     
    255255}
    256256
    257 void ReInstall_clock(void (*new_clock_isr)(void *))
    258 {
    259   uint32_t               isrlevel = 0;
     257/*
     258 * Called via atexit()
     259 * Remove the clock interrupt handler by setting handler to NULL
     260 *
     261 * This will not work on the 405GP because
     262 * when bit's are set in TCR they can only be unset by a reset
     263 */
     264void Clock_exit(void)
     265{
    260266  rtems_irq_connect_data clockIrqConnData;
    261 
    262   rtems_interrupt_disable(isrlevel);
    263267
    264268  clockIrqConnData.name = BSP_PIT;
     
    269273
    270274  BSP_remove_rtems_irq_handler (&clockIrqConnData);
    271 
    272   clockIrqConnData.on   = ClockOn;
    273   clockIrqConnData.off  = ClockOff;
    274   clockIrqConnData.isOn = ClockIsOn;
    275   clockIrqConnData.name = BSP_PIT;
    276   clockIrqConnData.hdl  = new_clock_isr;
    277 
    278   if (!BSP_install_rtems_irq_handler (&clockIrqConnData)) {
    279     printk("Unable to connect Clock Irq handler\n");
    280     rtems_fatal_error_occurred(1);
    281   }
    282 
    283   rtems_interrupt_enable(isrlevel);
    284 }
    285 
    286 /*
    287  * Called via atexit()
    288  * Remove the clock interrupt handler by setting handler to NULL
    289  *
    290  * This will not work on the 405GP because
    291  * when bit's are set in TCR they can only be unset by a reset
    292  */
    293 void Clock_exit(void)
    294 {
    295   rtems_irq_connect_data clockIrqConnData;
    296 
    297   clockIrqConnData.name = BSP_PIT;
    298   if (!BSP_get_current_rtems_irq_handler(&clockIrqConnData)) {
    299     printk("Unable to stop system clock\n");
    300     rtems_fatal_error_occurred(1);
    301   }
    302 
    303   BSP_remove_rtems_irq_handler (&clockIrqConnData);
    304275}
    305276
  • c/src/lib/libcpu/powerpc/ppc403/console/console405.c

    r5105833c r5039d92  
    5757#include "../irq/ictrl.h"
    5858#include <stdlib.h>                                     /* for atexit() */
    59 
    60 
     59#include <rtems/console.h>
    6160
    6261struct async {
  • c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c

    r5105833c r5039d92  
    1818#include "../irq/ictrl.h"
    1919#include <stdlib.h>                                     /* for atexit() */
     20#include <tty_drv.h>
    2021
    2122extern uint32_t bsp_serial_per_sec;
     
    150151
    151152
    152 int tty0_round(double x)
     153static int
     154tty0_round(double x)
    153155{
    154156  return (int)((int)((x-(int)x)*1000)>500 ? x+1 : x);
    155157}
    156158
    157 void
    158 tty0BaudSet(uint32_t   baudrate)
     159static void
     160tty0BaudSet(uint32_t baudrate)
    159161{
    160162  uint32_t   tmp;
     
    169171  tty0port->LCR = tty0port->LCR & ~LCR_DL;
    170172}
     173
    171174/*
    172175 * Hardware-dependent portion of tcsetattr().
     
    177180  int baud;
    178181
    179   /* FIXME: check c_cflag & CRTSCTS for hardware flowcontrol */
     182  /* FIXME: check c_cflag & CRTSCTS for hardware flow control */
    180183  /* FIXME: check and IMPLEMENT XON/XOFF                     */
    181184  switch (t->c_cflag & CBAUD) {
     
    324327 *
    325328 */
    326 void
    327 tty0DeInit(void)
     329static void tty0DeInit(void)
    328330{
    329331  /*
     
    344346 *
    345347 */
    346 rtems_status_code
     348static rtems_status_code
    347349tty0Initialize(void)
    348350{
     
    371373  /* Disable tty0port interrupts while changing hardware */
    372374  _ier = tty0port->IER;
     375  (void) _ier; /* avoid set but not used warning */
    373376  tty0port->IER = 0;
    374377
     
    396399    _tmp = tty0port->RBR;
    397400    _tmp = tty0port->MSR;
     401    (void) _tmp; /* avoid set but not used warning */
    398402
    399403    /* Enable recive interrupts, don't enable TxInt yet */
Note: See TracChangeset for help on using the changeset viewer.