devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Redfearn <matt.redfearn@mips.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, Matt Redfearn <matt.redfearn@mips.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Paul Burton <paul.burton@imgtec.com>
Subject: [PATCH] MIPS: Boston: Fix earlycon baud rate selection
Date: Tue, 17 Oct 2017 14:27:59 +0100	[thread overview]
Message-ID: <1508246879-20580-1-git-send-email-matt.redfearn@mips.com> (raw)

During set up of the early console, the earlycon driver will attempt to
configure a baud rate, if one is set in the earlycon structure.
Previously, of_setup_earlycon left this field as 0, ignoring any baud
rate selected by the DT. Commit 31cb9a8575ca ("earlycon: initialise baud
field of earlycon device structure") changed this behaviour such that
any selected baud rate is now set. The earlycon driver must deduce the
divisor from the configured uartclk, which of_setup_earlycon sets to
BASE_BAUD. MIPS generic kernels do not set BASE_BAUD (there is no
practical way to set this generically for all supported platforms), so
when the early console is configured an incorrect divisor is calculated
for the selected baud rate, and garbage is printed to the console during
boot.

Fix this by removing the configured baud rate from the device tree.
This causes the early console to inherit the baud rate settings from the
bootloader. By the time the real console is probed, the clock drivers
necessary to calculate the divisor are enabled and the kernel can
correctly configure the baud rate.

Fixes: 31cb9a8575ca ("earlycon: initialise baud field of earlycon device structure")
Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>

---

 arch/mips/boot/dts/img/boston.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/boot/dts/img/boston.dts b/arch/mips/boot/dts/img/boston.dts
index 53bfa29a7093..179691aae7d7 100644
--- a/arch/mips/boot/dts/img/boston.dts
+++ b/arch/mips/boot/dts/img/boston.dts
@@ -11,7 +11,7 @@
 	compatible = "img,boston";
 
 	chosen {
-		stdout-path = "uart0:115200";
+		stdout-path = "uart0";
 	};
 
 	aliases {
-- 
2.7.4

             reply	other threads:[~2017-10-17 13:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 13:27 Matt Redfearn [this message]
2017-10-25 22:09 ` [PATCH] MIPS: Boston: Fix earlycon baud rate selection Paul Burton
     [not found]   ` <0F3A6103614E5547AAE5309112E22E9102C5C4FA-8mq1oxvLakYkd5NFdqqD1Emw1/PebVxz@public.gmane.org>
2017-10-26 12:07     ` Matt Redfearn

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=1508246879-20580-1-git-send-email-matt.redfearn@mips.com \
    --to=matt.redfearn@mips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mark.rutland@arm.com \
    --cc=paul.burton@imgtec.com \
    --cc=ralf@linux-mips.org \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).