All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ns16550: tegra: Specify debugging serial port at boot.
@ 2012-01-06 22:51 Stephen Warren
  2012-01-10  1:26 ` Doug Anderson
  2012-03-08 18:08 ` [U-Boot] " Stephen Warren
  0 siblings, 2 replies; 10+ messages in thread
From: Stephen Warren @ 2012-01-06 22:51 UTC (permalink / raw)
  To: u-boot

From: Doug Anderson <dianders@chromium.org>

This works together with a kernel change that looks at the scratchpad
register to determine which of the many UARTs it should use for early
printing:

http://www.spinics.net/lists/arm-kernel/msg154633.html

While it is unfortunate to need to pass this information in a second way
(it's already in the device tree), this does allow the very early boot
code (decompressing stub and early assembly code) to print to the right
port.

At the moment, I'm adding this to the UART init function. Alternatively,
we could add a more complex patch to key off of the 'console' setting.

Signed-off-by: Doug Anderson <dianders@chromium.org>
[swarren: Limited the change to Tegra platforms]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 drivers/serial/ns16550.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 0c23955..19a28cd 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -62,6 +62,13 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
 	serial_out(0, &com_port->mdr1);
 #endif
 #endif /* CONFIG_OMAP */
+#if defined(CONFIG_TEGRA2)
+	/*
+	 * Put a 'D' in the scratchpad to let the kernel know which UART
+	 * for earlyprintk [D]ebugging.
+	 */
+	serial_out('D', &com_port->spr);
+#endif
 }
 
 #ifndef CONFIG_NS16550_MIN_FUNCTIONS
-- 
1.7.0.4

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

end of thread, other threads:[~2012-03-13 21:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-06 22:51 [U-Boot] [PATCH] ns16550: tegra: Specify debugging serial port at boot Stephen Warren
2012-01-10  1:26 ` Doug Anderson
2012-03-08 18:08 ` [U-Boot] " Stephen Warren
2012-03-08 18:39   ` Wolfgang Denk
2012-03-08 19:40     ` Stephen Warren
2012-03-08 21:29       ` Wolfgang Denk
2012-03-08 21:43         ` Stephen Warren
2012-03-08 23:26           ` Graeme Russ
2012-03-13 20:12     ` Stephen Warren
2012-03-13 21:23       ` Graeme Russ

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.