Changeset 11f7aab in rtems


Ignore:
Timestamp:
Oct 18, 2011, 6:39:05 PM (10 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.11, 5, master
Children:
229bcca8
Parents:
7431fdc
Message:

2011-10-18 Jennifer Averett <Jennifer.Averett@…>

PR 1917/bsps

  • mongoosev/duart/mg5uart.c: Modifications to add dynamic tables for libchip serial drivers.
Location:
c/src/lib/libcpu/mips
Files:
2 edited

Legend:

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

    r7431fdc r11f7aab  
     12011-10-18      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     2
     3        PR 1917/bsps
     4        * mongoosev/duart/mg5uart.c: Modifications to add dynamic tables for
     5        libchip serial drivers.
     6
    172011-02-11      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.c

    r7431fdc r11f7aab  
    8989  rtems_interrupt_level  Irql;
    9090
    91   pMG5UART      = Console_Port_Tbl[minor].ulCtrlPort1;
    92   pMG5UART_port = Console_Port_Tbl[minor].ulCtrlPort2;
     91  pMG5UART      = Console_Port_Tbl[minor]->ulCtrlPort1;
     92  pMG5UART_port = Console_Port_Tbl[minor]->ulCtrlPort2;
    9393
    9494  /*
     
    162162   */
    163163
    164   if ( Console_Port_Tbl[minor].ulDataPort == MG5UART_UART0 )
     164  if ( Console_Port_Tbl[minor]->ulDataPort == MG5UART_UART0 )
    165165    shift = MONGOOSEV_UART0_CMD_SHIFT;
    166166  else
     
    198198  unsigned int pMG5UART_port;
    199199
    200   pMG5UART      = Console_Port_Tbl[minor].ulCtrlPort1;
    201   pMG5UART_port = Console_Port_Tbl[minor].ulCtrlPort2;
     200  pMG5UART      = Console_Port_Tbl[minor]->ulCtrlPort1;
     201  pMG5UART_port = Console_Port_Tbl[minor]->ulCtrlPort2;
    202202
    203203  pmg5uartContext->mate = -1;
    204204
    205205  for (port=0 ; port<Console_Port_Count ; port++ ) {
    206     if ( Console_Port_Tbl[port].ulCtrlPort1 == pMG5UART &&
    207          Console_Port_Tbl[port].ulCtrlPort2 != pMG5UART_port ) {
     206    if ( Console_Port_Tbl[port]->ulCtrlPort1 == pMG5UART &&
     207         Console_Port_Tbl[port]->ulCtrlPort2 != pMG5UART_port ) {
    208208      pmg5uartContext->mate = port;
    209209      break;
     
    234234  mg5uart_initialize_context( minor, pmg5uartContext );
    235235
    236   pMG5UART      = Console_Port_Tbl[minor].ulCtrlPort1;
    237   pMG5UART_port = Console_Port_Tbl[minor].ulCtrlPort2;
    238 
    239   if ( Console_Port_Tbl[minor].ulDataPort == MG5UART_UART0 )
     236  pMG5UART      = Console_Port_Tbl[minor]->ulCtrlPort1;
     237  pMG5UART_port = Console_Port_Tbl[minor]->ulCtrlPort2;
     238
     239  if ( Console_Port_Tbl[minor]->ulDataPort == MG5UART_UART0 )
    240240     shift = MONGOOSEV_UART0_CMD_SHIFT;
    241241  else
     
    279279  rtems_interrupt_level  Irql;
    280280
    281   pMG5UART      = Console_Port_Tbl[minor].ulCtrlPort1;
    282   pMG5UART_port = Console_Port_Tbl[minor].ulCtrlPort2;
    283   vector        = Console_Port_Tbl[minor].ulIntVector;
    284 
    285   if ( Console_Port_Tbl[minor].ulDataPort == MG5UART_UART0 )
     281  pMG5UART      = Console_Port_Tbl[minor]->ulCtrlPort1;
     282  pMG5UART_port = Console_Port_Tbl[minor]->ulCtrlPort2;
     283  vector        = Console_Port_Tbl[minor]->ulIntVector;
     284
     285  if ( Console_Port_Tbl[minor]->ulDataPort == MG5UART_UART0 )
    286286    shift = MONGOOSEV_UART0_CMD_SHIFT;
    287287  else
     
    333333  rtems_interrupt_level  Irql;
    334334
    335   pMG5UART      = Console_Port_Tbl[minor].ulCtrlPort1;
    336   pMG5UART_port = Console_Port_Tbl[minor].ulCtrlPort2;
     335  pMG5UART      = Console_Port_Tbl[minor]->ulCtrlPort1;
     336  pMG5UART_port = Console_Port_Tbl[minor]->ulCtrlPort2;
    337337
    338338  /*
     
    344344  cmd = MONGOOSEV_UART_CMD_TX_DISABLE | MONGOOSEV_UART_CMD_RX_DISABLE;
    345345
    346   if ( Console_Port_Tbl[minor].ulDataPort == MG5UART_UART0 )
     346  if ( Console_Port_Tbl[minor]->ulDataPort == MG5UART_UART0 )
    347347    shift = MONGOOSEV_UART0_CMD_SHIFT;
    348348  else
     
    381381  int                     timeout;
    382382
    383   pMG5UART      = Console_Port_Tbl[minor].ulCtrlPort1;
    384   pMG5UART_port = Console_Port_Tbl[minor].ulCtrlPort2;
    385 
    386   if ( Console_Port_Tbl[minor].ulDataPort == MG5UART_UART0 )
     383  pMG5UART      = Console_Port_Tbl[minor]->ulCtrlPort1;
     384  pMG5UART_port = Console_Port_Tbl[minor]->ulCtrlPort2;
     385
     386  if ( Console_Port_Tbl[minor]->ulDataPort == MG5UART_UART0 )
    387387    shift = MONGOOSEV_UART0_IRQ_SHIFT;
    388388  else
     
    455455    \
    456456    for(minor=0 ; minor<Console_Port_Count ; minor++) { \
    457       if( Console_Port_Tbl[minor].deviceType == SERIAL_MG5UART && \
    458           vector == Console_Port_Tbl[minor].ulIntVector + _OFFSET ) { \
     457      if( Console_Port_Tbl[minor]->deviceType == SERIAL_MG5UART && \
     458          vector == Console_Port_Tbl[minor]->ulIntVector + _OFFSET ) { \
    459459        mg5uart_process_isr_ ## _TYPE (minor); \
    460460        return; \
     
    479479  int                     shift;
    480480
    481   pMG5UART      = Console_Port_Tbl[minor].ulCtrlPort1;
    482 
    483   if ( Console_Port_Tbl[minor].ulDataPort == MG5UART_UART0 )
     481  pMG5UART      = Console_Port_Tbl[minor]->ulCtrlPort1;
     482
     483  if ( Console_Port_Tbl[minor]->ulDataPort == MG5UART_UART0 )
    484484    shift = MONGOOSEV_UART0_IRQ_SHIFT;
    485485  else
     
    524524   int             shift;
    525525
    526    pMG5UART      = Console_Port_Tbl[minor].ulCtrlPort1;
     526   pMG5UART      = Console_Port_Tbl[minor]->ulCtrlPort1;
    527527
    528528   mg5uart_enable_interrupts(minor, MG5UART_ENABLE_ALL_EXCEPT_TX);
    529529
    530    if ( Console_Port_Tbl[minor].ulDataPort == MG5UART_UART0 )
     530   if ( Console_Port_Tbl[minor]->ulDataPort == MG5UART_UART0 )
    531531      shift = MONGOOSEV_UART0_IRQ_SHIFT;
    532532   else
     
    581581  char       c;
    582582
    583   pMG5UART_port = Console_Port_Tbl[minor].ulCtrlPort2;
     583  pMG5UART_port = Console_Port_Tbl[minor]->ulCtrlPort2;
    584584
    585585  /* reading the RX buffer automatically resets the interrupt flag */
     
    610610
    611611  Console_Port_Data[minor].bActive = FALSE;
    612   v = Console_Port_Tbl[minor].ulIntVector;
     612  v = Console_Port_Tbl[minor]->ulIntVector;
    613613
    614614  set_vector(mg5uart_isr_rx_frame_error,   v + MG5UART_IRQ_RX_FRAME_ERROR, 1);
     
    640640  uint32_t        pMG5UART_port;
    641641
    642   pMG5UART_port = Console_Port_Tbl[minor].ulCtrlPort2;
     642  pMG5UART_port = Console_Port_Tbl[minor]->ulCtrlPort2;
    643643
    644644  /*
     
    716716  uint32_t                tmp,shift;
    717717
    718   pMG5UART      = Console_Port_Tbl[minor].ulCtrlPort1;
    719   pMG5UART_port = Console_Port_Tbl[minor].ulCtrlPort2;
    720 
    721   if ( Console_Port_Tbl[minor].ulDataPort == MG5UART_UART0 )
     718  pMG5UART      = Console_Port_Tbl[minor]->ulCtrlPort1;
     719  pMG5UART_port = Console_Port_Tbl[minor]->ulCtrlPort2;
     720
     721  if ( Console_Port_Tbl[minor]->ulDataPort == MG5UART_UART0 )
    722722    shift = MONGOOSEV_UART0_IRQ_SHIFT;
    723723  else
     
    763763  baud_requested = rtems_termios_baud_to_number( baud_requested );
    764764
    765   clock = (uint32_t) Console_Port_Tbl[minor].ulClock;
     765  clock = (uint32_t) Console_Port_Tbl[minor]->ulClock;
    766766  if (!clock)
    767767    rtems_fatal_error_occurred(RTEMS_INVALID_NUMBER);
     
    814814  rtems_interrupt_level  Irql;
    815815
    816   pMG5UART = Console_Port_Tbl[minor].ulCtrlPort1;
     816  pMG5UART = Console_Port_Tbl[minor]->ulCtrlPort1;
    817817
    818818  /*
     
    820820   */
    821821
    822   if ( Console_Port_Tbl[minor].ulDataPort == MG5UART_UART0 )
     822  if ( Console_Port_Tbl[minor]->ulDataPort == MG5UART_UART0 )
    823823    shift = MONGOOSEV_UART0_IRQ_SHIFT;
    824824  else
Note: See TracChangeset for help on using the changeset viewer.