diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 20:33:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 20:33:12 -0500 |
commit | 9d8f057acbd38d8177cf2ffd5e151d52c2477372 (patch) | |
tree | 1c3387b045a8a487ff99bf3abed1cdf41670f6e6 /drivers/serial/imx.c | |
parent | 591eb85ecd7e6eb8596c6129ae074e16636b99f4 (diff) | |
parent | 91bca4b3e2f1aaaf67e62a36914f33ca1e7d5a06 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
[SERIAL] Merge avlab serial board entries in parport_serial
[SERIAL] kernel console should send CRLF not LFCR
Diffstat (limited to 'drivers/serial/imx.c')
-rw-r--r-- | drivers/serial/imx.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 4d53fb5ca87b..c3b7a6673e9c 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -743,6 +743,13 @@ static void __init imx_init_ports(void) | |||
743 | } | 743 | } |
744 | 744 | ||
745 | #ifdef CONFIG_SERIAL_IMX_CONSOLE | 745 | #ifdef CONFIG_SERIAL_IMX_CONSOLE |
746 | static void imx_console_putchar(struct uart_port *port, int ch) | ||
747 | { | ||
748 | struct imx_port *sport = (struct imx_port *)port; | ||
749 | while ((UTS((u32)sport->port.membase) & UTS_TXFULL)) | ||
750 | barrier(); | ||
751 | URTX0((u32)sport->port.membase) = ch; | ||
752 | } | ||
746 | 753 | ||
747 | /* | 754 | /* |
748 | * Interrupts are disabled on entering | 755 | * Interrupts are disabled on entering |
@@ -751,7 +758,7 @@ static void | |||
751 | imx_console_write(struct console *co, const char *s, unsigned int count) | 758 | imx_console_write(struct console *co, const char *s, unsigned int count) |
752 | { | 759 | { |
753 | struct imx_port *sport = &imx_ports[co->index]; | 760 | struct imx_port *sport = &imx_ports[co->index]; |
754 | unsigned int old_ucr1, old_ucr2, i; | 761 | unsigned int old_ucr1, old_ucr2; |
755 | 762 | ||
756 | /* | 763 | /* |
757 | * First, save UCR1/2 and then disable interrupts | 764 | * First, save UCR1/2 and then disable interrupts |
@@ -764,22 +771,7 @@ imx_console_write(struct console *co, const char *s, unsigned int count) | |||
764 | & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN); | 771 | & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN); |
765 | UCR2((u32)sport->port.membase) = old_ucr2 | UCR2_TXEN; | 772 | UCR2((u32)sport->port.membase) = old_ucr2 | UCR2_TXEN; |
766 | 773 | ||
767 | /* | 774 | uart_console_write(&sport->port, s, count, imx_console_putchar); |
768 | * Now, do each character | ||
769 | */ | ||
770 | for (i = 0; i < count; i++) { | ||
771 | |||
772 | while ((UTS((u32)sport->port.membase) & UTS_TXFULL)) | ||
773 | barrier(); | ||
774 | |||
775 | URTX0((u32)sport->port.membase) = s[i]; | ||
776 | |||
777 | if (s[i] == '\n') { | ||
778 | while ((UTS((u32)sport->port.membase) & UTS_TXFULL)) | ||
779 | barrier(); | ||
780 | URTX0((u32)sport->port.membase) = '\r'; | ||
781 | } | ||
782 | } | ||
783 | 775 | ||
784 | /* | 776 | /* |
785 | * Finally, wait for transmitter to become empty | 777 | * Finally, wait for transmitter to become empty |