summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-18 08:22:38 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-18 08:22:38 +0200
commitf3b292365ffcd4c95128e568fa114ac55fb0ef6b (patch)
tree266471f66dc396ec077cc37312a60ea35edd1a89
parentc030edde3f76f23d6fe64df940a8ca059f0404e6 (diff)
downloadrtems-f3b292365ffcd4c95128e568fa114ac55fb0ef6b.tar.bz2
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.
-rw-r--r--c/src/lib/libbsp/arm/beagle/clock.c7
-rw-r--r--c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c3
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/clock/clockdrv.c7
-rw-r--r--c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c7
-rw-r--r--c/src/lib/libbsp/arm/shared/arm-generic-timer-clock-config.c7
-rw-r--r--c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c7
-rw-r--r--c/src/lib/libbsp/arm/shared/lpc/clock/lpc-clock-config.c7
-rw-r--r--c/src/lib/libbsp/arm/tms570/clock/clock.c2
-rw-r--r--c/src/lib/libbsp/i386/pc386/clock/ckinit.c5
-rw-r--r--c/src/lib/libbsp/lm32/shared/clock/ckinit.c6
-rw-r--r--c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c3
-rw-r--r--c/src/lib/libbsp/m68k/av5282/clock/clock.c6
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/clock/clock.c6
-rw-r--r--c/src/lib/libbsp/m68k/genmcf548x/clock/clock.c6
-rw-r--r--c/src/lib/libbsp/m68k/mcf52235/clock/clock.c6
-rw-r--r--c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c6
-rw-r--r--c/src/lib/libbsp/m68k/mcf5235/clock/clock.c6
-rw-r--r--c/src/lib/libbsp/m68k/mcf5329/clock/clock.c6
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/clock/clock.c6
-rw-r--r--c/src/lib/libbsp/mips/csb350/clock/clockdrv.c4
-rw-r--r--c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c12
-rw-r--r--c/src/lib/libbsp/mips/rbtx4925/clock/clockdrv.c12
-rw-r--r--c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c2
-rw-r--r--c/src/lib/libbsp/mips/shared/clock/clockdrv.c7
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c4
-rw-r--r--c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c15
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c7
-rw-r--r--c/src/lib/libbsp/powerpc/qoriq/clock/clock-config.c8
-rw-r--r--c/src/lib/libbsp/shared/clock_driver_simidle.c3
-rw-r--r--c/src/lib/libbsp/shared/clockdrv_shell.h12
-rw-r--r--c/src/lib/libbsp/sparc/erc32/clock/ckinit.c6
-rw-r--r--c/src/lib/libbsp/sparc/leon2/clock/ckinit.c6
-rw-r--r--c/src/lib/libbsp/sparc/leon3/clock/ckinit.c7
-rw-r--r--c/src/lib/libbsp/sparc/shared/timer/tlib_ckinit.c2
-rw-r--r--c/src/lib/libbsp/sparc64/shared/clock/ckinit.c6
-rw-r--r--c/src/lib/libcpu/arm/at91rm9200/clock/clock.c7
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c7
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c7
-rw-r--r--c/src/lib/libcpu/arm/pxa255/clock/clock.c7
-rw-r--r--c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c7
40 files changed, 81 insertions, 176 deletions
diff --git a/c/src/lib/libbsp/arm/beagle/clock.c b/c/src/lib/libbsp/arm/beagle/clock.c
index 912d904197..ec35f1505e 100644
--- a/c/src/lib/libbsp/arm/beagle/clock.c
+++ b/c/src/lib/libbsp/arm/beagle/clock.c
@@ -314,11 +314,8 @@ static void beagle_clock_cleanup(void)
#define Clock_driver_support_at_tick() beagle_clock_at_tick()
#define Clock_driver_support_initialize_hardware() beagle_clock_initialize()
-#define Clock_driver_support_install_isr(isr, old_isr) \
- do { \
- beagle_clock_handler_install(isr); \
- old_isr = NULL; \
- } while (0)
+#define Clock_driver_support_install_isr(isr) \
+ beagle_clock_handler_install(isr)
#define Clock_driver_support_shutdown_hardware() beagle_clock_cleanup()
diff --git a/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c b/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
index 121b2c9d32..6c8c57691a 100644
--- a/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
+++ b/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
@@ -25,10 +25,9 @@ void Clock_isr(void * arg);
*EP7312_TC1EOI = 0xffffffff; \
} while(0)
-#define Clock_driver_support_install_isr( _new, _old ) \
+#define Clock_driver_support_install_isr( _new ) \
do { \
rtems_status_code status = RTEMS_SUCCESSFUL; \
- (_old) = NULL; /* avoid warning */; \
status = rtems_interrupt_handler_install( \
BSP_TC1OI, \
"Clock", \
diff --git a/c/src/lib/libbsp/arm/raspberrypi/clock/clockdrv.c b/c/src/lib/libbsp/arm/raspberrypi/clock/clockdrv.c
index 72c85b1669..43ce59e1b4 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/clock/clockdrv.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/clock/clockdrv.c
@@ -106,11 +106,8 @@ static void raspberrypi_clock_cleanup(void)
#define Clock_driver_support_shutdown_hardware() raspberrypi_clock_cleanup()
-#define Clock_driver_support_install_isr(clock_isr, old_isr) \
- do { \
- raspberrypi_clock_handler_install_isr(clock_isr); \
- old_isr = NULL; \
- } while (0)
+#define Clock_driver_support_install_isr(clock_isr) \
+ raspberrypi_clock_handler_install_isr(clock_isr)
#define CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR 1
diff --git a/c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c b/c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c
index 63a3dd7fd2..09516b4905 100644
--- a/c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c
+++ b/c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c
@@ -202,11 +202,8 @@ static void a9mpcore_clock_cleanup(void)
#define Clock_driver_support_initialize_hardware() \
a9mpcore_clock_initialize()
-#define Clock_driver_support_install_isr(isr, old_isr) \
- do { \
- a9mpcore_clock_handler_install(); \
- old_isr = NULL; \
- } while (0)
+#define Clock_driver_support_install_isr(isr) \
+ a9mpcore_clock_handler_install()
#define Clock_driver_support_shutdown_hardware() \
a9mpcore_clock_cleanup()
diff --git a/c/src/lib/libbsp/arm/shared/arm-generic-timer-clock-config.c b/c/src/lib/libbsp/arm/shared/arm-generic-timer-clock-config.c
index 67e0d59af2..21ba3f1e97 100644
--- a/c/src/lib/libbsp/arm/shared/arm-generic-timer-clock-config.c
+++ b/c/src/lib/libbsp/arm/shared/arm-generic-timer-clock-config.c
@@ -195,11 +195,8 @@ RTEMS_SYSINIT_ITEM(
#define Clock_driver_support_initialize_hardware() \
arm_gt_clock_initialize()
-#define Clock_driver_support_install_isr(isr, old_isr) \
- do { \
- arm_gt_clock_handler_install(); \
- old_isr = NULL; \
- } while (0)
+#define Clock_driver_support_install_isr(isr) \
+ arm_gt_clock_handler_install()
/* Include shared source clock driver code */
#include "../../shared/clockdrv_shell.h"
diff --git a/c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c b/c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c
index afef7daa09..e03ba9d83f 100644
--- a/c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c
+++ b/c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c
@@ -170,11 +170,8 @@ static void _ARMV7M_Systick_cleanup(void)
#define Clock_driver_support_initialize_hardware() \
_ARMV7M_Systick_initialize()
-#define Clock_driver_support_install_isr(isr, old_isr) \
- do { \
- _ARMV7M_Systick_handler_install(); \
- old_isr = NULL; \
- } while (0)
+#define Clock_driver_support_install_isr(isr) \
+ _ARMV7M_Systick_handler_install()
#define Clock_driver_support_shutdown_hardware() \
_ARMV7M_Systick_cleanup()
diff --git a/c/src/lib/libbsp/arm/shared/lpc/clock/lpc-clock-config.c b/c/src/lib/libbsp/arm/shared/lpc/clock/lpc-clock-config.c
index 0a0399939d..b6a6dc9fb2 100644
--- a/c/src/lib/libbsp/arm/shared/lpc/clock/lpc-clock-config.c
+++ b/c/src/lib/libbsp/arm/shared/lpc/clock/lpc-clock-config.c
@@ -125,11 +125,8 @@ static void lpc_clock_cleanup(void)
#define Clock_driver_support_at_tick() lpc_clock_at_tick()
#define Clock_driver_support_initialize_hardware() lpc_clock_initialize()
-#define Clock_driver_support_install_isr(isr, old_isr) \
- do { \
- lpc_clock_handler_install(); \
- old_isr = NULL; \
- } while (0)
+#define Clock_driver_support_install_isr(isr) \
+ lpc_clock_handler_install()
#define Clock_driver_support_shutdown_hardware() lpc_clock_cleanup()
diff --git a/c/src/lib/libbsp/arm/tms570/clock/clock.c b/c/src/lib/libbsp/arm/tms570/clock/clock.c
index b4d60b3153..091bfda2b6 100644
--- a/c/src/lib/libbsp/arm/tms570/clock/clock.c
+++ b/c/src/lib/libbsp/arm/tms570/clock/clock.c
@@ -182,7 +182,7 @@ static void tms570_clock_driver_support_shutdown_hardware( void )
#define Clock_driver_support_shutdown_hardware \
tms570_clock_driver_support_shutdown_hardware
-#define Clock_driver_support_install_isr(Clock_isr, Old_ticker ) \
+#define Clock_driver_support_install_isr(Clock_isr) \
tms570_clock_driver_support_install_isr( Clock_isr )
void Clock_isr(void *arg); /* to supress warning */
diff --git a/c/src/lib/libbsp/i386/pc386/clock/ckinit.c b/c/src/lib/libbsp/i386/pc386/clock/ckinit.c
index e7fe50ae4e..2a713a457f 100644
--- a/c/src/lib/libbsp/i386/pc386/clock/ckinit.c
+++ b/c/src/lib/libbsp/i386/pc386/clock/ckinit.c
@@ -70,11 +70,6 @@ extern volatile uint32_t Clock_driver_ticks;
_SMP_Send_message_broadcast(SMP_MESSAGE_CLOCK_TICK)
#endif
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = NULL; \
- } while(0)
-
static uint32_t pc386_get_timecount_tsc(struct timecounter *tc)
{
return (uint32_t)rdtsc();
diff --git a/c/src/lib/libbsp/lm32/shared/clock/ckinit.c b/c/src/lib/libbsp/lm32/shared/clock/ckinit.c
index 6a30583853..fd1c27437c 100644
--- a/c/src/lib/libbsp/lm32/shared/clock/ckinit.c
+++ b/c/src/lib/libbsp/lm32/shared/clock/ckinit.c
@@ -47,10 +47,8 @@ static inline void clockwrite(unsigned int reg, int value)
lm32_interrupt_ack(CLOCK_IRQMASK); \
} while (0)
-#define Clock_driver_support_install_isr(_new, _old ) \
- do { \
- _old = (rtems_isr_entry) set_vector( _new, CLOCK_VECTOR, 1 ); \
- } while (0)
+#define Clock_driver_support_install_isr(_new ) \
+ set_vector( _new, CLOCK_VECTOR, 1 )
static void Clock_driver_support_initialize_hardware(void)
{
diff --git a/c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c b/c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c
index 35b4b818e6..bc9821d1bc 100644
--- a/c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c
+++ b/c/src/lib/libbsp/lm32/shared/milkymist_clock/ckinit.c
@@ -26,8 +26,9 @@
lm32_interrupt_ack(1 << MM_IRQ_TIMER0); \
} while (0)
-#define Clock_driver_support_install_isr(_new, _old ) \
+#define Clock_driver_support_install_isr(_new ) \
do { \
+ rtems_isr_entry _old; \
rtems_interrupt_catch(_new, MM_IRQ_TIMER0, &_old); \
} while (0)
diff --git a/c/src/lib/libbsp/m68k/av5282/clock/clock.c b/c/src/lib/libbsp/m68k/av5282/clock/clock.c
index 182693fe03..eb01e84c21 100644
--- a/c/src/lib/libbsp/m68k/av5282/clock/clock.c
+++ b/c/src/lib/libbsp/m68k/av5282/clock/clock.c
@@ -22,10 +22,8 @@
/*
* Attach clock interrupt handler
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector(_new, CLOCK_VECTOR, 1)
/*
* Turn off the clock
diff --git a/c/src/lib/libbsp/m68k/gen68360/clock/clock.c b/c/src/lib/libbsp/m68k/gen68360/clock/clock.c
index 3b9d4ca293..56fd0e19fa 100644
--- a/c/src/lib/libbsp/m68k/gen68360/clock/clock.c
+++ b/c/src/lib/libbsp/m68k/gen68360/clock/clock.c
@@ -51,10 +51,8 @@ static unsigned long nsec;
/*
* Attach clock interrupt handler
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector(_new, CLOCK_VECTOR, 1)
/*
* Turn off the clock
diff --git a/c/src/lib/libbsp/m68k/genmcf548x/clock/clock.c b/c/src/lib/libbsp/m68k/genmcf548x/clock/clock.c
index d0f28c6b72..0b3579e3a0 100644
--- a/c/src/lib/libbsp/m68k/genmcf548x/clock/clock.c
+++ b/c/src/lib/libbsp/m68k/genmcf548x/clock/clock.c
@@ -69,10 +69,8 @@
/*
* Attach clock interrupt handler
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = (rtems_isr_entry)set_vector(_new, CLOCK_IRQ + 64, 1); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector(_new, CLOCK_IRQ + 64, 1)
/*
* Turn off the clock
diff --git a/c/src/lib/libbsp/m68k/mcf52235/clock/clock.c b/c/src/lib/libbsp/m68k/mcf52235/clock/clock.c
index aa0d0b7945..f29a820d57 100644
--- a/c/src/lib/libbsp/m68k/mcf52235/clock/clock.c
+++ b/c/src/lib/libbsp/m68k/mcf52235/clock/clock.c
@@ -49,10 +49,8 @@ static void mcf52235_tc_tick(void)
/*
* Attach clock interrupt handler
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector(_new, CLOCK_VECTOR, 1)
/*
* Turn off the clock
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c b/c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c
index cc2f7d11fa..88234f0a3d 100644
--- a/c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c
+++ b/c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c
@@ -49,10 +49,8 @@ static void mcf5225x_tc_tick(void)
/*
* Attach clock interrupt handler
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector(_new, CLOCK_VECTOR, 1)
/*
* Turn off the clock
diff --git a/c/src/lib/libbsp/m68k/mcf5235/clock/clock.c b/c/src/lib/libbsp/m68k/mcf5235/clock/clock.c
index 95b7f37bac..9664fddb6f 100644
--- a/c/src/lib/libbsp/m68k/mcf5235/clock/clock.c
+++ b/c/src/lib/libbsp/m68k/mcf5235/clock/clock.c
@@ -22,10 +22,8 @@
/*
* Attach clock interrupt handler
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector(_new, CLOCK_VECTOR, 1)
/*
* Turn off the clock
diff --git a/c/src/lib/libbsp/m68k/mcf5329/clock/clock.c b/c/src/lib/libbsp/m68k/mcf5329/clock/clock.c
index 5f6006e717..f924499ed4 100644
--- a/c/src/lib/libbsp/m68k/mcf5329/clock/clock.c
+++ b/c/src/lib/libbsp/m68k/mcf5329/clock/clock.c
@@ -49,10 +49,8 @@ static void mcf5329_tc_tick(void)
/*
* Attach clock interrupt handler
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector(_new, CLOCK_VECTOR, 1)
/*
* Turn off the clock
diff --git a/c/src/lib/libbsp/m68k/uC5282/clock/clock.c b/c/src/lib/libbsp/m68k/uC5282/clock/clock.c
index f27c650aa3..5ec0bc4217 100644
--- a/c/src/lib/libbsp/m68k/uC5282/clock/clock.c
+++ b/c/src/lib/libbsp/m68k/uC5282/clock/clock.c
@@ -75,10 +75,8 @@ static void uC5282_tc_tick(void)
/*
* Attach clock interrupt handler
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector(_new, CLOCK_VECTOR, 1)
/*
* Turn off the clock
diff --git a/c/src/lib/libbsp/mips/csb350/clock/clockdrv.c b/c/src/lib/libbsp/mips/csb350/clock/clockdrv.c
index 53e75595df..3534c66997 100644
--- a/c/src/lib/libbsp/mips/csb350/clock/clockdrv.c
+++ b/c/src/lib/libbsp/mips/csb350/clock/clockdrv.c
@@ -36,8 +36,8 @@ void au1x00_clock_init(void);
} while(0)
/* Set for rising edge interrupt */
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
+#define Clock_driver_support_install_isr( _new ) \
+ do { \
rtems_interrupt_handler_install( \
CLOCK_VECTOR, \
"clock", \
diff --git a/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c b/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c
index 8a0c04e51f..8c3216dfab 100644
--- a/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c
+++ b/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c
@@ -29,16 +29,8 @@
#define CLICKS 5000
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- rtems_interrupt_handler_install( \
- CLOCK_VECTOR, \
- "clock", \
- 0, \
- _new, \
- NULL \
- ); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ rtems_interrupt_handler_install( CLOCK_VECTOR, "clock", 0, _new, NULL )
#define Clock_driver_support_initialize_hardware() \
do { \
diff --git a/c/src/lib/libbsp/mips/rbtx4925/clock/clockdrv.c b/c/src/lib/libbsp/mips/rbtx4925/clock/clockdrv.c
index 2fb56c6eb9..b10edbaff4 100644
--- a/c/src/lib/libbsp/mips/rbtx4925/clock/clockdrv.c
+++ b/c/src/lib/libbsp/mips/rbtx4925/clock/clockdrv.c
@@ -38,16 +38,8 @@
#endif
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- rtems_interrupt_handler_install( \
- CLOCK_VECTOR, \
- "clock", \
- 0, \
- _new, \
- NULL \
- ); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ rtems_interrupt_handler_install( CLOCK_VECTOR, "clock", 0, _new, NULL )
#define Clock_driver_support_at_tick() \
diff --git a/c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c b/c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c
index 59b3452d88..63f23020d1 100644
--- a/c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c
+++ b/c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c
@@ -57,7 +57,7 @@ void new_brk_esr(void)
}
-#define Clock_driver_support_install_isr( _new, _old ) \
+#define Clock_driver_support_install_isr( _new ) \
do { \
rtems_interrupt_handler_install( \
CLOCK_VECTOR, \
diff --git a/c/src/lib/libbsp/mips/shared/clock/clockdrv.c b/c/src/lib/libbsp/mips/shared/clock/clockdrv.c
index cb9debb453..c4dbdc1fbe 100644
--- a/c/src/lib/libbsp/mips/shared/clock/clockdrv.c
+++ b/c/src/lib/libbsp/mips/shared/clock/clockdrv.c
@@ -28,11 +28,8 @@ static uint32_t mips_timer_rate = 0;
#define Clock_driver_support_at_tick() \
mips_set_timer( mips_timer_rate );
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- rtems_interrupt_handler_install(CLOCK_VECTOR, \
- "PIT clock",0, _new, NULL); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ rtems_interrupt_handler_install(CLOCK_VECTOR, "PIT clock",0, _new, NULL)
#define Clock_driver_support_initialize_hardware() \
do { \
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c b/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c
index 1656e763c1..80d91fe4f3 100644
--- a/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c
+++ b/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c
@@ -18,8 +18,8 @@
/*
* Attach clock interrupt handler
*/
-#define Clock_driver_support_install_isr(_new, _old) \
- do { _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); } while(0)
+#define Clock_driver_support_install_isr(_new) \
+ set_vector(_new, CLOCK_VECTOR, 1)
/*
* Turn off the clock
diff --git a/c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c b/c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c
index e01d2e506d..212737b506 100644
--- a/c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c
+++ b/c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c
@@ -56,16 +56,12 @@ static void generic_or1k_clock_at_tick(void)
cpu_counter_ticks += TTMR_NUM_OF_CLOCK_TICKS_INTERRUPT;
}
-static void generic_or1k_clock_handler_install(
- proc_ptr new_isr,
- proc_ptr old_isr
-)
+static void generic_or1k_clock_handler_install(proc_ptr new_isr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
- old_isr = NULL;
_CPU_ISR_install_vector(OR1K_EXCEPTION_TICK_TIMER,
new_isr,
- old_isr);
+ NULL);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
@@ -143,11 +139,8 @@ CPU_Counter_ticks _CPU_Counter_difference(
#define Clock_driver_support_initialize_hardware() generic_or1k_clock_initialize()
-#define Clock_driver_support_install_isr(isr, old_isr) \
- do { \
- old_isr = NULL; \
- generic_or1k_clock_handler_install(isr, old_isr); \
- } while (0)
+#define Clock_driver_support_install_isr(isr) \
+ generic_or1k_clock_handler_install(isr)
#define Clock_driver_support_shutdown_hardware() generic_or1k_clock_cleanup()
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c
index c0b8905b20..c712d80745 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c
@@ -248,11 +248,8 @@ static void mpc55xx_clock_cleanup(void)
#define Clock_driver_timecounter_tick() mpc55xx_tc_tick()
#define Clock_driver_support_initialize_hardware() \
mpc55xx_clock_initialize()
-#define Clock_driver_support_install_isr(isr, old_isr) \
- do { \
- mpc55xx_clock_handler_install(isr); \
- old_isr = NULL; \
- } while (0)
+#define Clock_driver_support_install_isr(isr) \
+ mpc55xx_clock_handler_install(isr)
#define Clock_driver_support_shutdown_hardware() \
mpc55xx_clock_cleanup()
diff --git a/c/src/lib/libbsp/powerpc/qoriq/clock/clock-config.c b/c/src/lib/libbsp/powerpc/qoriq/clock/clock-config.c
index 99e9f973e9..ca61d255d3 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/clock/clock-config.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/clock/clock-config.c
@@ -49,12 +49,10 @@ static volatile qoriq_pic_global_timer *const qoriq_timecounter =
static struct timecounter qoriq_clock_tc;
-static void qoriq_clock_handler_install(rtems_isr_entry *old_isr)
+static void qoriq_clock_handler_install(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
- *old_isr = NULL;
-
#if defined(RTEMS_MULTIPROCESSING) && !defined(RTEMS_SMP)
{
Processor_mask affinity;
@@ -128,8 +126,8 @@ static void qoriq_clock_cleanup(void)
#define Clock_driver_support_initialize_hardware() \
qoriq_clock_initialize()
-#define Clock_driver_support_install_isr(clock_isr, old_isr) \
- qoriq_clock_handler_install(&old_isr)
+#define Clock_driver_support_install_isr(clock_isr) \
+ qoriq_clock_handler_install()
#define Clock_driver_support_set_interrupt_affinity(online_processors) \
bsp_interrupt_set_affinity(CLOCK_INTERRUPT, online_processors)
diff --git a/c/src/lib/libbsp/shared/clock_driver_simidle.c b/c/src/lib/libbsp/shared/clock_driver_simidle.c
index 5826bb5a7a..1b1cb6e55a 100644
--- a/c/src/lib/libbsp/shared/clock_driver_simidle.c
+++ b/c/src/lib/libbsp/shared/clock_driver_simidle.c
@@ -11,9 +11,6 @@
#define CLOCK_VECTOR 0
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { _old = 0; } while(0)
-
volatile bool clock_driver_enabled;
#define Clock_driver_support_initialize_hardware() \
diff --git a/c/src/lib/libbsp/shared/clockdrv_shell.h b/c/src/lib/libbsp/shared/clockdrv_shell.h
index 0d40c84d91..ddc66b049d 100644
--- a/c/src/lib/libbsp/shared/clockdrv_shell.h
+++ b/c/src/lib/libbsp/shared/clockdrv_shell.h
@@ -40,6 +40,13 @@
#endif
/**
+ * @brief Do nothing by default.
+ */
+#ifndef Clock_driver_support_install_isr
+ #define Clock_driver_support_install_isr(isr)
+#endif
+
+/**
* @brief This method is rarely used so default it.
*/
#ifndef Clock_driver_support_find_timer
@@ -215,8 +222,6 @@ rtems_device_driver Clock_initialize(
void *pargp
)
{
- rtems_isr_entry Old_ticker;
-
Clock_driver_ticks = 0;
/*
@@ -227,8 +232,7 @@ rtems_device_driver Clock_initialize(
/*
* Install vector
*/
- (void) Old_ticker;
- Clock_driver_support_install_isr( Clock_isr, Old_ticker );
+ Clock_driver_support_install_isr( Clock_isr );
#ifdef RTEMS_SMP
Clock_driver_support_set_interrupt_affinity(
diff --git a/c/src/lib/libbsp/sparc/erc32/clock/ckinit.c b/c/src/lib/libbsp/sparc/erc32/clock/ckinit.c
index 21c82de152..38542c0a41 100644
--- a/c/src/lib/libbsp/sparc/erc32/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/erc32/clock/ckinit.c
@@ -33,10 +33,8 @@
*/
#define CLOCK_VECTOR ERC32_TRAP_TYPE( ERC32_INTERRUPT_REAL_TIME_CLOCK )
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector( _new, CLOCK_VECTOR, 1 )
#define Clock_driver_support_set_interrupt_affinity( _online_processors ) \
do { \
diff --git a/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c
index 56a385ee0f..84577d4b57 100644
--- a/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c
@@ -68,10 +68,8 @@ static void leon2_tc_tick( void )
#define CLOCK_VECTOR LEON_TRAP_TYPE( LEON_INTERRUPT_TIMER1 )
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ set_vector( _new, CLOCK_VECTOR, 1 )
extern int CLOCK_SPEED;
diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
index 2b0dbae8e7..b2ed5bf5c1 100644
--- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
@@ -169,11 +169,8 @@ static void leon3_tc_do_tick(void)
} \
} while (0)
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- (_old) = NULL; \
- bsp_clock_handler_install(_new); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ bsp_clock_handler_install(_new)
static void bsp_clock_handler_install(rtems_isr *new)
{
diff --git a/c/src/lib/libbsp/sparc/shared/timer/tlib_ckinit.c b/c/src/lib/libbsp/sparc/shared/timer/tlib_ckinit.c
index 7880e86bae..af4d34b259 100644
--- a/c/src/lib/libbsp/sparc/shared/timer/tlib_ckinit.c
+++ b/c/src/lib/libbsp/sparc/shared/timer/tlib_ckinit.c
@@ -411,7 +411,7 @@ static const struct ops ops_irqamp = {
} \
} while (0)
-#define Clock_driver_support_install_isr( isr, old ) \
+#define Clock_driver_support_install_isr( isr ) \
do { \
rtems_device_driver ret; \
ret = tlib_clock_install_isr( isr ); \
diff --git a/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c b/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c
index fbebcbd012..c014a73b9e 100644
--- a/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c
@@ -81,10 +81,8 @@ static void Clock_driver_support_at_tick_helper(void)
#endif
}
-#define Clock_driver_support_install_isr(_new, _old) \
- do { \
- _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
- } while ( 0 )
+#define Clock_driver_support_install_isr(_new) \
+ set_vector( _new, CLOCK_VECTOR, 1 )
static void Clock_driver_support_initialize_hardware(void)
{
diff --git a/c/src/lib/libcpu/arm/at91rm9200/clock/clock.c b/c/src/lib/libcpu/arm/at91rm9200/clock/clock.c
index ac7f5fe783..f231a04697 100644
--- a/c/src/lib/libcpu/arm/at91rm9200/clock/clock.c
+++ b/c/src/lib/libcpu/arm/at91rm9200/clock/clock.c
@@ -69,11 +69,8 @@ rtems_irq_connect_data clock_isr_data = {
};
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- (_old) = NULL; \
- BSP_install_rtems_irq_handler(&clock_isr_data); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ BSP_install_rtems_irq_handler(&clock_isr_data)
static void Clock_driver_support_initialize_hardware(void)
{
diff --git a/c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c b/c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c
index 463125b459..3a0cf0a3a1 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c
+++ b/c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c
@@ -82,11 +82,8 @@ rtems_irq_connect_data clock_isr_data = {
/**
* Installs the clock ISR. You shouldn't need to change this.
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- (_old) = NULL; \
- BSP_install_rtems_irq_handler(&clock_isr_data); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ BSP_install_rtems_irq_handler(&clock_isr_data)
/**
* Initialize the hardware for the clock
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c b/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c
index d5dc69c9a0..576a8278d5 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c
+++ b/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c
@@ -50,11 +50,8 @@ rtems_irq_connect_data clock_isr_data = {
/**
* Installs the clock ISR. You shouldn't need to change this.
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- (_old) = NULL; \
- BSP_install_rtems_irq_handler(&clock_isr_data); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ BSP_install_rtems_irq_handler(&clock_isr_data)
/**
* Initialize the hardware for the clock
diff --git a/c/src/lib/libcpu/arm/pxa255/clock/clock.c b/c/src/lib/libcpu/arm/pxa255/clock/clock.c
index 979e6fbd00..d8e8afb9dd 100644
--- a/c/src/lib/libcpu/arm/pxa255/clock/clock.c
+++ b/c/src/lib/libcpu/arm/pxa255/clock/clock.c
@@ -86,11 +86,8 @@ rtems_irq_connect_data clock_isr_data = {
.isOn = clock_isr_is_on,
};
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = NULL; \
- BSP_install_rtems_irq_handler(&clock_isr_data); \
- } while (0)
+#define Clock_driver_support_install_isr( _new ) \
+ BSP_install_rtems_irq_handler(&clock_isr_data)
static void Clock_driver_support_initialize_hardware(void)
{
diff --git a/c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c b/c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c
index d8c7e644ad..41d61909cb 100644
--- a/c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c
+++ b/c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c
@@ -41,11 +41,8 @@ rtems_irq_connect_data clock_isr_data = {
/**
* Installs the clock ISR. You shouldn't need to change this.
*/
-#define Clock_driver_support_install_isr( _new, _old ) \
- do { \
- _old = NULL; \
- BSP_install_rtems_irq_handler(&clock_isr_data); \
- } while(0)
+#define Clock_driver_support_install_isr( _new ) \
+ BSP_install_rtems_irq_handler(&clock_isr_data)
/**