* $Id: clps711x.c,v 1.42 2002/07/28 10:03:28 rmk Exp $
*
*/
+#include <linux/config.h>
#if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ
};
#ifdef CONFIG_SERIAL_CLPS711X_CONSOLE
-static void clps711xuart_console_putchar(struct uart_port *port, int ch)
-{
- while (clps_readl(SYSFLG(port)) & SYSFLG_UTXFF)
- barrier();
- clps_writel(ch, UARTDR(port));
-}
-
/*
* Print a string to the serial port trying not to disturb
* any possible real use of the port...
{
struct uart_port *port = clps711x_ports + co->index;
unsigned int status, syscon;
+ int i;
/*
* Ensure that the port is enabled.
syscon = clps_readl(SYSCON(port));
clps_writel(syscon | SYSCON_UARTEN, SYSCON(port));
- uart_console_write(port, s, count, clps711xuart_console_putchar);
+ /*
+ * Now, do each character
+ */
+ for (i = 0; i < count; i++) {
+ do {
+ status = clps_readl(SYSFLG(port));
+ } while (status & SYSFLG_UTXFF);
+ clps_writel(s[i], UARTDR(port));
+ if (s[i] == '\n') {
+ do {
+ status = clps_readl(SYSFLG(port));
+ } while (status & SYSFLG_UTXFF);
+ clps_writel('\r', UARTDR(port));
+ }
+ }
/*
* Finally, wait for transmitter to become empty