Skip to contentSkip to conversation

ARM: versatile: pass console setting to the kernel

PATCH New Linus Walleij 3 participants 4 messages Nov 27, 2013 – Jan 13, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 ARM: versatile: pass console setting to the kernel

The Versatiles come up with the primary UART set to ttyAMA0 at 38400 baud, and unless we pass this to the kernel it will assume it is set to 9600 baud which will be quite awkward for the terminal, let's try to be helpful and inform the kernel what setting is used.

Cc Stefano Babic <[email protected]>
Cc Marek Vasut <[email protected]>
---
 include/configs/versatile.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/versatile.h +2 -1
index 10738ac24be0..29c32fee5178 100644
@@ -101,7 +101,8 @@
 
 #define CONFIG_BOOTDELAY	2
 #define CONFIG_BOOTARGS		"root=/dev/nfs mem=128M ip=dhcp "\
-				"netdev=25,0,0xf1010000,0xf1010010,eth0"
+				"netdev=25,0,0xf1010000,0xf1010010,eth0 "\
+				"console=ttyAMA0,38400n1"
 
 /*
  * Static configuration when assigning fixed address
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 2/2 ARM: versatile: pass console setting to the kernel

Dear Linus Walleij,

Quoted 18 lines

The Versatiles come up with the primary UART set to ttyAMA0 at 38400 baud, and unless we pass this to the kernel it will assume it is set to 9600 baud which will be quite awkward for the terminal, let's try to be helpful and inform the kernel what setting is used.

Cc Stefano Babic <[email protected]>
Cc Marek Vasut <[email protected]>
---
 include/configs/versatile.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/versatile.h +0 -0
index 10738ac24be0..29c32fee5178 100644

include/configs/versatile.h line 105

Quoted 6 lines
include/configs/versatile.h +2 -1
@@ -101,7 +101,8 @@
 
 #define CONFIG_BOOTDELAY	2
 #define CONFIG_BOOTARGS		"root=/dev/nfs mem=128M ip=dhcp "\
-				"netdev=25,0,0xf1010000,0xf1010010,eth0"
+				"netdev=25,0,0xf1010000,0xf1010010,eth0 "\
+				"console=ttyAMA0,38400n1"

We're currently trying to migrate away from having the environment built into the bootloader altogether. On the other hand, I understand this is a bona-fide fix. I would let this one slide.

Best regards,
Marek Vasut

#2 lore raw

PATCH 2/2 ARM: versatile: pass console setting to the kernel

Quoted 10 lines · Marek Vasut

[Me]

include/configs/versatile.h line 105

Quoted 5 lines

#define CONFIG_BOOTDELAY 2
#define CONFIG_BOOTARGS "root=/dev/nfs mem=128M ip=dhcp "\

include/configs/versatile.h +2 -1
-                             "netdev=25,0,0xf1010000,0xf1010010,eth0"
+                             "netdev=25,0,0xf1010000,0xf1010010,eth0 "\
+                             "console=ttyAMA0,38400n1"

We're currently trying to migrate away from having the environment built into the bootloader altogether. On the other hand, I understand this is a bona-fide fix. I would let this one slide.

I think the only reason why this has not been fixed before is that people have only tested the Versatile with QEMU, and that "emulation" will likely (my best guess) just display characters on the virtual terminal even if the baudrate it completely bananas, so noone really noticed the situation before.

This has the upside of making the default versatile out-of-the-box U-Boot work also on real hardware ...

Yours,
Linus Walleij

#3 lore raw

PATCH 2/2 ARM: versatile: pass console setting to the kernel

In reply to Linus Walleij

Hi Linus,

Quoted 18 lines · Linus Walleij

The Versatiles come up with the primary UART set to ttyAMA0 at 38400 baud, and unless we pass this to the kernel it will assume it is set to 9600 baud which will be quite awkward for the terminal, let's try to be helpful and inform the kernel what setting is used.

Cc Stefano Babic <[email protected]>
Cc Marek Vasut <[email protected]>
---
 include/configs/versatile.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/versatile.h +0 -0
index 10738ac24be0..29c32fee5178 100644

include/configs/versatile.h line 108

Quoted 9 lines
include/configs/versatile.h +2 -1
@@ -101,7 +101,8 @@
 
 #define CONFIG_BOOTDELAY	2
 #define CONFIG_BOOTARGS		"root=/dev/nfs mem=128M ip=dhcp "\
-				"netdev=25,0,0xf1010000,0xf1010010,eth0"
+				"netdev=25,0,0xf1010000,0xf1010010,eth0 "\
+				"console=ttyAMA0,38400n1"
 
 /*
  * Static configuration when assigning fixed address

Applied to u-boot-arm/next, thanks!

Amicalement,

Signature · 1 line
Albert.