mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 7/7] console: don't fixup baud rate into earlycon string
Date: Mon, 22 May 2023 07:22:22 +0200	[thread overview]
Message-ID: <20230522052222.1037931-7-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230522052222.1037931-1-a.fatoum@pengutronix.de>

By design, earlycon depends on boot firmware to setup the console for
Linux to use early before proper driver probe. When we specify the
baudrate though, the earlycon implementation may configure UART-internal
dividers to try to achieve the specified baudrate. The bus clock being
divided is defined statically Linux-architecture-wide using the BASE_BAUD
symbol, which is not suitable across different baudrates and SoCs.

Side step this issue by skipping fix up of the baudrate, so Linux just
uses what was preconfigured. This fixed global.bootm.earlycon=1 for
the ROCK-3A with 1.5 MBaud.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/console.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/console.c b/common/console.c
index c09c8e7d44c2..768550eb7df9 100644
--- a/common/console.c
+++ b/common/console.c
@@ -227,8 +227,8 @@ static void console_add_earlycon_param(struct console_device *cdev, unsigned bau
 	if (!cdev->linux_earlycon_name)
 		return;
 
-	str = basprintf("earlycon=%s,0x%lx,%dn8", cdev->linux_earlycon_name,
-			(ulong)cdev->phys_base, baudrate);
+	str = basprintf("earlycon=%s,0x%lx", cdev->linux_earlycon_name,
+			(ulong)cdev->phys_base);
 
 	dev_add_param_fixed(&cdev->class_dev, "linux.bootargs.earlycon", str);
 
-- 
2.39.2




  parent reply	other threads:[~2023-05-22  5:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22  5:22 [PATCH master 1/7] test: self: ramfs: fix unintended macro identifier confusion Ahmad Fatoum
2023-05-22  5:22 ` [PATCH master 2/7] include: zero_page: hide possibly NULL pointer variable from optimizer Ahmad Fatoum
2023-05-23  6:46   ` Ahmad Fatoum
2023-05-22  5:22 ` [PATCH master 3/7] ARM: configs: temporarily revive vexpress_defconfig Ahmad Fatoum
2023-05-22  8:23   ` Sascha Hauer
2023-05-22  8:36     ` Ahmad Fatoum
2023-05-22  5:22 ` [PATCH master 4/7] ARM64: configs: temporarily revive qemu_virt64_defconfig Ahmad Fatoum
2023-05-22  5:22 ` [PATCH master 5/7] pbl: have DEBUG_PBL depend only on PBL_CONSOLE Ahmad Fatoum
2023-05-22  5:22 ` [PATCH master 6/7] meminfo: avoid out-of-bounds compiler warning Ahmad Fatoum
2023-05-22  5:22 ` Ahmad Fatoum [this message]
2023-05-23  7:23 ` [PATCH master 1/7] test: self: ramfs: fix unintended macro identifier confusion Sascha Hauer

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=20230522052222.1037931-7-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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