[PATCH 27/30 v2] leon, gptimer: fixed probing separate interrupts
Daniel Hellstrom
daniel at gaisler.com
Sat Apr 29 13:52:45 UTC 2017
From: Martin Aberg <maberg at gaisler.com>
Probing of separate interrupts was done by storing the GPTIMER_CFG_SI bit. But
it was never actually stored since it is bit 8 and the datatype is 8-bit. Now
store the AND result as boolean value instead.
---
c/src/lib/libbsp/sparc/shared/timer/gptimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c/src/lib/libbsp/sparc/shared/timer/gptimer.c b/c/src/lib/libbsp/sparc/shared/timer/gptimer.c
index e701211..229e906 100644
--- a/c/src/lib/libbsp/sparc/shared/timer/gptimer.c
+++ b/c/src/lib/libbsp/sparc/shared/timer/gptimer.c
@@ -293,7 +293,7 @@ int gptimer_init1(struct drvmgr_dev *dev)
* B. Each Timer have an individual IRQ. The number is:
* BASE_IRQ + timer_index
*/
- priv->separate_interrupt = regs->cfg & GPTIMER_CFG_SI;
+ priv->separate_interrupt = (regs->cfg & GPTIMER_CFG_SI) != 0;
return DRVMGR_OK;
}
--
2.7.4
More information about the devel
mailing list