From: Scott McNutt <smcnutt@psyent.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] altera_jtag_uart: bypass when no jtag connection
Date: Thu, 22 Apr 2010 21:38:12 -0400 [thread overview]
Message-ID: <4BD0FA04.2040902@psyent.com> (raw)
In-Reply-To: <1269995408-20660-1-git-send-email-thomas@wytron.com.tw>
Applied. Thanks.
--Scott
Thomas Chou wrote:
> This patch adds an option to bypass output waiting when there
> is no jtag connection. This allows the jtag uart work similar
> to a serial uart, ie, boot even without connection.
>
> This option is enabled with,
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
> follow the "Fix outx/writex parameter order in io.h" patch from Scott.
>
> drivers/serial/altera_jtag_uart.c | 12 ++++++++++--
> 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);
> }
>
prev parent reply other threads:[~2010-04-23 1:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-27 23:20 [U-Boot] [PATCH] altera_jtag_uart: bypass when no jtag connection Thomas Chou
2010-03-31 0:30 ` [U-Boot] [PATCH v2] " Thomas Chou
2010-04-23 1:38 ` Scott McNutt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BD0FA04.2040902@psyent.com \
--to=smcnutt@psyent.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.