diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-10-26 13:43:58 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-10-26 13:43:58 +0000 |
commit | baef9d91b561daf6e7eb31148e7d804c5c0154e8 (patch) | |
tree | 2062a511afe666051946db55f1096ae25c2611ec /c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c | |
parent | 2001-10-26 Alexandra Kossovsky <sasha@oktet.ru> (diff) | |
download | rtems-baef9d91b561daf6e7eb31148e7d804c5c0154e8.tar.bz2 |
2001-10-26 Alexandra Kossovsky <sasha@oktet.ru>
* include/sh/sh4uart.h, sci/sh4uart.c: Minor fixes post merge.
Diffstat (limited to 'c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c')
-rw-r--r-- | c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c b/c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c index d7ce0cb54d..d3d377e2fb 100644 --- a/c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c +++ b/c/src/lib/libcpu/sh/sh7750/sci/sh4uart.c @@ -19,17 +19,13 @@ #include <rtems.h> #include <termios.h> #include <rtems/libio.h> -#include <sh/sh4uart.h> +#include <bsp.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); @@ -78,8 +74,8 @@ sh4uart_init(sh4uart *uart, void *tty, int chn, int int_driven) * Get current peripheral module clock. * * PARAMETERS: none; - * Cpu clock is get from SH4_CPU_HZ_Frequency. - * This variable should be defined in bsp. + * Cpu clock is get from CPU_CLOCK_RATE_HZ marco + * (defined in bspopts.h, included from bsp.h) * * RETURNS: * peripheral module clock in Hz. @@ -88,7 +84,7 @@ rtems_unsigned32 sh4uart_get_Pph(void) { rtems_unsigned16 frqcr = *(volatile rtems_unsigned16 *)SH7750_FRQCR; - rtems_unsigned32 Pph = rtems_cpu_configuration_get_clicks_per_second() ; + rtems_unsigned32 Pph = CPU_CLOCK_RATE_HZ; switch (frqcr & SH7750_FRQCR_IFC) { @@ -312,17 +308,19 @@ sh4uart_reset(sh4uart *uart) * * PARAMETERS: * uart - pointer to UART channel descriptor structure + * disable_port - disable receive and transmit on the port * * RETURNS: * RTEMS_SUCCESSFUL if UART closed successfuly, or error code in * other case */ rtems_status_code -sh4uart_disable(sh4uart *uart) +sh4uart_disable(sh4uart *uart, int disable_port) { rtems_status_code rc; - SCSCR(uart->chn) &= ~(SH7750_SCSCR_TE | SH7750_SCSCR_RE); + if (disable_port) + SCSCR(uart->chn) &= ~(SH7750_SCSCR_TE | SH7750_SCSCR_RE); if (uart->int_driven) { @@ -944,3 +942,5 @@ ipl_console_poll_write(int minor, const char *buf, int len) return 0; } #endif + + |