From: "Arnd Bergmann" <arnd@arndb.de>
To: "Peter Maydell" <peter.maydell@linaro.org>, linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Thomas Gleixner" <tglx@kernel.org>,
"Russell King" <linux@armlinux.org.uk>,
"Miaoqian Lin" <linmq006@gmail.com>
Subject: Re: [PATCH] serial: amba-pl011: Enable UART in earlycon setup
Date: Tue, 10 Feb 2026 14:22:40 +0100 [thread overview]
Message-ID: <316ebe17-5938-4e8b-9269-934c7c773c01@app.fastmail.com> (raw)
In-Reply-To: <20260210125100.223138-1-peter.maydell@linaro.org>
On Tue, Feb 10, 2026, at 13:50, Peter Maydell wrote:
> Currently the PL011 driver only enables the UART (by setting UARTEN
> in REG_CR) in pl011_startup(), so if it is used for earlycon it is
> relying on the bootrom/firmware having left the UART enabled.
>
> There's no particular reason not to actively enable the UART before
> using it for earlycon, and the earlycon handling for e.g. the 8250
> UART sets up the UART in its setup function, so follow that in the
> PL011.
>
> This allows use of earlycon with a UART that the firmware hasn't
> already been using for its own output, but the main motivation is
> that QEMU will otherwise log a message complaining that the guest is
> trying to write to a UART it never enabled.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> NB: I have tested this under QEMU, but I do not have any real
> PL011-using hardware to hand to test with.
Looks good to me,
Acked-by: Arnd Bergmann <arnd@arndb.de>
One more question: what is the symptom without this patch with
qemu? You mentioned on IRC that qemu may warn about attempting
to write to the uart when it is disabled. Would we still get
the correct early console output before the uart is enabled?
Arnd
next prev parent reply other threads:[~2026-02-10 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 12:50 [PATCH] serial: amba-pl011: Enable UART in earlycon setup Peter Maydell
2026-02-10 13:22 ` Arnd Bergmann [this message]
2026-02-10 13:49 ` Peter Maydell
2026-02-10 14:10 ` Arnd Bergmann
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=316ebe17-5938-4e8b-9269-934c7c773c01@app.fastmail.com \
--to=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=peter.maydell@linaro.org \
--cc=tglx@kernel.org \
/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