Changeset c163605f in rtems


Ignore:
Timestamp:
Apr 18, 2005, 5:37:50 PM (17 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
d5fe91e
Parents:
f0a2528
Message:

2005-04-18 Jennifer Averett <jennifer.averett@…>

  • libchip/serial/ns16550.c: Modified ISR to work with PPC new exception processing
Location:
c/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/ChangeLog

    rf0a2528 rc163605f  
     12005-04-18      Jennifer Averett <jennifer.averett@oarcorp.com>
     2
     3        * libchip/serial/ns16550.c: Modified
     4        ISR to work with PPC new exception processing
     5
    162005-03-14      Joel Sherrill <joel@OARcorp.com>
    27
  • c/src/libchip/serial/ns16550.c

    rf0a2528 rc163605f  
    6868};
    6969
     70#if defined(__PPC__)
     71#ifdef _OLD_EXCEPTIONS
    7072extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
     73#else
     74#include <bsp/irq.h>
     75#endif
     76#endif
    7177
    7278/*
     
    511517}
    512518
     519#if defined(__PPC__)
     520#ifdef _OLD_EXCEPTIONS
     521
    513522/*
    514523 *  ns16550_isr
     
    529538}
    530539
     540#else
     541
     542NS16550_STATIC rtems_isr ns16550_isr(
     543  void *entry
     544)
     545{
     546  console_tbl *ptr = entry;
     547  int         minor;
     548
     549  for(minor=0;minor<Console_Port_Count;minor++) {
     550    if( &Console_Port_Tbl[minor] == ptr ) {
     551      ns16550_process(minor);
     552    }
     553  }
     554
     555}
     556
     557#endif
     558#endif
     559
    531560/*
    532561 *  ns16550_enable_interrupts
     
    555584 */
    556585
     586#if defined(__PPC__)
     587#ifdef _OLD_EXCEPTIONS
    557588NS16550_STATIC void ns16550_initialize_interrupts(int minor)
    558589{
     
    562593
    563594  set_vector(ns16550_isr, Console_Port_Tbl[minor].ulIntVector, 1);
    564 
     595 
    565596  ns16550_enable_interrupts(minor, NS16550_ENABLE_ALL_INTR);
    566597}
     598#else
     599
     600static void null_fun(){}
     601
     602NS16550_STATIC void ns16550_initialize_interrupts(int minor)
     603{
     604  rtems_irq_connect_data IrqData = {0,
     605                                    ns16550_isr,
     606                                    &Console_Port_Data[minor],
     607                                    (rtems_irq_enable)null_fun,
     608                                    (rtems_irq_disable)null_fun,
     609                                    (rtems_irq_is_enabled)null_fun,
     610                                    NULL
     611                                   };
     612
     613  ns16550_init(minor);
     614
     615  Console_Port_Data[minor].bActive = FALSE;
     616
     617  IrqData.name  = (rtems_irq_symbolic_name)(
     618    (unsigned int)BSP_PCI_IRQ0 +  Console_Port_Tbl[minor].ulIntVector );
     619
     620  if (!BSP_install_rtems_shared_irq_handler (&IrqData)) {
     621    printk("Error installing interrupt handler!\n");
     622    rtems_fatal_error_occurred(1);
     623  }
     624
     625  ns16550_enable_interrupts(minor, NS16550_ENABLE_ALL_INTR);
     626}
     627
     628#endif
     629#endif
    567630
    568631/*
Note: See TracChangeset for help on using the changeset viewer.