Changeset d1e10fe6 in rtems


Ignore:
Timestamp:
Feb 15, 2011, 11:25:24 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
a0323a9f
Parents:
fa47ade
Message:

2011-02-15 Jennifer Averett

  • libchip/serial/ns16550.c, libchip/serial/ns16550_p.h: Support i386 style IRQs.
Location:
c/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/ChangeLog

    rfa47ade rd1e10fe6  
     12011-02-15      Jennifer Averett
     2
     3        * libchip/serial/ns16550.c, libchip/serial/ns16550_p.h: Support i386
     4        style IRQs.
     5
    162011-02-11      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/libchip/serial/ns16550.c

    rfa47ade rd1e10fe6  
    5050    #define BSP_FEATURE_IRQ_LEGACY_SHARED_HANDLER_SUPPORT
    5151  #endif
     52#elif defined(__i386__)
     53  #include <bsp/irq.h>
    5254#endif
    5355
     
    473475}
    474476
    475 #if defined(BSP_FEATURE_IRQ_EXTENSION) || defined(BSP_FEATURE_IRQ_LEGACY)
    476477
    477478/**
     
    522523  } while ((get( port, NS16550_INTERRUPT_ID) & SP_IID_0) == 0);
    523524}
     525#if defined(BSP_FEATURE_IRQ_EXTENSION) || defined(BSP_FEATURE_IRQ_LEGACY)
    524526#endif
    525527
     
    579581}
    580582
     583 NS16550_STATIC rtems_isr ns16550_isr(void *arg)
     584 {
     585    int minor = (int) arg;
     586
     587    ns16550_process( minor);
     588 }
     589
     590/*
     591 *  ns16550_initialize_interrupts
     592 *
     593 *  This routine initializes the port to operate in interrupt driver mode.
     594 */
     595NS16550_STATIC void ns16550_initialize_interrupts( int minor)
     596{
    581597#if defined(BSP_FEATURE_IRQ_EXTENSION) || defined(BSP_FEATURE_IRQ_LEGACY)
    582   NS16550_STATIC rtems_isr ns16550_isr(void *arg)
    583   {
    584     int minor = (int) arg;
    585 
    586     ns16550_process( minor);
    587   }
    588598#endif
    589 
    590 /*
    591  *  ns16550_initialize_interrupts
    592  *
    593  *  This routine initializes the port to operate in interrupt driver mode.
    594  */
    595 NS16550_STATIC void ns16550_initialize_interrupts( int minor)
    596 {
    597 #if defined(BSP_FEATURE_IRQ_EXTENSION) || defined(BSP_FEATURE_IRQ_LEGACY)
    598599  console_tbl *c = &Console_Port_Tbl [minor];
    599 #endif
    600600  console_data *d = &Console_Port_Data [minor];
    601601
     
    649649      }
    650650    }
     651  #elif defined(__i386__)
     652    {
     653      int rv = 0;
     654      rtems_irq_connect_data cd = {
     655        c->ulIntVector,
     656        ns16550_isr,
     657        (void *) minor,
     658        NULL,
     659        NULL,
     660        NULL
     661      };
     662      rv = BSP_install_rtems_irq_handler( &cd);
     663      if (rv == 0) {
     664        printk( "%s: Error: Install interrupt handler\n", __func__);
     665        rtems_fatal_error_occurred( 0xdeadbeef);
     666      }
     667    }
    651668  #endif
    652669}
  • c/src/libchip/serial/ns16550_p.h

    rfa47ade rd1e10fe6  
    2828 */
    2929
    30 #define NS16550_STATIC static
     30#define NS16550_STATIC
    3131
    3232#define NS16550_RECEIVE_BUFFER   0
Note: See TracChangeset for help on using the changeset viewer.