summaryrefslogtreecommitdiffstats
path: root/bsps/sparc/leon3/start/cpucounter.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-06-10 13:04:13 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-06-17 12:58:33 +0200
commit2c07f24af210c4738fbe6f75a53c58fbd80fb658 (patch)
tree4d8e061e716beb451cdb45bd8761f2025ce062bb /bsps/sparc/leon3/start/cpucounter.c
parentgrlib: Customizable allocation in ambapp_scan() (diff)
downloadrtems-2c07f24af210c4738fbe6f75a53c58fbd80fb658.tar.bz2
grlib: Add ambapp_plb()
Replace the global variable ambapp_plb with a function to allow an automatic on demand initialization.
Diffstat (limited to '')
-rw-r--r--bsps/sparc/leon3/start/cpucounter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsps/sparc/leon3/start/cpucounter.c b/bsps/sparc/leon3/start/cpucounter.c
index 068c631af1..73a306a1eb 100644
--- a/bsps/sparc/leon3/start/cpucounter.c
+++ b/bsps/sparc/leon3/start/cpucounter.c
@@ -52,7 +52,7 @@ static void leon3_counter_initialize(void)
/* Enable interrupt timestamping for an arbitrary interrupt line */
irqmp_ts->control = 0x1;
- leon3_counter_frequency = ambapp_freq_get(&ambapp_plb, LEON3_IrqCtrl_Adev);
+ leon3_counter_frequency = ambapp_freq_get(ambapp_plb(), LEON3_IrqCtrl_Adev);
} else if (gpt != NULL) {
/* Fall back to the first GPTIMER if available */
counter->read_isr_disabled = _SPARC_Counter_read_down;
@@ -65,7 +65,7 @@ static void leon3_counter_initialize(void)
GPTIMER_TIMER_CTRL_RS |
GPTIMER_TIMER_CTRL_LD;
- leon3_counter_frequency = ambapp_freq_get(&ambapp_plb, LEON3_Timer_Adev) /
+ leon3_counter_frequency = ambapp_freq_get(ambapp_plb(), LEON3_Timer_Adev) /
(gpt->scaler_reload + 1);
}
}