<div dir="ltr">Looks OK to push. <div><br></div><div>Do you want to cite the ticket number for the build failures in the comments?</div><div><br></div><div>Should I go ahead and push the fatal error patch or will you do that?</div><div><br></div><div>Is this needed on 5? I thought these all built on 5 but could be wrong.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 8, 2020 at 12:52 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Replace leon3_irqmp_has_timestamp() with irqmp_has_timestamp() and move<br>
it to grlib.h.<br>
<br>
Close #4128.<br>
---<br>
bsps/riscv/griscv/clock/clockdrv.c | 2 +-<br>
bsps/shared/grlib/btimer/tlib_ckinit.c | 2 +-<br>
bsps/sparc/leon3/clock/ckinit.c | 4 ++--<br>
bsps/sparc/leon3/include/leon.h | 7 -------<br>
bsps/sparc/leon3/start/cpucounter.c | 2 +-<br>
5 files changed, 5 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/bsps/riscv/griscv/clock/clockdrv.c b/bsps/riscv/griscv/clock/clockdrv.c<br>
index c94c167fdf..4cf15fe4f8 100644<br>
--- a/bsps/riscv/griscv/clock/clockdrv.c<br>
+++ b/bsps/riscv/griscv/clock/clockdrv.c<br>
@@ -171,7 +171,7 @@ static void grlib_clock_initialize(void)<br>
volatile struct irqmp_timestamp_regs *irqmp_ts =<br>
&GRLIB_IrqCtrl_Regs->timestamp[0];<br>
<br>
- if (!grlib_irqmp_has_timestamp(irqmp_ts)) {<br>
+ if (!irqmp_has_timestamp(irqmp_ts)) {<br>
bsp_fatal(GRLIB_FATAL_CLOCK_NO_IRQMP_TIMESTAMP_SUPPORT);<br>
}<br>
#endif<br>
diff --git a/bsps/shared/grlib/btimer/tlib_ckinit.c b/bsps/shared/grlib/btimer/tlib_ckinit.c<br>
index 4f679984d8..5a34d97c00 100644<br>
--- a/bsps/shared/grlib/btimer/tlib_ckinit.c<br>
+++ b/bsps/shared/grlib/btimer/tlib_ckinit.c<br>
@@ -126,7 +126,7 @@ static rtems_device_driver tlib_clock_find_timer(void)<br>
volatile struct irqmp_timestamp_regs *irqmp_ts;<br>
<br>
irqmp_ts = &LEON3_IrqCtrl_Regs->timestamp[0];<br>
- if (leon3_irqmp_has_timestamp(irqmp_ts)) {<br>
+ if (irqmp_has_timestamp(irqmp_ts)) {<br>
priv.ops = &ops_irqamp;<br>
return RTEMS_SUCCESSFUL;<br>
}<br>
diff --git a/bsps/sparc/leon3/clock/ckinit.c b/bsps/sparc/leon3/clock/ckinit.c<br>
index f485123f6b..bf0c506ec0 100644<br>
--- a/bsps/sparc/leon3/clock/ckinit.c<br>
+++ b/bsps/sparc/leon3/clock/ckinit.c<br>
@@ -176,13 +176,13 @@ static void leon3_clock_initialize(void)<br>
tc->tc_frequency = leon3_up_counter_frequency();<br>
<br>
#ifdef RTEMS_PROFILING<br>
- if (!leon3_irqmp_has_timestamp(irqmp_ts)) {<br>
+ if (!irqmp_has_timestamp(irqmp_ts)) {<br>
bsp_fatal(LEON3_FATAL_CLOCK_NO_IRQMP_TIMESTAMP_SUPPORT);<br>
}<br>
#endif<br>
<br>
leon3_tc_tick = leon3_tc_tick_irqmp_timestamp_init;<br>
- } else if (leon3_irqmp_has_timestamp(irqmp_ts)) {<br>
+ } else if (irqmp_has_timestamp(irqmp_ts)) {<br>
/* Use the interrupt controller timestamp counter if available */<br>
tc->tc_get_timecount = _SPARC_Get_timecount_up;<br>
tc->tc_frequency = ambapp_freq_get(&ambapp_plb, LEON3_Timer_Adev);<br>
diff --git a/bsps/sparc/leon3/include/leon.h b/bsps/sparc/leon3/include/leon.h<br>
index afe0d91ca4..d25825c8e8 100644<br>
--- a/bsps/sparc/leon3/include/leon.h<br>
+++ b/bsps/sparc/leon3/include/leon.h<br>
@@ -454,13 +454,6 @@ static inline uint32_t leon3_get_data_cache_config_register(void)<br>
return leon3_get_system_register(0xc);<br>
}<br>
<br>
-static inline bool leon3_irqmp_has_timestamp(<br>
- volatile struct irqmp_timestamp_regs *irqmp_ts<br>
-)<br>
-{<br>
- return (irqmp_ts->control >> 27) > 0;<br>
-}<br>
-<br>
static inline uint32_t leon3_up_counter_low(void)<br>
{<br>
uint32_t asr23;<br>
diff --git a/bsps/sparc/leon3/start/cpucounter.c b/bsps/sparc/leon3/start/cpucounter.c<br>
index 007bb6d8ec..1d96e3b221 100644<br>
--- a/bsps/sparc/leon3/start/cpucounter.c<br>
+++ b/bsps/sparc/leon3/start/cpucounter.c<br>
@@ -43,7 +43,7 @@ static void leon3_counter_initialize(void)<br>
counter->read = _SPARC_Counter_read_asr23;<br>
<br>
leon3_counter_frequency = leon3_up_counter_frequency();<br>
- } else if (leon3_irqmp_has_timestamp(irqmp_ts)) {<br>
+ } else if (irqmp_has_timestamp(irqmp_ts)) {<br>
/* Use the interrupt controller timestamp counter if available */<br>
counter->read_isr_disabled = _SPARC_Counter_read_up;<br>
counter->read = _SPARC_Counter_read_up;<br>
-- <br>
2.26.2<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>