summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sh/gensh4
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-12 14:45:28 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-12 14:45:28 +0000
commit364d75b6bda08b59dcdc2cc352f81a053ff2c5b1 (patch)
tree5172cf10432af707f631fc63c0f604998bf7fde1 /c/src/lib/libbsp/sh/gensh4
parentcedf9296238356496e974bc20f8480b741f055a6 (diff)
downloadrtems-364d75b6bda08b59dcdc2cc352f81a053ff2c5b1.tar.bz2
2001-10-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Add bspopts.h; Add CPU_CLOCK_RATE_HZ. * startup/bspstart.c: Replace HZ with CPU_CLOCK_RATE_HZ. * include/.cvsignore: Add stamp-h*, bspopts.h*. * include/bsp.h: Add bspopts.h.
Diffstat (limited to 'c/src/lib/libbsp/sh/gensh4')
-rw-r--r--c/src/lib/libbsp/sh/gensh4/ChangeLog7
-rw-r--r--c/src/lib/libbsp/sh/gensh4/configure.ac10
-rw-r--r--c/src/lib/libbsp/sh/gensh4/include/.cvsignore2
-rw-r--r--c/src/lib/libbsp/sh/gensh4/include/bsp.h3
-rw-r--r--c/src/lib/libbsp/sh/gensh4/startup/bspstart.c4
5 files changed, 24 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/sh/gensh4/ChangeLog b/c/src/lib/libbsp/sh/gensh4/ChangeLog
index fcbca778bd..a4d54adca7 100644
--- a/c/src/lib/libbsp/sh/gensh4/ChangeLog
+++ b/c/src/lib/libbsp/sh/gensh4/ChangeLog
@@ -1,3 +1,10 @@
+2001-10-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * configure.ac: Add bspopts.h; Add CPU_CLOCK_RATE_HZ.
+ * startup/bspstart.c: Replace HZ with CPU_CLOCK_RATE_HZ.
+ * include/.cvsignore: Add stamp-h*, bspopts.h*.
+ * include/bsp.h: Add bspopts.h.
+
2001-10-11 Alexandra Kossovsky <sasha@oktet.ru>
* Makefile.am, README, bsp_specs, .cvsignore, include/Makefile.am,
diff --git a/c/src/lib/libbsp/sh/gensh4/configure.ac b/c/src/lib/libbsp/sh/gensh4/configure.ac
index 0a1b505eab..869c68153c 100644
--- a/c/src/lib/libbsp/sh/gensh4/configure.ac
+++ b/c/src/lib/libbsp/sh/gensh4/configure.ac
@@ -19,6 +19,16 @@ RTEMS_ENV_RTEMSBSP
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_CANONICAL_HOST
+
+## bsp-specific options
+CPU_CLOCK_RATE_HZ=${CPU_CLOCK_RATE_HZ-96000000}
+AC_SUBST(CPU_CLOCK_RATE_HZ)
+AC_DEFINE_UNQUOTED(
+ [CPU_CLOCK_RATE_HZ],
+ [$CPU_CLOCK_RATE_HZ],
+ [cpu clock rate in HZ])
+
+AM_CONFIG_HEADER(include/bspopts.h)
RTEMS_PROJECT_ROOT
# Explicitly list all Makefiles here
diff --git a/c/src/lib/libbsp/sh/gensh4/include/.cvsignore b/c/src/lib/libbsp/sh/gensh4/include/.cvsignore
index 282522db03..2be206e5ff 100644
--- a/c/src/lib/libbsp/sh/gensh4/include/.cvsignore
+++ b/c/src/lib/libbsp/sh/gensh4/include/.cvsignore
@@ -1,2 +1,4 @@
Makefile
Makefile.in
+stamp-h*
+bspopts.h*
diff --git a/c/src/lib/libbsp/sh/gensh4/include/bsp.h b/c/src/lib/libbsp/sh/gensh4/include/bsp.h
index 25da9274c4..332cd11296 100644
--- a/c/src/lib/libbsp/sh/gensh4/include/bsp.h
+++ b/c/src/lib/libbsp/sh/gensh4/include/bsp.h
@@ -47,8 +47,11 @@ extern "C" {
#include <rtems.h>
#include <clockdrv.h>
#include <console.h>
+#include <bspopts.h>
+
#include "rtems/score/sh7750_regs.h"
+
/*
* confdefs.h overrides for this BSP:
* - number of termios serial ports (defaults to 1)
diff --git a/c/src/lib/libbsp/sh/gensh4/startup/bspstart.c b/c/src/lib/libbsp/sh/gensh4/startup/bspstart.c
index 05788892cb..08b1cc320a 100644
--- a/c/src/lib/libbsp/sh/gensh4/startup/bspstart.c
+++ b/c/src/lib/libbsp/sh/gensh4/startup/bspstart.c
@@ -49,7 +49,7 @@ char *rtems_progname;
/*
* This variable is nesessary for console driver.
*/
-unsigned32 SH4_CPU_HZ_Frequency = HZ;
+unsigned32 SH4_CPU_HZ_Frequency = CPU_CLOCK_RATE_HZ;
/*
* Use the shared implementations of the following routines
@@ -142,5 +142,5 @@ void bsp_start(void)
Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
#endif
- Cpu_table.clicks_per_second = HZ ;
+ Cpu_table.clicks_per_second = CPU_CLOCK_RATE_HZ ;
}