summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-04 22:20:55 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-04 22:20:55 +0000
commit7f3c6cee09ee44b627b11de34248aba485c789b3 (patch)
treec07336cf657989c76a25646872238208bbd4c581 /c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
parent2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-7f3c6cee09ee44b627b11de34248aba485c789b3.tar.bz2
2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* amba/amba.c, clock/ckinit.c, console/console.c, include/bsp.h, startup/bspstart.c, timer/timer.c: Move interrupt_stack_size field from CPU Table to Configuration Table. Eliminate CPU Table from all ports. Delete references to CPU Table in all forms.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/sparc/leon3/clock/ckinit.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
index d9f2acb6fe..172aec5f09 100644
--- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
@@ -33,8 +33,13 @@
extern rtems_configuration_table Configuration;
-#define LEON3_CLOCK_INDEX \
- (Configuration.User_multiprocessing_table ? LEON3_Cpu_Index : 0)
+#if defined(RTEMS_MULTIPROCESSING)
+ #define LEON3_CLOCK_INDEX \
+ (rtems_configuration_get_user_multiprocessing_table() ? LEON3_Cpu_Index : 0)
+#else
+ #define LEON3_CLOCK_INDEX 0
+#endif
+
volatile LEON3_Timer_Regs_Map *LEON3_Timer_Regs = 0;
static int clkirq;
@@ -43,6 +48,17 @@ static int clkirq;
#define Clock_driver_support_at_tick()
+#if defined(RTEMS_MULTIPROCESSING)
+ #define Adjust_clkirq_for_node() \
+ do { \
+ if (rtems_configuration_get_user_multiprocessing_table() != NULL) { \
+ clkirq += LEON3_Cpu_Index; \
+ } \
+ } while(0)
+#else
+ #define Adjust_clkirq_for_node()
+#endif
+
#define Clock_driver_support_find_timer() \
do { \
int cnt; \
@@ -55,9 +71,7 @@ static int clkirq;
LEON3_Timer_Regs = (volatile LEON3_Timer_Regs_Map *) dev.start; \
clkirq = (LEON3_Timer_Regs->status & 0xfc) >> 3; \
\
- if (Configuration.User_multiprocessing_table != NULL) { \
- clkirq += LEON3_Cpu_Index; \
- } \
+ Adjust_clkirq_for_node(); \
} \
} while (0)