From: Paul Burton <paul.burton@imgtec.com>
Date: Tue, 26 Nov 2013 17:45:25 +0000 (+0000)
Subject: mips: don't hardcode Malta env baudrate
X-Git-Tag: v2025.01-rc5-pxa1908~15578^2~3
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=d18d49d7ad77f1a97b9697b3761802de5b82983d;p=u-boot.git

mips: don't hardcode Malta env baudrate

The baudrate passed to Linux in the environment was hardcoded at 38400.
Instead pass the correct baudrate from global data, allowing Linux to
correctly inherit the baudrate used by U-boot when console setup is not
explicitly specified.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
---

diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 1febf29865..71bb0d2a19 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -196,8 +196,10 @@ static void boot_prep_linux(bootm_headers_t *images)
 	if (cp)
 		linux_env_set("eth1addr", cp);
 
-	if (mips_boot_malta)
-		linux_env_set("modetty0", "38400n8r");
+	if (mips_boot_malta) {
+		sprintf(env_buf, "%un8r", gd->baudrate);
+		linux_env_set("modetty0", env_buf);
+	}
 }
 
 static void boot_jump_linux(bootm_headers_t *images)