<div dir="ltr"><div class="gmail_default" style="font-size:small">ping.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 1, 2021 at 9:47 PM Niteesh G. S. <<a href="mailto:niteesh.gs@gmail.com">niteesh.gs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">On Sat, May 1, 2021 at 8:31 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 1, 2021, 8:53 AM Niteesh G. S. <<a href="mailto:niteesh.gs@gmail.com" target="_blank">niteesh.gs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:small">Just to provide more context,</div><div style="font-size:small">When the CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER option is used</div><div style="font-size:small">and no --console option is provided, the console driver defaults to PL011.</div><div style="font-size:small">In raspberry pi 3 and other models whose primary UART is not PL011, we get no output.</div><div style="font-size:small">This patch fixes that by linking the primary UART to the console device.</div><div style="font-size:small"><br></div><div style="font-size:small">Thanks,</div><div style="font-size:small">Niteesh</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 1, 2021 at 7:05 PM G S Niteesh Babu <<a href="mailto:niteesh.gs@gmail.com" rel="noreferrer" target="_blank">niteesh.gs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When no console argument is given, the driver defaults to pl011<br>
this results in no output in case of Rpi3 whose primary uart is<br>
miniuart.<br>
This patch fixes that by defaulting to the primary uart when no<br>
console option is provided.<br></blockquote></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Does the default need to vary by model?</div></div></blockquote><div><span class="gmail_default" style="font-size:small">Yes, the primary UART is different across models.</span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small">Rpi's have two UARTs PL011 and miniuart, on models which have Bluetooth</span></div><div><span class="gmail_default" style="font-size:small">the PL011 is used to talk to the Bluetooth and miniuart acts as the primary UART.</span></div><div><span class="gmail_default" style="font-size:small">Now we can change this by adding miniuart-bt to config.txt but the miniuart is</span></div><div><div class="gmail_default" style="font-size:small">based on the VPU core and requires to add another option which sets the core to</div><div class="gmail_default" style="font-size:small">a fixed freq.</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
bsps/arm/raspberrypi/console/console-config.c | 12 +++++++++---<br>
1 file changed, 9 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/bsps/arm/raspberrypi/console/console-config.c b/bsps/arm/raspberrypi/console/console-config.c<br>
index 6b8eb80aa4..bd3a8d34c2 100644<br>
--- a/bsps/arm/raspberrypi/console/console-config.c<br>
+++ b/bsps/arm/raspberrypi/console/console-config.c<br>
@@ -165,10 +165,16 @@ static void console_select( void )<br>
}<br>
}else {<br>
/**<br>
- * If no command line option was given, default to PL011.<br>
+ * If no console option was given we default to the primary uarts.<br>
+ * The initialization of the uart's and BSP_output_char is already done<br>
+ * in the uart_probe function called before this. So now we can safely<br>
+ * compare BSP_output_char.<br>
*/<br>
- BSP_output_char = output_char_pl011;<br>
- link(PL011, CONSOLE_DEVICE_NAME);<br>
+ if (BSP_output_char == output_char_pl011) {<br>
+ link(PL011, CONSOLE_DEVICE_NAME);<br>
+ }else {<br>
+ link(MINIUART, CONSOLE_DEVICE_NAME);<br>
+ }<br>
}<br>
}<br>
<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" rel="noreferrer" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div></div>
</blockquote></div></div>
</blockquote></div>