summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/sh/sh7750/sci
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-15 18:01:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-15 18:01:12 +0000
commit12ae6d9e06e204ffec3669b22b91d4932b3c90e5 (patch)
tree45eb65a3d07bc230fe66e4565182a2ef231e47d1 /c/src/lib/libcpu/sh/sh7750/sci
parent3bcc0d8913b40c1857920935dae4a6b1cec69be9 (diff)
downloadrtems-12ae6d9e06e204ffec3669b22b91d4932b3c90e5.tar.bz2
2001-10-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* include/sh4uart.h: move to include/sh/sh4uart.h. * include/ispsh7750.h: move to include/rtems/score/ispsh7750.h. * include/iosh7750.h: move include/rtems/score/iosh7750.h. * include/sh7750_regs.h: move to include/rtems/score/sh7750_regs.h. * include/rtems/score/ipl.h: move to include/rtems/score/ipl.h. * include/rtems/score/sh4_regs.h: Reintroduce from Alexandra Kossovsky's original sources. * include/Makefile.am: reflect changes above, remove EXTRA_DIST, require automake 1.5. * sci/Makefile.am: Disable compilation of console.c. * sci/sh4uart.c: include <sh/sh4uart.h>, add SH7750_SCSMR_CHK_S, remove SH4_CPU_HZ_Frequency; * score/isph7750.c: Remove #if !defined(sh7750), include sh4_regs.h.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libcpu/sh/sh7750/sci/Makefile.am6
-rw-r--r--c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/c/src/lib/libcpu/sh/sh7750/sci/Makefile.am b/c/src/lib/libcpu/sh/sh7750/sci/Makefile.am
index e37a7e7984..03ce1e95c6 100644
--- a/c/src/lib/libcpu/sh/sh7750/sci/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7750/sci/Makefile.am
@@ -6,7 +6,7 @@ AUTOMAKE_OPTIONS = foreign 1.4
PGM = $(ARCH)/sci.rel
-C_FILES = console.c sh4uart.c
+C_FILES = sh4uart.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
OBJS = $(C_O_FILES)
@@ -26,4 +26,8 @@ all-local: $(ARCH) $(OBJS) $(PGM)
.PRECIOUS: $(PGM)
+## FIXME: Moved to libbsp/sh/<BSP>/console/
+## Needs to be reworked to be usable here.
+EXTRA_DIST = console.c
+
include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c b/c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c
index 5c75b23a9f..d7ce0cb54d 100644
--- a/c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c
+++ b/c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c
@@ -1,9 +1,6 @@
/*
* Generic UART Serial driver for SH-4 processors
*
- * This driver uses variable SH4_CPU_HZ_Frequency,
- * which should be defined in bsp to HZ macro.
- *
* Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russian Fed.
* Author: Alexandra Kossovsky <sasha@oktet.ru>
*
@@ -22,12 +19,17 @@
#include <rtems.h>
#include <termios.h>
#include <rtems/libio.h>
-#include "sh/sh4uart.h"
+#include <sh/sh4uart.h>
#ifndef SH4_UART_INTERRUPT_LEVEL
#define SH4_UART_INTERRUPT_LEVEL 4
#endif
+/* FIXME: ???
+#define SH7750_SCSMR_CKS_S SH7750_SCSMR_CKS_DIV1
+ */
+#define SH7750_SCSMR_CKS_S 0
+
/* Forward function declarations */
static rtems_isr
sh4uart1_interrupt_transmit(rtems_vector_number vec);
@@ -86,7 +88,7 @@ rtems_unsigned32
sh4uart_get_Pph(void)
{
rtems_unsigned16 frqcr = *(volatile rtems_unsigned16 *)SH7750_FRQCR;
- rtems_unsigned32 Pph = SH4_CPU_HZ_Frequency;
+ rtems_unsigned32 Pph = rtems_cpu_configuration_get_clicks_per_second() ;
switch (frqcr & SH7750_FRQCR_IFC)
{