summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-04-27 22:53:04 +0200
committerWolfgang Denk <wd@denx.de>2010-04-27 22:53:04 +0200
commitc88d6ab19ffab06f372b15c290bdf5d6f1ebfe9a (patch)
tree020001798e0f799032c68942bc7d0b13a65041ca /drivers/serial
parentfbb0030e3894119c089256f16626edd166c7629c (diff)
parent8cbb0ddd7e696c6a4be1ae3ab3c95d3c8f6a7031 (diff)
downloadu-boot-imx-c88d6ab19ffab06f372b15c290bdf5d6f1ebfe9a.zip
u-boot-imx-c88d6ab19ffab06f372b15c290bdf5d6f1ebfe9a.tar.gz
u-boot-imx-c88d6ab19ffab06f372b15c290bdf5d6f1ebfe9a.tar.bz2
Merge branch 'next' of git://git.denx.de/u-boot-nios
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/altera_jtag_uart.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index fb28aa9..2980e4d 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -38,8 +38,16 @@ int serial_init( void ) { return(0);}
void serial_putc (char c)
{
- while (NIOS_JTAG_WSPACE ( readl (&jtag->control)) == 0)
- WATCHDOG_RESET ();
+ while (1) {
+ unsigned st = readl(&jtag->control);
+ if (NIOS_JTAG_WSPACE(st))
+ break;
+#ifdef CONFIG_ALTERA_JTAG_UART_BYPASS
+ if (!(st & NIOS_JTAG_AC)) /* no connection */
+ return;
+#endif
+ WATCHDOG_RESET();
+ }
writel ((unsigned char)c, &jtag->data);
}