Skip to contentSkip to conversation

arm64: dts: specify console via command line

PATCH RESEND In review Chunyan Zhang 2 participants 3 messages Mar 11, 2020 – Mar 12, 2020

Subsystems (2)
lore
Share & tools
lore

Chunyan Zhang

author reviewer
#0 lore raw

PATCH RESEND 1/1 arm64: dts: specify console via command line

From: Chunyan Zhang <[email protected]>

The SPRD serial driver need to know which serial port would be used as console in an early period during initialization, otherwise console init would fail since we added this feature[1].

So this patch add console to command line via devicetree.

[1] https://lore.kernel.org/lkml/[email protected]/

---
I guess no comments on this, so resending this and add [email protected], hope Arnd or Olof can help to merge into arch_arm tree.

Thanks,
Chunyan

---
 arch/arm64/boot/dts/sprd/sp9863a-1h10.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/sprd/sp9863a-1h10.dts +1 -1
index 2047f7a74265..510f65f4d8b8 100644
@@ -28,7 +28,7 @@
 
 	chosen {
 		stdout-path = "serial1:115200n8";
-		bootargs = "earlycon";
+		bootargs = "earlycon console=ttyS1";
 	};
 };
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 7 lines · Chunyan Zhang
arch/arm64/boot/dts/sprd/sp9863a-1h10.dts +0 -0
index 2047f7a74265..510f65f4d8b8 100644

arch/arm64/boot/dts/sprd/sp9863a-1h10.dts line 33

Quoted 7 lines
arch/arm64/boot/dts/sprd/sp9863a-1h10.dts +1 -1
@@ -28,7 +28,7 @@
 
        chosen {
                stdout-path = "serial1:115200n8";
-               bootargs = "earlycon";
+               bootargs = "earlycon console=ttyS1";
        };
 };

Hi Chunyan,

I would expect that you need to either specify the stdout-path, or the console= kernel parameter, but not both.

If earlycon was used, shouldn't the driver know which port is the console?

Arnd

author reviewer
#2 lore raw

Hi Arnd,

Quoted 19 lines · Arnd Bergmann
Quoted 7 lines · Chunyan Zhang
arch/arm64/boot/dts/sprd/sp9863a-1h10.dts +0 -0
index 2047f7a74265..510f65f4d8b8 100644

arch/arm64/boot/dts/sprd/sp9863a-1h10.dts line 33

Quoted 7 lines
arch/arm64/boot/dts/sprd/sp9863a-1h10.dts +1 -1
@@ -28,7 +28,7 @@
 
        chosen {
                stdout-path = "serial1:115200n8";
-               bootargs = "earlycon";
+               bootargs = "earlycon console=ttyS1";
        };
 };

Hi Chunyan,

Quoted 3 lines

I would expect that you need to either specify the stdout-path, or the console= kernel parameter, but not both.

Ok, now I know how to fix the problem without adding 'console=' :) of_console_check() [1] can tell if a given port is the console by reading 'stdout-path'.
I will address this issue in serial driver.

Thanks for your reminder,
Chunyan

[1] https://elixir.bootlin.com/linux/v5.6-rc5/source/drivers/of/base.c#L2135

Quoted 3 lines

If earlycon was used, shouldn't the driver know which port is the console?

Arnd