summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-26 13:41:07 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-26 13:41:07 +0000
commit5850c5333a1f8bb3a8d06be42a10750fc2f95d29 (patch)
tree1c1d22c9d694832e627d57833dac1e63e0dd51d5 /c/src/lib/libbsp
parent5f85d3b3a78040ec0920944cb4b5202faa02d0c4 (diff)
downloadrtems-5850c5333a1f8bb3a8d06be42a10750fc2f95d29.tar.bz2
2001-10-26 Alexandra Kossovsky <sasha@oktet.ru>
* README, console/console.c, hw_init/hw_init.c, include/bsp.h, startup/bspstart.c, startup/linkcmds: Minor fixes post merge.
Diffstat (limited to 'c/src/lib/libbsp')
-rw-r--r--c/src/lib/libbsp/sh/gensh4/ChangeLog5
-rw-r--r--c/src/lib/libbsp/sh/gensh4/README6
-rw-r--r--c/src/lib/libbsp/sh/gensh4/console/console.c7
-rw-r--r--c/src/lib/libbsp/sh/gensh4/hw_init/hw_init.c3
-rw-r--r--c/src/lib/libbsp/sh/gensh4/include/bsp.h7
-rw-r--r--c/src/lib/libbsp/sh/gensh4/startup/bspstart.c7
-rw-r--r--c/src/lib/libbsp/sh/gensh4/startup/linkcmds3
7 files changed, 16 insertions, 22 deletions
diff --git a/c/src/lib/libbsp/sh/gensh4/ChangeLog b/c/src/lib/libbsp/sh/gensh4/ChangeLog
index 0c56663670..116f6a119c 100644
--- a/c/src/lib/libbsp/sh/gensh4/ChangeLog
+++ b/c/src/lib/libbsp/sh/gensh4/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-26 Alexandra Kossovsky <sasha@oktet.ru>
+
+ * README, console/console.c, hw_init/hw_init.c, include/bsp.h,
+ startup/bspstart.c, startup/linkcmds: Minor fixes post merge.
+
2001-10-15 Joel Sherrill <joel@OARcorp.com>
* console/.cvsignore: New file.
diff --git a/c/src/lib/libbsp/sh/gensh4/README b/c/src/lib/libbsp/sh/gensh4/README
index 8d55eb56c0..ae87b2b81a 100644
--- a/c/src/lib/libbsp/sh/gensh4/README
+++ b/c/src/lib/libbsp/sh/gensh4/README
@@ -64,12 +64,12 @@ NOTES
hw_init.c also provides 'bsp_cache_on'(void) normally called from
'start.S' after copying all data from rom to ram.
-(3) In 'make/custom/gensh4.cfg' you should properly set 'HZ=XXXX', which
- is frequency fed to the CPU core (external clock frequency can be
+(3) In 'configure.ac' you should properly set 'CPU_CLOCK_RATE_HZ'.
+ It is frequency fed to the CPU core (external clock frequency can be
multiplied by on-chip PLLs). Please note that it is not a frequency of
external oscillator! See Hardware Manual, section 10, for details.
Global variable 'SH4_CPU_HZ_Frequency' is declared in 'bsp.h' and
- initilized in 'bspstart.c' to ${HZ}. It is used by console driver,
+ initilized in 'bspstart.c' to ${HZ}. It is used by sci driver,
which exists in 'libcpu/sh/sh7750'.
(4) There is SH4_WITH_IPL macro in console driver 'sh4_uart.h'.
diff --git a/c/src/lib/libbsp/sh/gensh4/console/console.c b/c/src/lib/libbsp/sh/gensh4/console/console.c
index 126e88949c..7326ef9409 100644
--- a/c/src/lib/libbsp/sh/gensh4/console/console.c
+++ b/c/src/lib/libbsp/sh/gensh4/console/console.c
@@ -181,7 +181,12 @@ console_first_open(int major, int minor, void *arg)
static int
console_last_close(int major, int minor, void *arg)
{
- return sh4uart_disable(&sh4_uarts[minor]);
+ if (console_mode != CONSOLE_MODE_IPL)
+ /* working from gdb we should not disable port operations */
+ return sh4uart_disable(&sh4_uarts[minor],
+ !(boot_mode == SH4_BOOT_MODE_IPL));
+ else
+ return RTEMS_SUCCESSFUL;
}
/* console_reserve_resources --
diff --git a/c/src/lib/libbsp/sh/gensh4/hw_init/hw_init.c b/c/src/lib/libbsp/sh/gensh4/hw_init/hw_init.c
index e691565453..03aa0465d8 100644
--- a/c/src/lib/libbsp/sh/gensh4/hw_init/hw_init.c
+++ b/c/src/lib/libbsp/sh/gensh4/hw_init/hw_init.c
@@ -3,6 +3,7 @@
*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Victor V. Vengerov <vvv@oktet.ru>
+ * Alexandra Kossovsky <sasha@oktet.ru>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -174,9 +175,7 @@ early_hw_init(void)
/* Time between auto-refresh commands is 15.6 microseconds; refresh
timer counter frequency is 12 MHz; 1.56e-5*1.2e7= 187.2, therefore
program the refresh timer divider to 187 */
- /* Sasha, try to run it with period 187 -- it should work! */
write16(SH7750_RTCOR_KEY | 187, SH7750_RTCOR);
-/* write16(SH7750_RTCOR_KEY | 90, SH7750_RTCOR); */
/* Clear refresh counter */
write16(SH7750_RFCR_KEY | 0, SH7750_RFCR);
diff --git a/c/src/lib/libbsp/sh/gensh4/include/bsp.h b/c/src/lib/libbsp/sh/gensh4/include/bsp.h
index 7633dbfeba..f734c4d12a 100644
--- a/c/src/lib/libbsp/sh/gensh4/include/bsp.h
+++ b/c/src/lib/libbsp/sh/gensh4/include/bsp.h
@@ -134,13 +134,6 @@ extern unsigned32 WorkSpaceEnd ;
extern void *CPU_Interrupt_stack_low ;
extern void *CPU_Interrupt_stack_high ;
-#if OBSOLETE
-/*
- * This variable is nesessary for console driver.
- */
-extern rtems_unsigned32 SH4_CPU_HZ_Frequency;
-#endif
-
/*
* Defined in start.S
*/
diff --git a/c/src/lib/libbsp/sh/gensh4/startup/bspstart.c b/c/src/lib/libbsp/sh/gensh4/startup/bspstart.c
index ff2798730f..0e3ce2d05a 100644
--- a/c/src/lib/libbsp/sh/gensh4/startup/bspstart.c
+++ b/c/src/lib/libbsp/sh/gensh4/startup/bspstart.c
@@ -46,13 +46,6 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
-#if OBSOLETE
-/*
- * This variable is nesessary for console driver.
- */
-unsigned32 SH4_CPU_HZ_Frequency = CPU_CLOCK_RATE_HZ;
-#endif
-
/*
* Use the shared implementations of the following routines
*/
diff --git a/c/src/lib/libbsp/sh/gensh4/startup/linkcmds b/c/src/lib/libbsp/sh/gensh4/startup/linkcmds
index 431cc83069..6a0342b538 100644
--- a/c/src/lib/libbsp/sh/gensh4/startup/linkcmds
+++ b/c/src/lib/libbsp/sh/gensh4/startup/linkcmds
@@ -16,10 +16,9 @@
* $Id$
*/
-/*
+
OUTPUT_FORMAT("elf32-shl", "elf32-shl",
"elf32-shl")
- */
OUTPUT_ARCH(sh)
ENTRY(_start)
/* Do we need any of these for elf?