From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/3] serial: uartlite: Add support for debug console
Date: Thu, 17 Dec 2015 21:29:56 +0800 [thread overview]
Message-ID: <5672B8D4.3030505@wytron.com.tw> (raw)
In-Reply-To: <8440ca6c28112e04dddd3e90ffb8d8bbd425416f.1450353650.git.michal.simek@xilinx.com>
Hi Michal,
On 2015?12?17? 20:00, Michal Simek wrote:
> Add support for debug console.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> Changes in v2:
> - Add needed header from the first patch
> - Remove WATCHDOG_RESET call
> - Extend commit description
>
> drivers/serial/Kconfig | 7 +++++++
> drivers/serial/serial_xuartlite.c | 26 ++++++++++++++++++++++++++
> 2 files changed, 33 insertions(+)
>
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index 1fc287ee98ec..f1e221799b81 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -92,6 +92,13 @@ config DEBUG_UART_S5P
> will need to provide parameters to make this work. The driver will
> be available until the real driver-model serial is running.
>
> +config DEBUG_UART_UARTLITE
> + bool "Xilinx Uartlite"
> + help
> + Select this to enable a debug UART using the serial_uartlite driver.
> + You will need to provide parameters to make this work. The driver will
> + be available until the real driver-model serial is running.
> +
> config DEBUG_UART_ZYNQ
> bool "Xilinx Zynq"
> help
> diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
> index 8225d9a320a5..f42b11eae102 100644
> --- a/drivers/serial/serial_xuartlite.c
> +++ b/drivers/serial/serial_xuartlite.c
> @@ -114,3 +114,29 @@ U_BOOT_DRIVER(serial_uartlite) = {
> .ops = &uartlite_serial_ops,
> .flags = DM_FLAG_PRE_RELOC,
> };
> +
> +#ifdef CONFIG_DEBUG_UART_UARTLITE
> +
> +#include <debug_uart.h>
> +
> +void _debug_uart_init(void)
Still missing, static inline
Otherwise,
Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
> +{
> + struct uartlite *regs = (struct uartlite *)CONFIG_DEBUG_UART_BASE;
> +
> + out_be32(®s->control, 0);
> + out_be32(®s->control, ULITE_CONTROL_RST_RX | ULITE_CONTROL_RST_TX);
> + in_be32(®s->control);
> +}
> +
> +static inline void _debug_uart_putc(int ch)
> +{
> + struct uartlite *regs = (struct uartlite *)CONFIG_DEBUG_UART_BASE;
> +
> + while (in_be32(®s->status) & SR_TX_FIFO_FULL)
> + ;
> +
> + out_be32(®s->tx_fifo, ch & 0xff);
> +}
> +
> +DEBUG_UART_FUNCS
> +#endif
>
Best regards,
Thomas
next prev parent reply other threads:[~2015-12-17 13:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 12:00 [U-Boot] [PATCH v2 0/3] Moving Uartlite to DM Michal Simek
2015-12-17 12:00 ` [U-Boot] [PATCH v2 1/3] serial: uartlite: Move driver " Michal Simek
2015-12-17 13:37 ` Thomas Chou
2015-12-17 13:58 ` Michal Simek
2015-12-17 15:27 ` Simon Glass
2015-12-17 18:52 ` Michal Simek
2015-12-18 2:40 ` Simon Glass
2015-12-18 8:00 ` Michal Simek
2015-12-17 23:35 ` Thomas Chou
2015-12-18 7:52 ` Michal Simek
2015-12-18 8:12 ` Thomas Chou
2015-12-18 8:23 ` Michal Simek
2015-12-17 12:00 ` [U-Boot] [PATCH v2 2/3] serial: uartlite: Add support for debug console Michal Simek
2015-12-17 13:29 ` Thomas Chou [this message]
2015-12-17 13:51 ` Michal Simek
2015-12-17 12:00 ` [U-Boot] [PATCH v2 3/3] serial: uartlite: Add uartlite to Kconfig Michal Simek
2015-12-17 13:32 ` Thomas Chou
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=5672B8D4.3030505@wytron.com.tw \
--to=thomas@wytron.com.tw \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox