]> git.sur5r.net Git - u-boot/commitdiff
mips: don't hardcode Malta env baudrate
authorPaul Burton <paul.burton@imgtec.com>
Tue, 26 Nov 2013 17:45:25 +0000 (17:45 +0000)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tue, 26 Nov 2013 20:49:17 +0000 (21:49 +0100)
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

index 1febf2986530744335caea094815032e3915e3f4..71bb0d2a199b28512828640352ec547b67cf6ff9 100644 (file)
@@ -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)