Changeset 7b93d857 in rtems for bsps


Ignore:
Timestamp:
Sep 12, 2018, 8:08:50 AM (13 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
53fb03fe
Parents:
94ea8a8
git-author:
Sebastian Huber <sebastian.huber@…> (09/12/18 08:08:50)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/17/18 06:56:32)
Message:

bsp/tqm8xx: Use IRQ extensions API

Update #3513.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/powerpc/tqm8xx/console/console.c

    r94ea8a8 r7b93d857  
    5858#include <rtems/bspIo.h>
    5959#include <rtems/error.h>
    60 #include <rtems/irq.h>
    6160
    6261#include <bsp.h>
     
    121120    volatile m8xxSMCRegisters_t *smcr;
    122121  } regs;
    123   int ivec_src;
     122  rtems_vector_number ivec_src;
    124123  int cr_chan_code;
    125124  int brg_used;
     
    498497
    499498static void
    500 mpc8xx_console_irq_on(const rtems_irq_connect_data *irq)
    501 {
    502     CHN_MASK_SET(irq->name - BSP_CPM_IRQ_LOWEST_OFFSET,
    503                  3);    /* Enable TX and RX interrupts */
    504 }
    505 
    506 static void
    507 mpc8xx_console_irq_off(const rtems_irq_connect_data *irq)
    508 {
    509     CHN_MASK_SET(irq->name - BSP_CPM_IRQ_LOWEST_OFFSET,
    510                  0);    /* Disable TX and RX interrupts */
    511 }
    512 
    513 static int
    514 mpc8xx_console_irq_isOn(const rtems_irq_connect_data *irq)
    515 {
    516   return (0 != CHN_MASK_GET(irq->name - BSP_CPM_IRQ_LOWEST_OFFSET)); /* Check TX and RX interrupts */
     499mpc8xx_console_irq_on(int chan)
     500{
     501    CHN_MASK_SET(chan, 3);      /* Enable TX and RX interrupts */
    517502}
    518503
     
    710695
    711696  if (m8xx_scc_mode[chan] != TERMIOS_POLLED) {
    712 
    713     rtems_irq_connect_data irq_conn_data = {
     697    rtems_status_code sc;
     698
     699    sc = rtems_interrupt_handler_install(
    714700      m8xx_console_chan_desc[chan].ivec_src,
    715       sccInterruptHandler,         /* rtems_irq_hdl           */
    716       (rtems_irq_hdl_param)chan,   /* (rtems_irq_hdl_param)   */
    717       mpc8xx_console_irq_on,       /* (rtems_irq_enable)      */
    718       mpc8xx_console_irq_off,      /* (rtems_irq_disable)     */
    719       mpc8xx_console_irq_isOn      /* (rtems_irq_is_enabled)  */
    720     };
    721     if (!BSP_install_rtems_irq_handler (&irq_conn_data)) {
     701      "SCC",
     702      RTEMS_INTERRUPT_UNIQUE,
     703      sccInterruptHandler,
     704      (void *)chan
     705    );
     706    if (sc != RTEMS_SUCCESSFUL) {
    722707      rtems_panic("console: cannot install IRQ handler");
    723708    }
     709    mpc8xx_console_irq_on(chan);
    724710  }
    725711}
Note: See TracChangeset for help on using the changeset viewer.