Changeset f3173c0 in rtems


Ignore:
Timestamp:
Nov 4, 2005, 12:23:28 AM (14 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
ab20575
Parents:
0ac68b0
Message:

2005-11-03 <strauman@…>

  • mvme5500/irq/irq.h, psim/irq/irq.h, shared/console/uart.c, shared/irq/irq.h: Renamed BSP_ISA_UART_COMx_IRQ -> BSP_UART_COMx_IRQ

(uart driver is ISA independent).
Removed ugly #ifdef mvme2100. Added test for

BSP_UART_USE_SHARED_IRQS symbol which a BSP can define to request
that the serial interrupt be shared.

Location:
c/src/lib/libbsp/powerpc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h

    r0ac68b0 rf3173c0  
    111111
    112112  /* on the MVME5500, these are the GT64260B external GPP0 interrupt */
    113 #define BSP_ISA_UART_COM2_IRQ           (BSP_GPP_IRQ_LOWEST_OFFSET)
    114 #define BSP_ISA_UART_COM1_IRQ           (BSP_GPP_IRQ_LOWEST_OFFSET)
     113#define BSP_UART_COM2_IRQ               (BSP_GPP_IRQ_LOWEST_OFFSET)
     114#define BSP_UART_COM1_IRQ               (BSP_GPP_IRQ_LOWEST_OFFSET)
    115115#define BSP_GPP8_IRQ_OFFSET             (BSP_GPP_IRQ_LOWEST_OFFSET+8)
    116116#define BSP_GPP_PMC1_INTA               (BSP_GPP8_IRQ_OFFSET)
  • c/src/lib/libbsp/powerpc/psim/irq/irq.h

    r0ac68b0 rf3173c0  
    106106#define BSP_ISA_KEYBOARD                (1)
    107107
    108 #define BSP_ISA_UART_COM2_IRQ           (3)
     108#define BSP_UART_COM2_IRQ               (3)
    109109
    110 #define BSP_ISA_UART_COM1_IRQ           (4)
     110#define BSP_UART_COM1_IRQ               (4)
    111111
    112112#define BSP_ISA_RT_TIMER1               (8)
  • c/src/lib/libbsp/powerpc/shared/console/uart.c

    r0ac68b0 rf3173c0  
    2222{
    2323  unsigned long                 ioBase;
     24  int                                   irq;
    2425  int                                   hwFlow;
    2526  int                                   baud;
     
    4243#ifdef  BSP_UART_IOBASE_COM1
    4344                BSP_UART_IOBASE_COM1,
     45                BSP_UART_COM1_IRQ,
    4446#else
    4547                UART_UNSUPP,
     48                -1,
    4649#endif
    4750        },
     
    4952#ifdef  BSP_UART_IOBASE_COM2
    5053                BSP_UART_IOBASE_COM2,
     54                BSP_UART_COM2_IRQ,
    5155#else
    5256                UART_UNSUPP,
     57                -1,
    5358#endif
    5459        },
     
    136141  /* Sanity check */
    137142  SANITY_CHECK(uart);
     143 
     144  /* Make sure any printk activity drains before
     145   * re-initializing.
     146   */
     147  while ( ! (uread(uart, LSR) & THRE) )
     148        ;
    138149
    139150  switch(baud)
     
    461472  int uart;
    462473
    463 #if defined(mvme2100)
    464   uart = BSP_UART_COM1;
    465 #else
    466   uart = (irq->name == BSP_ISA_UART_COM1_IRQ) ?
     474  uart = (irq->name == BSP_UART_COM1_IRQ) ?
    467475                        BSP_UART_COM1 : BSP_UART_COM2;
    468 #endif
     476
    469477  return uread(uart,IER);
    470478}
     
    474482{
    475483        rtems_irq_connect_data d={0};
    476 #if defined(mvme2100)
    477         d.name = BSP_UART_COM1_IRQ;
    478 #else
    479         d.name = (uart == BSP_UART_COM1) ?
    480                         BSP_ISA_UART_COM1_IRQ : BSP_ISA_UART_COM2_IRQ;
    481 #endif
     484        d.name = uart_data[uart].irq;
    482485        d.off  = d.on = uart_noop;
    483486        d.isOn = uart_isr_is_on;
     
    489492BSP_uart_install_isr(int uart, rtems_irq_hdl handler)
    490493{
     494/* Using shared interrupts by default might break things.. the
     495 * shared IRQ installer uses malloc() and if a BSP had called this
     496 * during early init it might not work...
     497 */
     498#ifdef BSP_UART_USE_SHARED_IRQS
     499        return doit(uart, handler, BSP_install_rtems_shared_irq_handler);
     500#else
    491501        return doit(uart, handler, BSP_install_rtems_irq_handler);
     502#endif
    492503}
    493504
  • c/src/lib/libbsp/powerpc/shared/irq/irq.h

    r0ac68b0 rf3173c0  
    131131#define BSP_FRONT_PANEL_ABORT_IRQ       (BSP_PCI_IRQ_LOWEST_OFFSET + 14)
    132132#define BSP_RTC_IRQ                     (BSP_PCI_IRQ_LOWEST_OFFSET + 15)
     133#else
     134#define BSP_UART_COM1_IRQ               BSP_ISA_UART_COM1_IRQ
     135#define BSP_UART_COM2_IRQ               BSP_ISA_UART_COM2_IRQ
    133136#endif
    134137
Note: See TracChangeset for help on using the changeset viewer.