diff options
author | Martin Aberg <maberg@gaisler.com> | 2017-02-23 16:33:21 +0100 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2017-05-02 12:34:45 +0200 |
commit | f600458d05ee3f15f75292e15aea4d913862d132 (patch) | |
tree | cec1214c4456aec2334859d0a1da66f5278959b5 /c/src/lib/libbsp/sparc/shared/timer/gptimer.c | |
parent | leon, tlib: added timer width mask information (diff) | |
download | rtems-f600458d05ee3f15f75292e15aea4d913862d132.tar.bz2 |
leon, clock: new driver manager clock driver
- Compatible with SMP
- Selects timecounter depending on features available
- Fixes problem with time going to fast on SMP
This is an implementation of the RTEMS "clockdrv_shell" interface for
LEON2/3/4 systems using the Driver Manager. It is clock hardware agnostic
and compatible with SMP and UP. Availability of free running counters is
probed and selected as needed.
GR740:
RTEMS TESTSUITE FAILURE SUMMARY
Result Test ExecRes ConsoleRes ExitCode1 ExitCode2
FAIL: ./fstests/imfs_fsscandir01 OK FAIL 5 0
FAIL: ./fstests/jffs2_fsscandir01 OK FAIL 5 0
FAIL: ./fstests/mdosfs_fsscandir01 OK FAIL 5 0
FAIL: ./fstests/mimfs_fsscandir01 OK FAIL 5 0
FAIL: ./fstests/mrfs_fsscandir01 OK FAIL 5 0
FAIL: ./psxtests/psxshm01 FAIL FAIL N/A N/A
FAIL: ./psxtests/psxshm02 FAIL FAIL N/A N/A
FAIL: ./sptests/spinternalerror01 OK N/A -559038737 1611526157
FAIL: ./sptests/sptimecounter01 OK N/A 5 0
SUMMARY
Tests failing: 9
Tests successful: 578
---
GR712RC:
RTEMS TESTSUITE FAILURE SUMMARY
Result Test ExecRes ConsoleRes ExitCode1 ExitCode2
FAIL: ./smptests/smpipi01 FAIL FAIL N/A N/A
FAIL: ./smptests/smpthreadlife01 FAIL FAIL N/A N/A
FAIL: ./fstests/imfs_fsscandir01 OK FAIL 5 0
FAIL: ./fstests/jffs2_fsscandir01 OK FAIL 5 0
FAIL: ./fstests/mdosfs_fsscandir01 OK FAIL 5 0
FAIL: ./fstests/mimfs_fsscandir01 OK FAIL 5 0
FAIL: ./fstests/mrfs_fsscandir01 OK FAIL 5 0
FAIL: ./psxtests/psxshm01 FAIL FAIL N/A N/A
FAIL: ./psxtests/psxshm02 FAIL FAIL N/A N/A
FAIL: ./sptests/spinternalerror01 OK N/A -559038737 1611526157
FAIL: ./sptests/sptimecounter01 OK N/A 5 0
SUMMARY
Tests failing: 11
Tests successful: 576
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared/timer/gptimer.c')
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/timer/gptimer.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/timer/gptimer.c b/c/src/lib/libbsp/sparc/shared/timer/gptimer.c index f47952ff74..e701211ee5 100644 --- a/c/src/lib/libbsp/sparc/shared/timer/gptimer.c +++ b/c/src/lib/libbsp/sparc/shared/timer/gptimer.c @@ -48,6 +48,11 @@ #include <stdio.h> #endif +#ifdef RTEMS_SMP +#include <rtems/score/processormask.h> +#include <rtems/score/smpimpl.h> +#endif + /* GPTIMER Core Configuration Register (READ-ONLY) */ #define GPTIMER_CFG_TIMERS_BIT 0 #define GPTIMER_CFG_IRQ_BIT 3 @@ -416,7 +421,7 @@ static int gptimer_tlib_set_freq(struct tlib_dev *hand, unsigned int tickrate) return 0; } -static void gptimer_tlib_irq_reg(struct tlib_dev *hand, tlib_isr_t func, void *data) +static void gptimer_tlib_irq_reg(struct tlib_dev *hand, tlib_isr_t func, void *data, int flags) { struct gptimer_timer *timer = (struct gptimer_timer *)hand; struct gptimer_priv *priv = priv_from_timer(timer); @@ -437,6 +442,13 @@ static void gptimer_tlib_irq_reg(struct tlib_dev *hand, tlib_isr_t func, void *d priv->isr_installed++; } +#if RTEMS_SMP + if (flags & TLIB_FLAGS_BROADCAST) { + drvmgr_interrupt_set_affinity(priv->dev, timer->tindex, + _SMP_Online_processors); + } +#endif + timer->tregs->ctrl |= GPTIMER_CTRL_IE; } |