All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RESEND PATCH v2 0/2] This series adds an ability to use pl01x for early debug output.
@ 2015-10-14 16:54 Sergey Temerkhanov
  2015-10-14 16:54 ` [U-Boot] [RESEND PATCH v2 1/2] arm: serial: Add debug UART capability to the pl01x driver Sergey Temerkhanov
  2015-10-14 16:54 ` [U-Boot] [RESEND PATCH v2 2/2] arm: serial: Add Kconfig entries to facilitate usage of the pl01x driver for early debug output Sergey Temerkhanov
  0 siblings, 2 replies; 5+ messages in thread
From: Sergey Temerkhanov @ 2015-10-14 16:54 UTC (permalink / raw)
  To: u-boot

This is the version 2 of the patch I posted at

http://lists.denx.de/pipermail/u-boot/2015-September/227210.html


Changes in v2:
- Broke down into 2 patches
- Minor changes to accomodate Kconfig options
- Broke down into 2 patches
- Made CONFIG_DEBUG_UART_PL010 and CONFIG_DEBUG_UART_PL011
  separate options
- Typo fixes

Sergey Temerkhanov (2):
  arm: serial: Add debug UART capability to the pl01x driver
  arm: serial: Add Kconfig entries to facilitate usage of the pl01x     
    driver for early debug output

 drivers/serial/Kconfig        | 22 ++++++++++++++++++++++
 drivers/serial/serial_pl01x.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [RESEND PATCH v2 1/2] arm: serial: Add debug UART capability to the pl01x driver
  2015-10-14 16:54 [U-Boot] [RESEND PATCH v2 0/2] This series adds an ability to use pl01x for early debug output Sergey Temerkhanov
@ 2015-10-14 16:54 ` Sergey Temerkhanov
  2016-01-19 22:33   ` [U-Boot] [U-Boot, RESEND, v2, " Tom Rini
  2015-10-14 16:54 ` [U-Boot] [RESEND PATCH v2 2/2] arm: serial: Add Kconfig entries to facilitate usage of the pl01x driver for early debug output Sergey Temerkhanov
  1 sibling, 1 reply; 5+ messages in thread
From: Sergey Temerkhanov @ 2015-10-14 16:54 UTC (permalink / raw)
  To: u-boot

This patch adds an ability to use pl01x as a debug UART. It must
be configured like other types of debug UARTs

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>

Acked-by: Simon Glass <sjg@chromium.org>

---

Changes in v2:
- Broke down into 2 patches
- Minor changes to accomodate Kconfig options

 drivers/serial/serial_pl01x.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 3a5c1d0..18c02ab 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -367,3 +367,31 @@ U_BOOT_DRIVER(serial_pl01x) = {
 };
 
 #endif
+
+#if defined(CONFIG_DEBUG_UART_PL010) || defined(CONFIG_DEBUG_UART_PL011)
+
+#include <debug_uart.h>
+
+void debug_uart_init(void)
+{
+#ifndef CONFIG_DEBUG_UART_SKIP_INIT
+	struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_DEBUG_UART_BASE;
+	enum pl01x_type type = CONFIG_IS_ENABLED(DEBUG_UART_PL011) ?
+				TYPE_PL011 : TYPE_PL010;
+
+	pl01x_generic_serial_init(regs, type);
+	pl01x_generic_setbrg(regs, type,
+			     CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
+#endif
+}
+
+static inline void _debug_uart_putc(int ch)
+{
+	struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_DEBUG_UART_BASE;
+
+	pl01x_putc(regs, ch);
+}
+
+DEBUG_UART_FUNCS
+
+#endif
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [RESEND PATCH v2 2/2] arm: serial: Add Kconfig entries to facilitate usage of the pl01x driver for early debug output
  2015-10-14 16:54 [U-Boot] [RESEND PATCH v2 0/2] This series adds an ability to use pl01x for early debug output Sergey Temerkhanov
  2015-10-14 16:54 ` [U-Boot] [RESEND PATCH v2 1/2] arm: serial: Add debug UART capability to the pl01x driver Sergey Temerkhanov
@ 2015-10-14 16:54 ` Sergey Temerkhanov
  2016-01-19 22:33   ` [U-Boot] [U-Boot, RESEND, v2, " Tom Rini
  1 sibling, 1 reply; 5+ messages in thread
From: Sergey Temerkhanov @ 2015-10-14 16:54 UTC (permalink / raw)
  To: u-boot

This patch adds Kconfig entries to facilitate usage of pl01x as
a debug UART.

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>

Acked-by: Simon Glass <sjg@chromium.org>

---

Changes in v2:
- Broke down into 2 patches
- Made CONFIG_DEBUG_UART_PL010 and CONFIG_DEBUG_UART_PL011
  separate options
- Typo fixes

 drivers/serial/Kconfig | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index ddb725d..cde565f 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -77,6 +77,22 @@ 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_PL010
+	bool "pl010"
+	help
+	  Select this to enable a debug UART using the pl01x driver with the
+	  PL010 UART type. 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_PL011
+	bool "pl011"
+	help
+	  Select this to enable a debug UART using the pl01x driver with the
+	  PL011 UART type. You will need to provide parameters to make this
+	  work. The driver will be available until the real driver model
+	  serial is running.
+
 endchoice
 
 config DEBUG_UART_BASE
@@ -109,6 +125,12 @@ config DEBUG_UART_SHIFT
 	  value. Use this value to specify the shift to use, where 0=byte
 	  registers, 2=32-bit word registers, etc.
 
+config DEBUG_UART_SKIP_INIT
+	bool "Skip UART initialization"
+	help
+	  Select this if the UART you want to use for debug output is already
+	  initialized by the time U-Boot starts its execution.
+
 config ROCKCHIP_SERIAL
 	bool "Rockchip on-chip UART support"
 	depends on ARCH_ROCKCHIP && DM_SERIAL
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [U-Boot, RESEND, v2, 1/2] arm: serial: Add debug UART capability to the pl01x driver
  2015-10-14 16:54 ` [U-Boot] [RESEND PATCH v2 1/2] arm: serial: Add debug UART capability to the pl01x driver Sergey Temerkhanov
@ 2016-01-19 22:33   ` Tom Rini
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2016-01-19 22:33 UTC (permalink / raw)
  To: u-boot

On Wed, Oct 14, 2015 at 09:54:23AM -0700, Sergey Temerkhanov wrote:

> This patch adds an ability to use pl01x as a debug UART. It must
> be configured like other types of debug UARTs
> 
> Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
> Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
> 
> Acked-by: Simon Glass <sjg@chromium.org>

With a minor rework for current API, applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160119/d9f4ed3b/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [U-Boot, RESEND, v2, 2/2] arm: serial: Add Kconfig entries to facilitate usage of the pl01x driver for early debug output
  2015-10-14 16:54 ` [U-Boot] [RESEND PATCH v2 2/2] arm: serial: Add Kconfig entries to facilitate usage of the pl01x driver for early debug output Sergey Temerkhanov
@ 2016-01-19 22:33   ` Tom Rini
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2016-01-19 22:33 UTC (permalink / raw)
  To: u-boot

On Wed, Oct 14, 2015 at 09:54:24AM -0700, Sergey Temerkhanov wrote:

> This patch adds Kconfig entries to facilitate usage of pl01x as
> a debug UART.
> 
> Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
> Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
> 
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160119/edafb19c/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-19 22:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14 16:54 [U-Boot] [RESEND PATCH v2 0/2] This series adds an ability to use pl01x for early debug output Sergey Temerkhanov
2015-10-14 16:54 ` [U-Boot] [RESEND PATCH v2 1/2] arm: serial: Add debug UART capability to the pl01x driver Sergey Temerkhanov
2016-01-19 22:33   ` [U-Boot] [U-Boot, RESEND, v2, " Tom Rini
2015-10-14 16:54 ` [U-Boot] [RESEND PATCH v2 2/2] arm: serial: Add Kconfig entries to facilitate usage of the pl01x driver for early debug output Sergey Temerkhanov
2016-01-19 22:33   ` [U-Boot] [U-Boot, RESEND, v2, " Tom Rini

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.