浏览代码

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>
Paul Burton 11 年之前
父节点
当前提交
d18d49d7ad
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      arch/mips/lib/bootm.c

+ 4 - 2
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)