diff mbox

[U-Boot,1/4] mips: don't hardcode Malta env baudrate

Message ID 1385487928-31082-2-git-send-email-paul.burton@imgtec.com
State Accepted
Delegated to: Daniel Schwierzeck
Headers show

Commit Message

Paul Burton Nov. 26, 2013, 5:45 p.m. UTC
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>
---
 arch/mips/lib/bootm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 1febf29..71bb0d2 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)