summaryrefslogtreecommitdiff
path: root/bsps/powerpc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-01 07:11:12 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-27 08:58:16 +0200
commit7ee59313932398aa2781503d25154c56301b9b73 (patch)
treeefaeaf7fa038f3de1b58676deb16d52744c0b373 /bsps/powerpc
parent718a84afa33c51f7aeaaf41c8eafde20626c1681 (diff)
Remove Clock_driver_support_shutdown_hardware()
The aim of this clock driver hook was to stop clock tick interrupts at some late point in the exit() procedure. The use of atexit() pulls in malloc() which pulls in errno. It is incompatible with the intention of the CONFIGURE_DISABLE_NEWLIB_REENTRANCY configuration option. The exit() function must be called from thread context, so accompanied clock tick interrupts should cause no harm. On the contrary, someone may assume a normal operating system operation, e.g. working timeouts. Remove the Clock_driver_support_shutdown_hardware() clock driver hook. Close #3436.
Diffstat (limited to 'bsps/powerpc')
-rw-r--r--bsps/powerpc/mpc55xxevb/clock/clock-config.c10
-rw-r--r--bsps/powerpc/qoriq/clock/clock-config.c19
2 files changed, 0 insertions, 29 deletions
diff --git a/bsps/powerpc/mpc55xxevb/clock/clock-config.c b/bsps/powerpc/mpc55xxevb/clock/clock-config.c
index 41320c842c..2c2122a7c6 100644
--- a/bsps/powerpc/mpc55xxevb/clock/clock-config.c
+++ b/bsps/powerpc/mpc55xxevb/clock/clock-config.c
@@ -235,14 +235,6 @@ static void mpc55xx_clock_initialize(void)
);
}
-static void mpc55xx_clock_cleanup(void)
-{
- volatile PIT_RTI_CHANNEL_tag *channel =
- &PIT_RTI.CHANNEL [MPC55XX_CLOCK_PIT_CHANNEL];
-
- channel->TCTRL.R = 0;
-}
-
#endif
#define Clock_driver_timecounter_tick() mpc55xx_tc_tick()
@@ -250,8 +242,6 @@ static void mpc55xx_clock_cleanup(void)
mpc55xx_clock_initialize()
#define Clock_driver_support_install_isr(isr) \
mpc55xx_clock_handler_install(isr)
-#define Clock_driver_support_shutdown_hardware() \
- mpc55xx_clock_cleanup()
/* Include shared source clock driver code */
#include "../../../shared/dev/clock/clockimpl.h"
diff --git a/bsps/powerpc/qoriq/clock/clock-config.c b/bsps/powerpc/qoriq/clock/clock-config.c
index 335b1564ab..6fb28ce266 100644
--- a/bsps/powerpc/qoriq/clock/clock-config.c
+++ b/bsps/powerpc/qoriq/clock/clock-config.c
@@ -144,31 +144,12 @@ static void qoriq_clock_initialize(void)
rtems_timecounter_install(&qoriq_clock_tc);
}
-static void qoriq_clock_cleanup(void)
-{
- rtems_status_code sc = RTEMS_SUCCESSFUL;
-
- qoriq_clock->bcr = GTBCR_CI;
-
- sc = rtems_interrupt_handler_remove(
- CLOCK_INTERRUPT,
- Clock_isr,
- NULL
- );
- if (sc != RTEMS_SUCCESSFUL) {
- rtems_fatal_error_occurred(0xdeadbeef);
- }
-}
-
#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)
-#define Clock_driver_support_shutdown_hardware() \
- qoriq_clock_cleanup()
-
#endif /* QORIQ_IS_HYPERVISOR_GUEST */
#define Clock_driver_support_initialize_hardware() \