summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-09-15 10:01:53 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-10-20 11:16:53 +0200
commit8fe0fc47213a7f217294c94634ca90a37f0a4535 (patch)
tree3848c948e3ea8ccde275b99b64d202c19d8637bb
parent95cf6e57be3b18cdb2b42a333638ebe806f405c7 (diff)
bsps/leon3: Optional IRQ(A)MP timestamp support
This is necessary to run the tests on SIS with profiling enabled. Update #4954.
-rw-r--r--bsps/include/bsp/fatal.h1
-rw-r--r--bsps/sparc/leon3/clock/ckinit.c6
2 files changed, 2 insertions, 5 deletions
diff --git a/bsps/include/bsp/fatal.h b/bsps/include/bsp/fatal.h
index 4b7d0f6ced..1726bfea54 100644
--- a/bsps/include/bsp/fatal.h
+++ b/bsps/include/bsp/fatal.h
@@ -91,7 +91,6 @@ typedef enum {
LEON3_FATAL_CLOCK_INITIALIZATION,
LEON3_FATAL_INVALID_CACHE_CONFIG_BOOT_PROCESSOR,
LEON3_FATAL_INVALID_CACHE_CONFIG_SECONDARY_PROCESSOR,
- LEON3_FATAL_CLOCK_NO_IRQMP_TIMESTAMP_SUPPORT,
/* LPC24XX fatal codes */
LPC24XX_FATAL_PL111_SET_UP = BSP_FATAL_CODE_BLOCK(3),
diff --git a/bsps/sparc/leon3/clock/ckinit.c b/bsps/sparc/leon3/clock/ckinit.c
index c335652a56..cff2991e60 100644
--- a/bsps/sparc/leon3/clock/ckinit.c
+++ b/bsps/sparc/leon3/clock/ckinit.c
@@ -196,11 +196,9 @@ static void leon3_clock_use_up_counter(struct timecounter *tc)
tc->tc_frequency = leon3_up_counter_frequency();
#if defined(RTEMS_PROFILING)
- if (irqamp_get_timestamp_registers(LEON3_IrqCtrl_Regs) == NULL) {
- bsp_fatal(LEON3_FATAL_CLOCK_NO_IRQMP_TIMESTAMP_SUPPORT);
+ if (irqamp_get_timestamp_registers(LEON3_IrqCtrl_Regs) != NULL) {
+ leon3_tc_tick = leon3_tc_tick_irqmp_timestamp_init;
}
-
- leon3_tc_tick = leon3_tc_tick_irqmp_timestamp_init;
#endif
rtems_timecounter_install(tc);