Changeset 14a78df in rtems


Ignore:
Timestamp:
Apr 28, 2010, 5:17:59 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
00b5917
Parents:
af2af2b4
Message:

2010-04-28 Joel Sherrill <joel.sherrilL@…>

  • mpc5xx/clock/clock.c, mpc5xx/console-generic/console-generic.c, mpc5xx/irq/irq_init.c, mpc5xx/timer/timer.c: Remove warnings.
Location:
c/src/lib/libcpu/powerpc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/ChangeLog

    raf2af2b4 r14a78df  
     12010-04-28      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        * mpc5xx/clock/clock.c, mpc5xx/console-generic/console-generic.c,
     4        mpc5xx/irq/irq_init.c, mpc5xx/timer/timer.c: Remove warnings.
     5
    162010-04-25      Joel Sherrill <joel.sherrilL@OARcorp.com>
    27
  • c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c

    raf2af2b4 r14a78df  
    5353extern int BSP_connect_clock_handler(rtems_isr_entry);
    5454extern int BSP_disconnect_clock_handler();
     55extern uint32_t bsp_clicks_per_usec;
    5556
    5657void Clock_exit( void );
     
    8081  unsigned desiredLevel;
    8182  uint32_t pit_value;
    82   extern uint32_t bsp_clicks_per_usec;
    8383
    8484  /* calculate and set modulus */
  • c/src/lib/libcpu/powerpc/mpc5xx/console-generic/console-generic.c

    raf2af2b4 r14a78df  
    5050#include <mpc5xx.h>
    5151#include <mpc5xx/console.h>
    52 #include <libcpu/irq.h>
     52#include <bsp/irq.h>
    5353
    5454
     
    8686
    8787
     88extern uint32_t bsp_clock_speed;
     89
    8890/*
    8991 * Termios callback functions
     
    188190
    189191  /* Baud rate */
    190   switch (t->c_cflag & CBAUD) {
    191     default:      baud = -1;      break;
    192     case B50:     baud = 50;      break;
    193     case B75:     baud = 75;      break;
    194     case B110:    baud = 110;     break;
    195     case B134:    baud = 134;     break;
    196     case B150:    baud = 150;     break;
    197     case B200:    baud = 200;     break;
    198     case B300:    baud = 300;     break;
    199     case B600:    baud = 600;     break;
    200     case B1200:   baud = 1200;    break;
    201     case B1800:   baud = 1800;    break;
    202     case B2400:   baud = 2400;    break;
    203     case B4800:   baud = 4800;    break;
    204     case B9600:   baud = 9600;    break;
    205     case B19200:  baud = 19200;   break;
    206     case B38400:  baud = 38400;   break;
    207     case B57600:  baud = 57600;   break;
    208     case B115200: baud = 115200;  break;
    209     case B230400: baud = 230400;  break;
    210     case B460800: baud = 460800;  break;
    211   }
     192  baud = rtems_termios_baud_to_number( t->c_cflag & CBAUD );
    212193  if (baud > 0) {
    213     extern uint32_t bsp_clock_speed;
    214194    sccr0 &= ~QSMCM_SCI_BAUD(-1);
    215     sccr0 |=
    216       QSMCM_SCI_BAUD((bsp_clock_speed + (16 * baud)) / (32 * baud));
     195    sccr0 |= QSMCM_SCI_BAUD((bsp_clock_speed + (16 * baud)) / (32 * baud));
    217196  }
    218197
  • c/src/lib/libcpu/powerpc/mpc5xx/irq/irq_init.c

    raf2af2b4 r14a78df  
    2424#include <libcpu/vectors.h>
    2525#include <libcpu/raw_exception.h>
    26 #include <libcpu/irq.h>
    27 
     26#include <bsp/irq.h>
    2827
    2928extern rtems_exception_handler_t dispatch_irq_handler;
     
    3231
    3332/*
    34  * default on/off function
     33 * default methods
    3534 */
    36 static void nop_func(){}
     35static void nop_hdl(rtems_irq_hdl_param ignored)
     36{
     37}
    3738
    38 /*
    39  * default isOn function
    40  */
    41 static int not_connected(void) {return 0;}
     39static void nop_irq_enable(const struct __rtems_irq_connect_data__*ignored)
     40{
     41}
    4242
    43 /*
    44  * default possible isOn function
    45  */
    46 static int connected(void) {return 1;}
     43static void nop_raw_enable(
     44  const struct __rtems_raw_except_connect_data__*ignored
     45)
     46{
     47}
    4748
    48 static rtems_irq_connect_data           rtemsIrq[CPU_IRQ_COUNT];
    49 static rtems_irq_global_settings        initial_config;
    50 static rtems_irq_connect_data           defaultIrq = {
    51   /* vector,     hdl            ,handle         , on            , off           , isOn */
    52   0,             nop_func       ,NULL           , nop_func      , nop_func      , not_connected
     49static int irq_is_connected(const struct __rtems_irq_connect_data__*ignored)
     50{
     51  return 0;
     52}
     53
     54static int raw_is_connected(const struct __rtems_raw_except_connect_data__*ignored)
     55{
     56  return 0;
     57}
     58
     59static rtems_irq_connect_data     rtemsIrq[CPU_IRQ_COUNT];
     60static rtems_irq_global_settings  initial_config;
     61static rtems_irq_connect_data     defaultIrq = {
     62  0,                /* vector */
     63  nop_hdl,          /* hdl */
     64  NULL,             /* handle */
     65  nop_irq_enable,   /* on */
     66  nop_irq_enable,   /* off */
     67  irq_is_connected  /* isOn */
    5368};
    5469
     
    5671  /*
    5772   * actual priorities for interrupt :
    58    *    0   means that only current interrupt is masked
    59    *    255 means all other interrupts are masked
     73   *   0   means that only current interrupt is masked
     74   *   255 means all other interrupts are masked
    6075   */
    6176  /*
     
    119134     * Init initial Interrupt management config
    120135     */
    121     initial_config.irqNb        = CPU_IRQ_COUNT;
     136    initial_config.irqNb        = CPU_IRQ_COUNT;
    122137    initial_config.defaultEntry = defaultIrq;
    123     initial_config.irqHdlTbl    = rtemsIrq;
    124     initial_config.irqBase      = CPU_ASM_IRQ_VECTOR_BASE;
    125     initial_config.irqPrioTbl   = irqPrioTable;
     138    initial_config.irqHdlTbl    = rtemsIrq;
     139    initial_config.irqBase      = CPU_ASM_IRQ_VECTOR_BASE;
     140    initial_config.irqPrioTbl   = irqPrioTable;
    126141
    127142    if (!CPU_rtems_irq_mngt_set(&initial_config)) {
     
    136151   * expected interrupt sources : decrementer and external interrupts.
    137152   */
    138     vectorDesc.exceptIndex      =       ASM_DEC_VECTOR;
    139     vectorDesc.hdl.vector       =       ASM_DEC_VECTOR;
    140     vectorDesc.hdl.raw_hdl      =       dispatch_irq_handler;
    141     vectorDesc.on               =       nop_func;
    142     vectorDesc.off              =       nop_func;
    143     vectorDesc.isOn             =       connected;
     153    vectorDesc.exceptIndex = ASM_DEC_VECTOR;
     154    vectorDesc.hdl.vector  = ASM_DEC_VECTOR;
     155    vectorDesc.hdl.raw_hdl = dispatch_irq_handler;
     156    vectorDesc.on          = nop_raw_enable;
     157    vectorDesc.off         = nop_raw_enable;
     158    vectorDesc.isOn        = raw_is_connected;
    144159    if (!mpc5xx_set_exception (&vectorDesc)) {
    145160      BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
    146161    }
    147     vectorDesc.exceptIndex      =       ASM_EXT_VECTOR;
    148     vectorDesc.hdl.vector       =       ASM_EXT_VECTOR;
     162    vectorDesc.exceptIndex = ASM_EXT_VECTOR;
     163    vectorDesc.hdl.vector  = ASM_EXT_VECTOR;
    149164    if (!mpc5xx_set_exception (&vectorDesc)) {
    150165      BSP_panic("Unable to initialize RTEMS external raw exception\n");
  • c/src/lib/libcpu/powerpc/mpc5xx/timer/timer.c

    raf2af2b4 r14a78df  
    5555static bool benchmark_timer_find_average_overhead;
    5656
     57extern uint32_t bsp_timer_least_valid;
     58extern uint32_t bsp_timer_average_overhead;
     59
    5760/*
    5861 *  This is so small that this code will be reproduced where needed.
     
    8487  uint32_t clicks;
    8588  uint32_t total;
    86   extern uint32_t bsp_timer_least_valid;
    87   extern uint32_t bsp_timer_average_overhead;
    8889
    8990  clicks = get_itimer();
Note: See TracChangeset for help on using the changeset viewer.