diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-09-15 11:11:31 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-10-20 11:16:54 +0200 |
commit | 3f03a6d2ef787d8b0a6ebf4549eb992c0aced513 (patch) | |
tree | b984c04ceef4db7d0afb45001bfc7607c548252f /bsps/sparc/leon3/start | |
parent | sparc: Move CPU counter implementation (diff) | |
download | rtems-3f03a6d2ef787d8b0a6ebf4549eb992c0aced513.tar.bz2 |
bsps/leon3: Make GPTIMER fall back mandatory
Using the auto reload counter which generates the clock ticks for the
timecounter or CPU counter is quite difficult and only works in
uniprocessor configurations.
Update #4954.
Diffstat (limited to 'bsps/sparc/leon3/start')
-rw-r--r-- | bsps/sparc/leon3/start/amba.c | 2 | ||||
-rw-r--r-- | bsps/sparc/leon3/start/cpucounter.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/bsps/sparc/leon3/start/amba.c b/bsps/sparc/leon3/start/amba.c index 72f1f5e63b..05708e06d0 100644 --- a/bsps/sparc/leon3/start/amba.c +++ b/bsps/sparc/leon3/start/amba.c @@ -39,8 +39,10 @@ #include <string.h> +#if !defined(LEON3_GPTIMER_BASE) unsigned int leon3_timer_prescaler __attribute__((weak)) = 0; int leon3_timer_core_index __attribute__((weak)) = 0; +#endif /* AMBA Plug&Play information description. * diff --git a/bsps/sparc/leon3/start/cpucounter.c b/bsps/sparc/leon3/start/cpucounter.c index a6db7677a3..374e43c9b1 100644 --- a/bsps/sparc/leon3/start/cpucounter.c +++ b/bsps/sparc/leon3/start/cpucounter.c @@ -89,7 +89,7 @@ static void leon3_counter_use_gptimer(SPARC_Counter *counter, gptimer *gpt) counter->read = _SPARC_Counter_read_down; counter->counter_register = &timer->tcntval; - /* Make timer free running */ + /* Make timer free-running */ grlib_store_32(&timer->trldval, 0xffffffff); grlib_store_32(&timer->tctrl, GPTIMER_TCTRL_EN | GPTIMER_TCTRL_RS); |