From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1 3/3] x86: acpi: Let OS know that console already had been initialized
Date: Thu, 27 Feb 2020 17:21:56 +0200 [thread overview]
Message-ID: <20200227152156.87385-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20200227152156.87385-1-andriy.shevchenko@linux.intel.com>
SPCR has no clue if the UART base clock speed is different to
the default one. However, the SPCR 1.04 defines baud rate 0 as
a preconfigured state of UART and OS is supposed not to touch
the configuration of the serial device.
Linux kernel supports that starting from v5.0, see commit
b413b1abeb21 ("ACPI: SPCR: Consider baud rate 0 as preconfigured state")
for the details.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/x86/lib/acpi_table.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 66e32f21bd..074987e294 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -471,6 +471,15 @@ static void acpi_create_spcr(struct acpi_spcr *spcr)
spcr->pci_device_id = 0xffff;
spcr->pci_vendor_id = 0xffff;
+ /*
+ * SPCR has no clue if the UART base clock speed is different
+ * to the default one. However, the SPCR 1.04 defines baud rate
+ * 0 as a preconfigured state of UART and OS is supposed not
+ * to touch the configuration of the serial device.
+ */
+ if (serial_info.clock != SERIAL_DEFAULT_CLOCK)
+ spcr->baud_rate = 0;
+
/* Fix checksum */
header->checksum = table_compute_checksum((void *)spcr, header->length);
}
--
2.25.0
next prev parent reply other threads:[~2020-02-27 15:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 15:21 [PATCH v1 1/3] dm: serial: Add clock member to struct serial_device_info Andy Shevchenko
2020-02-27 15:21 ` [PATCH v1 2/3] serial: ns16550: Provide UART base clock speed in ->getinfo() Andy Shevchenko
2020-02-27 23:40 ` Simon Glass
2020-04-15 14:19 ` Bin Meng
2020-04-15 14:27 ` Bin Meng
2020-02-27 15:21 ` Andy Shevchenko [this message]
2020-04-15 14:20 ` [PATCH v1 3/3] x86: acpi: Let OS know that console already had been initialized Bin Meng
2020-04-15 14:27 ` Bin Meng
2020-02-27 23:40 ` [PATCH v1 1/3] dm: serial: Add clock member to struct serial_device_info Simon Glass
2020-04-15 14:19 ` Bin Meng
2020-04-15 14:27 ` Bin Meng
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=20200227152156.87385-3-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=u-boot@lists.denx.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