summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/leon3
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3')
-rw-r--r--c/src/lib/libbsp/sparc/leon3/clock/ckinit.c4
-rw-r--r--c/src/lib/libbsp/sparc/leon3/include/leon.h5
-rw-r--r--c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c4
-rw-r--r--c/src/lib/libbsp/sparc/leon3/timer/timer.c3
4 files changed, 6 insertions, 10 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
index a799908f63..5faf72d77d 100644
--- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
@@ -113,8 +113,8 @@ static void leon3_clock_profiling_interrupt_delay(void)
rtems_configuration_get_microseconds_per_tick() - 1; \
\
LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].ctrl = \
- LEON3_GPTIMER_EN | LEON3_GPTIMER_RL | \
- LEON3_GPTIMER_LD | LEON3_GPTIMER_IRQEN; \
+ GPTIMER_TIMER_CTRL_EN | GPTIMER_TIMER_CTRL_RS | \
+ GPTIMER_TIMER_CTRL_LD | GPTIMER_TIMER_CTRL_IE; \
} while (0)
#define Clock_driver_support_shutdown_hardware() \
diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h
index 6d2434d36c..3ca33a3f3a 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h
@@ -144,11 +144,6 @@ static __inline__ int bsp_irq_fixup(int irq)
/* Macros used for manipulating bits in LEON3 GP Timer Control Register */
-#define LEON3_GPTIMER_EN 1
-#define LEON3_GPTIMER_RL 2
-#define LEON3_GPTIMER_LD 4
-#define LEON3_GPTIMER_IRQEN 8
-
#define LEON3_MP_IRQ 14 /* Irq used by shared memory driver */
#define LEON3_IRQMPSTATUS_CPUNR 28
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c b/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c
index a0cfbd8908..b76d404ac3 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c
+++ b/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c
@@ -113,8 +113,8 @@ void leon3_cpu_counter_initialize(void)
gpt->scaler_reload = min_prescaler - 1;
gpt->timer[0].reload = 0xffffffff;
- gpt->timer[0].ctrl = LEON3_GPTIMER_EN | LEON3_GPTIMER_RL
- | LEON3_GPTIMER_LD;
+ gpt->timer[0].ctrl = GPTIMER_TIMER_CTRL_EN | GPTIMER_TIMER_CTRL_RS
+ | GPTIMER_TIMER_CTRL_LD;
gpt_counter_initialize(gpt, 0, frequency, free_counter_difference);
} else if (LEON3_Timer_Regs != NULL) {
diff --git a/c/src/lib/libbsp/sparc/leon3/timer/timer.c b/c/src/lib/libbsp/sparc/leon3/timer/timer.c
index a9263ff5ac..e7aa7f36ae 100644
--- a/c/src/lib/libbsp/sparc/leon3/timer/timer.c
+++ b/c/src/lib/libbsp/sparc/leon3/timer/timer.c
@@ -48,7 +48,8 @@ void benchmark_timer_initialize(void)
} else {
benchmark_timer_is_initialized = true;
}
- LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].ctrl = LEON3_GPTIMER_EN | LEON3_GPTIMER_LD;
+ LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].ctrl =
+ GPTIMER_TIMER_CTRL_EN | GPTIMER_TIMER_CTRL_LD;
}
}