[PATCH 41/42] LEON3: move timer variable to where initialized

Daniel Hellstrom daniel at gaisler.com
Tue Apr 14 11:33:08 UTC 2015


---
 c/src/lib/libbsp/sparc/leon3/amba/amba.c    |    1 +
 c/src/lib/libbsp/sparc/leon3/clock/ckinit.c |    6 +-----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/leon3/amba/amba.c b/c/src/lib/libbsp/sparc/leon3/amba/amba.c
index 7f55a24..988aeda 100644
--- a/c/src/lib/libbsp/sparc/leon3/amba/amba.c
+++ b/c/src/lib/libbsp/sparc/leon3/amba/amba.c
@@ -72,6 +72,7 @@ rtems_interrupt_lock LEON3_IrqCtrl_Lock =
 /* Pointers to Interrupt Controller configuration registers */
 volatile struct irqmp_regs *LEON3_IrqCtrl_Regs;
 struct ambapp_dev *LEON3_IrqCtrl_Adev;
+volatile struct gptimer_regs *LEON3_Timer_Regs;
 struct ambapp_dev *LEON3_Timer_Adev;
 
 /*
diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
index 8580270..ad22616 100644
--- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
@@ -37,11 +37,7 @@
 #define CLOCK_DRIVER_USE_FAST_IDLE 1
 #endif
 
-/*
- *  The Real Time Clock Counter Timer uses this trap type.
- */
-
-volatile struct gptimer_regs *LEON3_Timer_Regs = 0;
+/* LEON3 Timer system interrupt number */
 static int clkirq;
 
 static void leon3_clock_profiling_interrupt_delay(void)
-- 
1.7.0.4




More information about the devel mailing list