From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>
Cc: linux-mips@vger.kernel.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] serial: sb1250-duart: Fix bootconsole handover lockup
Date: Mon, 10 Aug 2026 05:14:12 +0200 [thread overview]
Message-ID: <f1067d27-6b39-433f-b1e2-ad753e54153d@oss.qualcomm.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2608060359330.55540@angie.orcam.me.uk>
On 6/8/26 12:54, Maciej W. Rozycki wrote:
> Calling sbd_init_port() in the course of setting up the serial device
> causes line parameters to be messed up and the transmitter disabled.
> We've been lucky in that no message is usually produced to the kernel
> log between this call and the later call to uart_set_options() in the
> course of console setup done by sbd_serial_console_init(), or the system
> would hang as the console output handler in CFE tried to access a port
> whose transmitter has been disabled and line parameters messed up.
>
> It'll change with the next change to the driver, so fix sbd_init_port()
> such that line parameters are set for 115200n8 console operation as with
> the CFE firmware and the transmitter re-enabled after reset.
>
> Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM")
> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
> Cc: stable@vger.kernel.org # v6.5+
> ---
> No change from v2 (2/3),
> <https://lore.kernel.org/r/alpine.DEB.2.21.2605241623110.1450@angie.orcam.me.uk/>.
>
> Changes from v1 (2/4),
> <https://lore.kernel.org/r/alpine.DEB.2.21.2604130338210.29980@angie.orcam.me.uk/>:
>
> - Sanitise the change heading.
> ---
> drivers/tty/serial/sb1250-duart.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> linux-serial-sb1250-duart-prom-console.diff
> Index: linux-macro/drivers/tty/serial/sb1250-duart.c
> ===================================================================
> --- linux-macro.orig/drivers/tty/serial/sb1250-duart.c
> +++ linux-macro/drivers/tty/serial/sb1250-duart.c
> @@ -542,14 +542,19 @@ static void sbd_init_port(struct sbd_por
> /* There is no DUART reset feature, so just set some sane defaults. */
> write_sbdchn(sport, R_DUART_CMD, V_DUART_MISC_CMD_RESET_TX);
> write_sbdchn(sport, R_DUART_CMD, V_DUART_MISC_CMD_RESET_RX);
> - write_sbdchn(sport, R_DUART_MODE_REG_1, V_DUART_BITS_PER_CHAR_8);
> + write_sbdchn(sport, R_DUART_MODE_REG_1,
> + V_DUART_PARITY_MODE_NONE | V_DUART_BITS_PER_CHAR_8);
> write_sbdchn(sport, R_DUART_MODE_REG_2, 0);
> + write_sbdchn(sport, R_DUART_CLK_SEL, V_DUART_BAUD_RATE(115200));
> write_sbdchn(sport, R_DUART_FULL_CTL,
> V_DUART_INT_TIME(0) | V_DUART_SIG_FULL(15));
> write_sbdchn(sport, R_DUART_OPCR_X, 0);
> write_sbdchn(sport, R_DUART_AUXCTL_X, 0);
> write_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2), 0);
>
> + /* Re-enable transmission for the initial PROM-based console. */
> + write_sbdchn(sport, R_DUART_CMD, M_DUART_TX_EN);
> +
> sport->initialised = 1;
> }
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
next prev parent reply other threads:[~2026-08-10 3:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 10:54 [PATCH v3 0/3] MIPS: SiByte: Fix serial device regressions Maciej W. Rozycki
2026-08-06 10:54 ` [PATCH v3 1/3] serial: sb1250-duart: Fix console message clobbering at channel resets Maciej W. Rozycki
2026-11-03 22:06 ` Florian Fainelli
2026-08-06 10:54 ` [PATCH v3 2/3] serial: sb1250-duart: Fix bootconsole handover lockup Maciej W. Rozycki
2026-08-10 3:14 ` Philippe Mathieu-Daudé [this message]
2026-11-03 22:06 ` Florian Fainelli
2026-08-06 10:54 ` [PATCH v3 3/3] serial: sb1250-duart: Convert to use a platform device Maciej W. Rozycki
2026-11-03 21:42 ` Florian Fainelli
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=f1067d27-6b39-433f-b1e2-ad753e54153d@oss.qualcomm.com \
--to=philmd@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=tsbogend@alpha.franken.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
all inboxes | Powered by JetHome®