Changeset a387e944 in rtems


Ignore:
Timestamp:
Jun 13, 2014, 8:18:01 AM (7 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, 5, master
Children:
b4cebd05
Parents:
6aacf08
git-author:
Daniel Hellstrom <daniel@…> (06/13/14 08:18:01)
git-committer:
Daniel Hellstrom <daniel@…> (10/09/14 11:19:40)
Message:

LEON3: use interrupt layer in clock driver

Manupilating the interrupt control registers directly instead
of going through the interrupt layer can be deceiving.

Location:
c/src/lib/libbsp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/include/fatal.h

    r6aacf08 ra387e944  
    5252  LEON3_FATAL_NO_IRQMP_CONTROLLER = BSP_FATAL_CODE_BLOCK(2),
    5353  LEON3_FATAL_CONSOLE_REGISTER_DEV,
     54  LEON3_FATAL_CLOCK_INITIALIZATION,
    5455
    5556  /* LPC24XX fatal codes */
  • c/src/lib/libbsp/sparc/leon3/clock/ckinit.c

    r6aacf08 ra387e944  
    2121#include <bsp.h>
    2222#include <bspopts.h>
     23#include <bsp/fatal.h>
     24#include <rtems/rtems/intr.h>
    2325#include <ambapp.h>
    2426#include <rtems/score/profiling.h>
     
    3436volatile struct gptimer_regs *LEON3_Timer_Regs = 0;
    3537static int clkirq;
    36 
    37 #define CLOCK_VECTOR LEON_TRAP_TYPE( clkirq )
    3838
    3939static void leon3_clock_profiling_interrupt_delay(void)
     
    105105#define Clock_driver_support_install_isr( _new, _old ) \
    106106  do { \
    107     _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
     107    (_old) = NULL; \
     108    bsp_clock_handler_install(_new); \
    108109  } while(0)
     110
     111static void bsp_clock_handler_install(rtems_isr *new)
     112{
     113  rtems_status_code sc;
     114
     115  sc = rtems_interrupt_handler_install(
     116    clkirq,
     117    "Clock",
     118    RTEMS_INTERRUPT_UNIQUE,
     119    new,
     120    NULL
     121  );
     122  if (sc != RTEMS_SUCCESSFUL) {
     123    rtems_fatal(RTEMS_FATAL_SOURCE_BSP, LEON3_FATAL_CLOCK_INITIALIZATION);
     124  }
     125}
    109126
    110127#define Clock_driver_support_initialize_hardware() \
Note: See TracChangeset for help on using the changeset viewer.