<p>Michał Żygowski has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/c/coreboot/+/29791">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mb/pcengines/apu1/romstage.c: Add possibility to redirect output to COM2<br><br>Enable COM2 port on SuperIO if UART index is 1. This change allows<br>to use full RS232 COM1 port for different purposes when COM2 is selected<br>as main port.<br><br>Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com><br>Change-Id: I1e72c5a43a302658f86dafd863e5a67580eae3e4<br>---<br>M src/mainboard/pcengines/apu1/romstage.c<br>1 file changed, 16 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/29791/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/mainboard/pcengines/apu1/romstage.c b/src/mainboard/pcengines/apu1/romstage.c</span><br><span>index ab48943..fb56e8e 100644</span><br><span>--- a/src/mainboard/pcengines/apu1/romstage.c</span><br><span>+++ b/src/mainboard/pcengines/apu1/romstage.c</span><br><span>@@ -21,9 +21,11 @@</span><br><span> #include <superio/nuvoton/nct5104d/nct5104d.h></span><br><span> #include "gpio_ftns.h"</span><br><span> #include <SB800.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <build.h></span><br><span> </span><br><span> #define SIO_PORT 0x2e</span><br><span style="color: hsl(0, 100%, 40%);">-#define SERIAL_DEV PNP_DEV(SIO_PORT, NCT5104D_SP1)</span><br><span style="color: hsl(120, 100%, 40%);">+#define SERIAL1_DEV PNP_DEV(SIO_PORT, NCT5104D_SP1)</span><br><span style="color: hsl(120, 100%, 40%);">+#define SERIAL2_DEV PNP_DEV(SIO_PORT, NCT5104D_SP2)</span><br><span> </span><br><span> static void early_lpc_init(void)</span><br><span> {</span><br><span>@@ -60,6 +62,18 @@</span><br><span> </span><br><span> void board_BeforeAgesa(struct sysinfo *cb)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+        pci_devfn_t dev;</span><br><span style="color: hsl(120, 100%, 40%);">+      u32 data;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  early_lpc_init();</span><br><span style="color: hsl(0, 100%, 40%);">-       nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       dev = PCI_DEV(0, 0x14, 3);</span><br><span style="color: hsl(120, 100%, 40%);">+    data = pci_read_config32(dev, 0x48);</span><br><span style="color: hsl(120, 100%, 40%);">+  /* enable 0x2e/0x4e IO decoding before configuring SuperIO */</span><br><span style="color: hsl(120, 100%, 40%);">+ pci_write_config32(dev, 0x48, data | 3);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    if (CONFIG_UART_FOR_CONSOLE == 1)</span><br><span style="color: hsl(120, 100%, 40%);">+             nuvoton_enable_serial(SERIAL2_DEV, CONFIG_TTYS0_BASE);</span><br><span style="color: hsl(120, 100%, 40%);">+        else if (CONFIG_UART_FOR_CONSOLE == 0)</span><br><span style="color: hsl(120, 100%, 40%);">+                nuvoton_enable_serial(SERIAL1_DEV, CONFIG_TTYS0_BASE);</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/29791">change 29791</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/c/coreboot/+/29791"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1e72c5a43a302658f86dafd863e5a67580eae3e4 </div>
<div style="display:none"> Gerrit-Change-Number: 29791 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Michał Żygowski <michal.zygowski@3mdeb.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>