summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-18 16:39:24 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-24 10:54:00 +0200
commitbee7612ec57be542c4cc14b5177f6a1d7fd6804d (patch)
treeb15a7d8cec758386fb9d85d0949f4b5d66beab55
parentbsp/virtex: Do not use PPC403 TTY driver (diff)
downloadrtems-bee7612ec57be542c4cc14b5177f6a1d7fd6804d.tar.bz2
bsp/virtex: Move timer config to new file
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/Makefile.am10
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c6
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/timer/timer-config.c61
3 files changed, 68 insertions, 9 deletions
diff --git a/c/src/lib/libbsp/powerpc/virtex/Makefile.am b/c/src/lib/libbsp/powerpc/virtex/Makefile.am
index 65663d980d..a2647e85d5 100644
--- a/c/src/lib/libbsp/powerpc/virtex/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/virtex/Makefile.am
@@ -39,6 +39,7 @@ dist_project_lib_DATA += ../shared/startup/linkcmds.base
noinst_LIBRARIES += libbsp.a
libbsp_a_SOURCES =
+libbsp_a_LIBADD =
# startup
libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bspgetworkarea.c \
@@ -69,13 +70,16 @@ network_rel_CPPFLAGS = $(AM_CPPFLAGS)
network_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif
-libbsp_a_LIBADD = \
+# timer
+libbsp_a_SOURCES += timer/timer-config.c
+libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/ppc403/timer.rel
+
+libbsp_a_LIBADD += \
../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/exc_bspsupport.rel \
../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
- ../../../libcpu/@RTEMS_CPU@/ppc403/clock.rel \
- ../../../libcpu/@RTEMS_CPU@/ppc403/timer.rel
+ ../../../libcpu/@RTEMS_CPU@/ppc403/clock.rel
if HAS_NETWORKING
libbsp_a_LIBADD += network.rel
diff --git a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c
index f19c3fce2c..4cb8cdae66 100644
--- a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c
@@ -73,9 +73,6 @@ LINKER_SYMBOL(virtex_exc_vector_base);
* Driver configuration parameters
*/
uint32_t bsp_clicks_per_usec;
-uint32_t bsp_timer_average_overhead; /* Average overhead of timer in ticks */
-uint32_t bsp_timer_least_valid; /* Least valid number from timer */
-bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
/*
* bsp_start
@@ -98,9 +95,6 @@ void bsp_start( void )
/* timebase register ticks/microsecond */
bsp_clicks_per_usec = (250000000 / 1000000);
- bsp_timer_internal_clock = true;
- bsp_timer_average_overhead = 2;
- bsp_timer_least_valid = 3;
/*
* Initialize default raw exception handlers.
diff --git a/c/src/lib/libbsp/powerpc/virtex/timer/timer-config.c b/c/src/lib/libbsp/powerpc/virtex/timer/timer-config.c
new file mode 100644
index 0000000000..29651eb37a
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/virtex/timer/timer-config.c
@@ -0,0 +1,61 @@
+/*
+ * Author: Thomas Doerfler <td@imd.m.isar.de>
+ * IMD Ingenieurbuero fuer Microcomputertechnik
+ *
+ * COPYRIGHT (c) 1998 by IMD
+ *
+ * Changes from IMD are covered by the original distributions terms.
+ * This file has been derived from the papyrus BSP:
+ *
+ * Author: Andrew Bray <andy@i-cubed.co.uk>
+ *
+ * COPYRIGHT (c) 1995 by i-cubed ltd.
+ *
+ * To anyone who acknowledges that this file is provided "AS IS"
+ * without any express or implied warranty:
+ * permission to use, copy, modify, and distribute this file
+ * for any purpose is hereby granted without fee, provided that
+ * the above copyright notice and this notice appears in all
+ * copies, and that the name of i-cubed limited not be used in
+ * advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ * i-cubed limited makes no representations about the suitability
+ * of this software for any purpose.
+ *
+ * Modifications for spooling console driver and control of memory layout
+ * with linker command file by
+ * Thomas Doerfler <td@imd.m.isar.de>
+ * for these modifications:
+ * COPYRIGHT (c) 1997 by IMD, Puchheim, Germany.
+ *
+ * To anyone who acknowledges that this file is provided "AS IS"
+ * without any express or implied warranty:
+ * permission to use, copy, modify, and distribute this file
+ * for any purpose is hereby granted without fee, provided that
+ * the above copyright notice and this notice appears in all
+ * copies. IMD makes no representations about the suitability
+ * of this software for any purpose.
+ *
+ * Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c:
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * Modifications for PPC405GP by Dennis Ehlin
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+
+/*
+ * Driver configuration parameters
+ */
+
+/* Average overhead of timer in ticks */
+uint32_t bsp_timer_average_overhead = 2;
+
+/* Least valid number from timer */
+uint32_t bsp_timer_least_valid = 3;
+
+/* TRUE, when timer runs with CPU clk */
+bool bsp_timer_internal_clock = true;