Changeset f3b29236 in rtems


Ignore:
Timestamp:
Sep 18, 2017, 6:22:38 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
a029230a
Parents:
c030edd
Message:

bsps: Clock_driver_support_install_isr()

Remove old ISR parameter since is not used by the clock driver shell.
Make an implementation optional.

Update #3139.

Location:
c/src/lib
Files:
40 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/beagle/clock.c

    rc030edd rf3b29236  
    315315#define Clock_driver_support_at_tick() beagle_clock_at_tick()
    316316#define Clock_driver_support_initialize_hardware() beagle_clock_initialize()
    317 #define Clock_driver_support_install_isr(isr, old_isr) \
    318   do {                   \
    319     beagle_clock_handler_install(isr);          \
    320     old_isr = NULL;              \
    321   } while (0)
     317#define Clock_driver_support_install_isr(isr) \
     318  beagle_clock_handler_install(isr)
    322319
    323320#define Clock_driver_support_shutdown_hardware() beagle_clock_cleanup()
  • c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c

    rc030edd rf3b29236  
    2626  } while(0)
    2727
    28 #define Clock_driver_support_install_isr( _new, _old ) \
     28#define Clock_driver_support_install_isr( _new )      \
    2929  do {                                                 \
    3030    rtems_status_code status = RTEMS_SUCCESSFUL;       \
    31     (_old) = NULL; /* avoid warning */;                \
    3231    status = rtems_interrupt_handler_install(          \
    3332        BSP_TC1OI,                                     \
  • c/src/lib/libbsp/arm/raspberrypi/clock/clockdrv.c

    rc030edd rf3b29236  
    107107#define Clock_driver_support_shutdown_hardware() raspberrypi_clock_cleanup()
    108108
    109 #define Clock_driver_support_install_isr(clock_isr, old_isr) \
    110   do {                                                 \
    111     raspberrypi_clock_handler_install_isr(clock_isr);  \
    112     old_isr = NULL;                                    \
    113   } while (0)
     109#define Clock_driver_support_install_isr(clock_isr) \
     110  raspberrypi_clock_handler_install_isr(clock_isr)
    114111
    115112#define CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR 1
  • c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c

    rc030edd rf3b29236  
    203203  a9mpcore_clock_initialize()
    204204
    205 #define Clock_driver_support_install_isr(isr, old_isr) \
    206   do { \
    207     a9mpcore_clock_handler_install(); \
    208     old_isr = NULL; \
    209   } while (0)
     205#define Clock_driver_support_install_isr(isr) \
     206  a9mpcore_clock_handler_install()
    210207
    211208#define Clock_driver_support_shutdown_hardware() \
  • c/src/lib/libbsp/arm/shared/arm-generic-timer-clock-config.c

    rc030edd rf3b29236  
    196196  arm_gt_clock_initialize()
    197197
    198 #define Clock_driver_support_install_isr(isr, old_isr) \
    199   do { \
    200     arm_gt_clock_handler_install(); \
    201     old_isr = NULL; \
    202   } while (0)
     198#define Clock_driver_support_install_isr(isr) \
     199  arm_gt_clock_handler_install()
    203200
    204201/* Include shared source clock driver code */
  • c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c

    rc030edd rf3b29236  
    171171  _ARMV7M_Systick_initialize()
    172172
    173 #define Clock_driver_support_install_isr(isr, old_isr) \
    174   do { \
    175     _ARMV7M_Systick_handler_install(); \
    176     old_isr = NULL; \
    177   } while (0)
     173#define Clock_driver_support_install_isr(isr) \
     174  _ARMV7M_Systick_handler_install()
    178175
    179176#define Clock_driver_support_shutdown_hardware() \
  • c/src/lib/libbsp/arm/shared/lpc/clock/lpc-clock-config.c

    rc030edd rf3b29236  
    126126#define Clock_driver_support_at_tick() lpc_clock_at_tick()
    127127#define Clock_driver_support_initialize_hardware() lpc_clock_initialize()
    128 #define Clock_driver_support_install_isr(isr, old_isr) \
    129   do {                                                 \
    130     lpc_clock_handler_install();                       \
    131     old_isr = NULL;                                    \
    132   } while (0)
     128#define Clock_driver_support_install_isr(isr) \
     129  lpc_clock_handler_install()
    133130
    134131#define Clock_driver_support_shutdown_hardware() lpc_clock_cleanup()
  • c/src/lib/libbsp/arm/tms570/clock/clock.c

    rc030edd rf3b29236  
    183183                        tms570_clock_driver_support_shutdown_hardware
    184184
    185 #define Clock_driver_support_install_isr(Clock_isr, Old_ticker ) \
     185#define Clock_driver_support_install_isr(Clock_isr) \
    186186              tms570_clock_driver_support_install_isr( Clock_isr )
    187187
  • c/src/lib/libbsp/i386/pc386/clock/ckinit.c

    rc030edd rf3b29236  
    7070  _SMP_Send_message_broadcast(SMP_MESSAGE_CLOCK_TICK)
    7171#endif
    72 
    73 #define Clock_driver_support_install_isr( _new, _old ) \
    74   do { \
    75     _old = NULL; \
    76   } while(0)
    7772
    7873static uint32_t pc386_get_timecount_tsc(struct timecounter *tc)
  • c/src/lib/libbsp/lm32/shared/clock/ckinit.c

    rc030edd rf3b29236  
    4848  } while (0)
    4949
    50 #define Clock_driver_support_install_isr(_new, _old ) \
    51   do { \
    52     _old = (rtems_isr_entry) set_vector( _new, CLOCK_VECTOR, 1 ); \
    53   } while (0)
     50#define Clock_driver_support_install_isr(_new ) \
     51  set_vector( _new, CLOCK_VECTOR, 1 )
    5452
    5553static void Clock_driver_support_initialize_hardware(void)
  • c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c

    rc030edd rf3b29236  
    2727  } while (0)
    2828
    29 #define Clock_driver_support_install_isr(_new, _old ) \
     29#define Clock_driver_support_install_isr(_new ) \
    3030  do { \
     31    rtems_isr_entry _old; \
    3132    rtems_interrupt_catch(_new, MM_IRQ_TIMER0, &_old); \
    3233  } while (0)
  • c/src/lib/libbsp/m68k/av5282/clock/clock.c

    rc030edd rf3b29236  
    2323 * Attach clock interrupt handler
    2424 */
    25 #define Clock_driver_support_install_isr( _new, _old )             \
    26     do {                                                           \
    27         _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1);  \
    28     } while(0)
     25#define Clock_driver_support_install_isr( _new ) \
     26    set_vector(_new, CLOCK_VECTOR, 1)
    2927
    3028/*
  • c/src/lib/libbsp/m68k/gen68360/clock/clock.c

    rc030edd rf3b29236  
    5252 * Attach clock interrupt handler
    5353 */
    54 #define Clock_driver_support_install_isr( _new, _old ) \
    55     do {                                                          \
    56         _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1);  \
    57     } while(0)
     54#define Clock_driver_support_install_isr( _new ) \
     55    set_vector(_new, CLOCK_VECTOR, 1)
    5856
    5957/*
  • c/src/lib/libbsp/m68k/genmcf548x/clock/clock.c

    rc030edd rf3b29236  
    7070 * Attach clock interrupt handler
    7171 */
    72 #define Clock_driver_support_install_isr( _new, _old )                   \
    73     do {                                                                 \
    74         _old = (rtems_isr_entry)set_vector(_new, CLOCK_IRQ + 64, 1);     \
    75     } while(0)
     72#define Clock_driver_support_install_isr( _new ) \
     73    set_vector(_new, CLOCK_IRQ + 64, 1)
    7674
    7775/*
  • c/src/lib/libbsp/m68k/mcf52235/clock/clock.c

    rc030edd rf3b29236  
    5050 * Attach clock interrupt handler
    5151 */
    52 #define Clock_driver_support_install_isr( _new, _old )             \
    53     do {                                                           \
    54         _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
    55     } while(0)
     52#define Clock_driver_support_install_isr( _new ) \
     53  set_vector(_new, CLOCK_VECTOR, 1)
    5654
    5755/*
  • c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c

    rc030edd rf3b29236  
    5050 * Attach clock interrupt handler
    5151 */
    52 #define Clock_driver_support_install_isr( _new, _old )             \
    53     do {                                                           \
    54         _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
    55     } while(0)
     52#define Clock_driver_support_install_isr( _new ) \
     53  set_vector(_new, CLOCK_VECTOR, 1)
    5654
    5755/*
  • c/src/lib/libbsp/m68k/mcf5235/clock/clock.c

    rc030edd rf3b29236  
    2323 * Attach clock interrupt handler
    2424 */
    25 #define Clock_driver_support_install_isr( _new, _old )             \
    26     do {                                                           \
    27         _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1);  \
    28     } while(0)
     25#define Clock_driver_support_install_isr( _new ) \
     26    set_vector(_new, CLOCK_VECTOR, 1)
    2927
    3028/*
  • c/src/lib/libbsp/m68k/mcf5329/clock/clock.c

    rc030edd rf3b29236  
    5050 * Attach clock interrupt handler
    5151 */
    52 #define Clock_driver_support_install_isr( _new, _old )             \
    53     do {                                                           \
    54         _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
    55     } while(0)
     52#define Clock_driver_support_install_isr( _new ) \
     53  set_vector(_new, CLOCK_VECTOR, 1)
    5654
    5755/*
  • c/src/lib/libbsp/m68k/uC5282/clock/clock.c

    rc030edd rf3b29236  
    7676 * Attach clock interrupt handler
    7777 */
    78 #define Clock_driver_support_install_isr( _new, _old )              \
    79     do {                                                            \
    80         _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1);  \
    81     } while(0)
     78#define Clock_driver_support_install_isr( _new ) \
     79    set_vector(_new, CLOCK_VECTOR, 1)
    8280
    8381/*
  • c/src/lib/libbsp/mips/csb350/clock/clockdrv.c

    rc030edd rf3b29236  
    3737
    3838/* Set for rising edge interrupt */
    39 #define Clock_driver_support_install_isr( _new, _old ) \
    40   do {                                                  \
     39#define Clock_driver_support_install_isr( _new ) \
     40  do { \
    4141    rtems_interrupt_handler_install( \
    4242      CLOCK_VECTOR, \
  • c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c

    rc030edd rf3b29236  
    3030#define CLICKS 5000
    3131
    32 #define Clock_driver_support_install_isr( _new, _old ) \
    33   do { \
    34     rtems_interrupt_handler_install( \
    35       CLOCK_VECTOR, \
    36       "clock", \
    37       0, \
    38       _new, \
    39       NULL \
    40     ); \
    41  } while(0)
     32#define Clock_driver_support_install_isr( _new ) \
     33  rtems_interrupt_handler_install( CLOCK_VECTOR, "clock", 0, _new, NULL )
    4234
    4335#define Clock_driver_support_initialize_hardware() \
  • c/src/lib/libbsp/mips/rbtx4925/clock/clockdrv.c

    rc030edd rf3b29236  
    3939
    4040
    41 #define Clock_driver_support_install_isr( _new, _old ) \
    42   do { \
    43     rtems_interrupt_handler_install( \
    44       CLOCK_VECTOR, \
    45       "clock", \
    46       0, \
    47       _new, \
    48       NULL \
    49     ); \
    50  } while(0)
     41#define Clock_driver_support_install_isr( _new ) \
     42  rtems_interrupt_handler_install( CLOCK_VECTOR, "clock", 0, _new, NULL )
    5143
    5244
  • c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c

    rc030edd rf3b29236  
    5858
    5959
    60 #define Clock_driver_support_install_isr( _new, _old ) \
     60#define Clock_driver_support_install_isr( _new ) \
    6161  do { \
    6262    rtems_interrupt_handler_install( \
  • c/src/lib/libbsp/mips/shared/clock/clockdrv.c

    rc030edd rf3b29236  
    2929  mips_set_timer( mips_timer_rate );
    3030
    31 #define Clock_driver_support_install_isr( _new, _old ) \
    32   do { \
    33     rtems_interrupt_handler_install(CLOCK_VECTOR, \
    34       "PIT clock",0, _new, NULL); \
    35    } while(0)
     31#define Clock_driver_support_install_isr( _new ) \
     32  rtems_interrupt_handler_install(CLOCK_VECTOR, "PIT clock",0, _new, NULL)
    3633
    3734#define Clock_driver_support_initialize_hardware() \
  • c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c

    rc030edd rf3b29236  
    1919 * Attach clock interrupt handler
    2020 */
    21 #define Clock_driver_support_install_isr(_new, _old) \
    22   do { _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); } while(0)
     21#define Clock_driver_support_install_isr(_new) \
     22  set_vector(_new, CLOCK_VECTOR, 1)
    2323
    2424/*
  • c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c

    rc030edd rf3b29236  
    5757}
    5858
    59 static void generic_or1k_clock_handler_install(
    60   proc_ptr new_isr,
    61    proc_ptr old_isr
    62 )
     59static void generic_or1k_clock_handler_install(proc_ptr new_isr)
    6360{
    6461  rtems_status_code sc = RTEMS_SUCCESSFUL;
    65   old_isr = NULL;
    6662  _CPU_ISR_install_vector(OR1K_EXCEPTION_TICK_TIMER,
    6763                          new_isr,
    68                           old_isr);
     64                          NULL);
    6965
    7066  if (sc != RTEMS_SUCCESSFUL) {
     
    144140#define Clock_driver_support_initialize_hardware() generic_or1k_clock_initialize()
    145141
    146 #define Clock_driver_support_install_isr(isr, old_isr) \
    147   do {                                                 \
    148     old_isr = NULL;                                    \
    149     generic_or1k_clock_handler_install(isr, old_isr);       \
    150   } while (0)
     142#define Clock_driver_support_install_isr(isr) \
     143  generic_or1k_clock_handler_install(isr)
    151144
    152145#define Clock_driver_support_shutdown_hardware() generic_or1k_clock_cleanup()
  • c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c

    rc030edd rf3b29236  
    249249#define Clock_driver_support_initialize_hardware() \
    250250  mpc55xx_clock_initialize()
    251 #define Clock_driver_support_install_isr(isr, old_isr) \
    252   do { \
    253     mpc55xx_clock_handler_install(isr); \
    254     old_isr = NULL; \
    255   } while (0)
     251#define Clock_driver_support_install_isr(isr) \
     252  mpc55xx_clock_handler_install(isr)
    256253#define Clock_driver_support_shutdown_hardware() \
    257254  mpc55xx_clock_cleanup()
  • c/src/lib/libbsp/powerpc/qoriq/clock/clock-config.c

    rc030edd rf3b29236  
    5050static struct timecounter qoriq_clock_tc;
    5151
    52 static void qoriq_clock_handler_install(rtems_isr_entry *old_isr)
     52static void qoriq_clock_handler_install(void)
    5353{
    5454  rtems_status_code sc = RTEMS_SUCCESSFUL;
    55 
    56   *old_isr = NULL;
    5755
    5856#if defined(RTEMS_MULTIPROCESSING) && !defined(RTEMS_SMP)
     
    129127  qoriq_clock_initialize()
    130128
    131 #define Clock_driver_support_install_isr(clock_isr, old_isr) \
    132   qoriq_clock_handler_install(&old_isr)
     129#define Clock_driver_support_install_isr(clock_isr) \
     130  qoriq_clock_handler_install()
    133131
    134132#define Clock_driver_support_set_interrupt_affinity(online_processors) \
  • c/src/lib/libbsp/shared/clock_driver_simidle.c

    rc030edd rf3b29236  
    1111
    1212#define CLOCK_VECTOR 0
    13 
    14 #define Clock_driver_support_install_isr( _new, _old ) \
    15   do { _old = 0; } while(0)
    1613
    1714volatile bool clock_driver_enabled;
  • c/src/lib/libbsp/shared/clockdrv_shell.h

    rc030edd rf3b29236  
    3838#if CLOCK_DRIVER_USE_FAST_IDLE && CLOCK_DRIVER_ISRS_PER_TICK
    3939#error "clockdrv_shell.h: Fast Idle PLUS n ISRs per tick is not supported"
     40#endif
     41
     42/**
     43 * @brief Do nothing by default.
     44 */
     45#ifndef Clock_driver_support_install_isr
     46  #define Clock_driver_support_install_isr(isr)
    4047#endif
    4148
     
    216223)
    217224{
    218   rtems_isr_entry  Old_ticker;
    219 
    220225  Clock_driver_ticks = 0;
    221226
     
    228233   *  Install vector
    229234   */
    230   (void) Old_ticker;
    231   Clock_driver_support_install_isr( Clock_isr, Old_ticker );
     235  Clock_driver_support_install_isr( Clock_isr );
    232236
    233237  #ifdef RTEMS_SMP
  • c/src/lib/libbsp/sparc/erc32/clock/ckinit.c

    rc030edd rf3b29236  
    3434#define CLOCK_VECTOR ERC32_TRAP_TYPE( ERC32_INTERRUPT_REAL_TIME_CLOCK )
    3535
    36 #define Clock_driver_support_install_isr( _new, _old ) \
    37   do { \
    38     _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
    39   } while(0)
     36#define Clock_driver_support_install_isr( _new ) \
     37  set_vector( _new, CLOCK_VECTOR, 1 )
    4038
    4139#define Clock_driver_support_set_interrupt_affinity( _online_processors ) \
  • c/src/lib/libbsp/sparc/leon2/clock/ckinit.c

    rc030edd rf3b29236  
    6969#define CLOCK_VECTOR LEON_TRAP_TYPE( LEON_INTERRUPT_TIMER1 )
    7070
    71 #define Clock_driver_support_install_isr( _new, _old ) \
    72   do { \
    73     _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
    74   } while(0)
     71#define Clock_driver_support_install_isr( _new ) \
     72  set_vector( _new, CLOCK_VECTOR, 1 )
    7573
    7674extern int CLOCK_SPEED;
  • c/src/lib/libbsp/sparc/leon3/clock/ckinit.c

    rc030edd rf3b29236  
    170170  } while (0)
    171171
    172 #define Clock_driver_support_install_isr( _new, _old ) \
    173   do { \
    174     (_old) = NULL; \
    175     bsp_clock_handler_install(_new); \
    176   } while(0)
     172#define Clock_driver_support_install_isr( _new ) \
     173  bsp_clock_handler_install(_new)
    177174
    178175static void bsp_clock_handler_install(rtems_isr *new)
  • c/src/lib/libbsp/sparc/shared/timer/tlib_ckinit.c

    rc030edd rf3b29236  
    412412  } while (0)
    413413
    414 #define Clock_driver_support_install_isr( isr, old ) \
     414#define Clock_driver_support_install_isr( isr ) \
    415415  do { \
    416416    rtems_device_driver ret; \
  • c/src/lib/libbsp/sparc64/shared/clock/ckinit.c

    rc030edd rf3b29236  
    8282}
    8383
    84 #define Clock_driver_support_install_isr(_new, _old) \
    85   do { \
    86     _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
    87   } while ( 0 )
     84#define Clock_driver_support_install_isr(_new) \
     85  set_vector( _new, CLOCK_VECTOR, 1 )
    8886
    8987static void Clock_driver_support_initialize_hardware(void)
  • c/src/lib/libcpu/arm/at91rm9200/clock/clock.c

    rc030edd rf3b29236  
    7070
    7171
    72 #define Clock_driver_support_install_isr( _new, _old ) \
    73   do {                                                 \
    74       (_old) = NULL;                                   \
    75       BSP_install_rtems_irq_handler(&clock_isr_data);  \
    76   } while(0)
     72#define Clock_driver_support_install_isr( _new ) \
     73  BSP_install_rtems_irq_handler(&clock_isr_data)
    7774
    7875static void Clock_driver_support_initialize_hardware(void)
  • c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c

    rc030edd rf3b29236  
    8383 * Installs the clock ISR. You shouldn't need to change this.
    8484 */
    85 #define Clock_driver_support_install_isr( _new, _old ) \
    86   do {                                                 \
    87     (_old) = NULL;                                   \
    88     BSP_install_rtems_irq_handler(&clock_isr_data);  \
    89   } while(0)
     85#define Clock_driver_support_install_isr( _new ) \
     86  BSP_install_rtems_irq_handler(&clock_isr_data)
    9087
    9188/**
  • c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c

    rc030edd rf3b29236  
    5151 * Installs the clock ISR. You shouldn't need to change this.
    5252 */
    53 #define Clock_driver_support_install_isr( _new, _old ) \
    54   do {                                                 \
    55       (_old) = NULL;                                   \
    56       BSP_install_rtems_irq_handler(&clock_isr_data);  \
    57   } while(0)
     53#define Clock_driver_support_install_isr( _new ) \
     54  BSP_install_rtems_irq_handler(&clock_isr_data)
    5855
    5956/**
  • c/src/lib/libcpu/arm/pxa255/clock/clock.c

    rc030edd rf3b29236  
    8787};
    8888
    89 #define Clock_driver_support_install_isr( _new, _old ) \
    90   do {                                                 \
    91     _old = NULL;                                       \
    92     BSP_install_rtems_irq_handler(&clock_isr_data);    \
    93   } while (0)
     89#define Clock_driver_support_install_isr( _new ) \
     90  BSP_install_rtems_irq_handler(&clock_isr_data)
    9491
    9592static void Clock_driver_support_initialize_hardware(void)
  • c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c

    rc030edd rf3b29236  
    4242 * Installs the clock ISR. You shouldn't need to change this.
    4343 */
    44 #define Clock_driver_support_install_isr( _new, _old ) \
    45   do {                                                 \
    46     _old = NULL;                                       \
    47     BSP_install_rtems_irq_handler(&clock_isr_data);    \
    48   } while(0)
     44#define Clock_driver_support_install_isr( _new ) \
     45  BSP_install_rtems_irq_handler(&clock_isr_data)
    4946
    5047
Note: See TracChangeset for help on using the changeset viewer.