Skip to contentSkip to conversation

ARC: unbork nsimosci serial console

PATCH In review Vineet Gupta 1 participant 5 messages Apr 5, 2014 – Apr 8, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARC: unbork nsimosci serial console

Hi,

This is basically stable team fodder. I'll be sending these patches to Linus as part of ARC 3.15 merge window changes early next week.

Thx,
-Vineet

Mischa Jonker (1):
ARC: [nsimosci] Change .dts to use generic 8250 UART

Vineet Gupta (1):
ARC: [nsimosci] Unbork console

 arch/arc/boot/dts/nsimosci.dts      | 12 +++++++-----
 arch/arc/configs/nsimosci_defconfig |  1 +
 2 files changed, 8 insertions(+), 5 deletions(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH RESEND 1/2 ARC: [nsimosci] Change .dts to use generic 8250 UART

From: Mischa Jonker <[email protected]>

The Synopsys APB DW UART has a couple of special features that are not in the System C model. In 3.8, the 8250_dw driver didn't really use these features, but from 3.9 onwards, the 8250_dw driver has become incompatible with our model.

Cc <[email protected]> #3.10, 3.12, 3.13, 3.14
Cc Francois Bedard <[email protected]>
---
 arch/arc/boot/dts/nsimosci.dts | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
arch/arc/boot/dts/nsimosci.dts +3 -4
index ea16d782af58..8bd238c34c7d 100644
@@ -11,7 +11,7 @@
 
 / {
 	compatible = "snps,nsimosci";
-	clock-frequency = <80000000>;	/* 80 MHZ */
+	clock-frequency = <20000000>;	/* 20 MHZ */
 	#address-cells = <1>;
 	#size-cells = <1>;
 	interrupt-parent = <&intc>;
@@ -44,15 +44,14 @@
 		};
 
 		uart0: serial@c0000000 {
-			compatible = "snps,dw-apb-uart";
+			compatible = "ns8250";
 			reg = <0xc0000000 0x2000>;
 			interrupts = <11>;
-			#clock-frequency = <80000000>;
 			clock-frequency = <3686400>;
 			baud = <115200>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
-			status = "okay";
+			no-loopback-test = <1>;
 		};
 
 		pgu0: pgu@c9000000 {
Signature · 1 line
1.8.3.2
#3 lore raw

PATCH RESEND 2/2 ARC: [nsimosci] Unbork console

In reply to Vineet Gupta

Despite the switch to right UART driver (prev patch), serial console still doesn't work due to missing CONFIG_SERIAL_OF_PLATFORM

Also fix the default cmdline in DT to not refer to out-of-tree ARC framebuffer driver for console.

Cc <[email protected]> #3.10, 3.12, 3.13, 3.14
Cc Francois Bedard <[email protected]>
---
 arch/arc/boot/dts/nsimosci.dts      | 5 ++++-
 arch/arc/configs/nsimosci_defconfig | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
arch/arc/boot/dts/nsimosci.dts +4 -1
index 8bd238c34c7d..4f31b2eb5cdf 100644
@@ -17,7 +17,10 @@
 	interrupt-parent = <&intc>;
 
 	chosen {
-		bootargs = "console=tty0 consoleblank=0";
+		/* this is for console on PGU */
+		/* bootargs = "console=tty0 consoleblank=0"; */
+		/* this is for console on serial */
+		bootargs = "earlycon=uart8250,mmio32,0xc0000000,115200n8 console=ttyS0,115200n8 consoleblank=0 debug";
 	};
 
 	aliases {
arch/arc/configs/nsimosci_defconfig +1 -0
index 451af30914f6..c01ba35a4eff 100644
@@ -54,6 +54,7 @@ CONFIG_SERIO_ARC_PS2=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SERIAL_ARC=y
 CONFIG_SERIAL_ARC_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
Signature · 1 line
1.8.3.2
#2 lore raw

Re: [PATCH Resend 1/2] ARC: [nsimosci] Change .dts to use generic 8250 UART

In reply to Vineet Gupta

For Stable 3.10, 3.12, 3.13, 3.14

mainline commit 6eda477b3c54b8236868c8784e5e042ff14244f0

Thx,
-Vineet

Quoted 46 lines · Vineet Gupta

From: Mischa Jonker <[email protected]>

The Synopsys APB DW UART has a couple of special features that are not in the System C model. In 3.8, the 8250_dw driver didn't really use these features, but from 3.9 onwards, the 8250_dw driver has become incompatible with our model.

Cc <[email protected]> #3.10, 3.12, 3.13, 3.14
Cc Francois Bedard <[email protected]>
---
 arch/arc/boot/dts/nsimosci.dts | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
arch/arc/boot/dts/nsimosci.dts +3 -4
index ea16d782af58..8bd238c34c7d 100644
@@ -11,7 +11,7 @@
 
 / {
 	compatible = "snps,nsimosci";
-	clock-frequency = <80000000>;	/* 80 MHZ */
+	clock-frequency = <20000000>;	/* 20 MHZ */
 	#address-cells = <1>;
 	#size-cells = <1>;
 	interrupt-parent = <&intc>;
@@ -44,15 +44,14 @@
 		};
 
 		uart0: serial@c0000000 {
-			compatible = "snps,dw-apb-uart";
+			compatible = "ns8250";
 			reg = <0xc0000000 0x2000>;
 			interrupts = <11>;
-			#clock-frequency = <80000000>;
 			clock-frequency = <3686400>;
 			baud = <115200>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
-			status = "okay";
+			no-loopback-test = <1>;
 		};
 
 		pgu0: pgu@c9000000 {
#4 lore raw

Re: [PATCH Resend 2/2] ARC: [nsimosci] Unbork console

In reply to Vineet Gupta

For Stable 3.10, 3.12, 3.13, 3.14

mainline commit 61fb4bfc010b0d2940f7fd87acbce6a0f03217cb

Thx,
-Vineet

Quoted 42 lines · Vineet Gupta

Despite the switch to right UART driver (prev patch), serial console still doesn't work due to missing CONFIG_SERIAL_OF_PLATFORM

Also fix the default cmdline in DT to not refer to out-of-tree ARC framebuffer driver for console.

Cc <[email protected]> #3.10, 3.12, 3.13, 3.14
Cc Francois Bedard <[email protected]>
---
 arch/arc/boot/dts/nsimosci.dts      | 5 ++++-
 arch/arc/configs/nsimosci_defconfig | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
arch/arc/boot/dts/nsimosci.dts +4 -1
index 8bd238c34c7d..4f31b2eb5cdf 100644
@@ -17,7 +17,10 @@
 	interrupt-parent = <&intc>;
 
 	chosen {
-		bootargs = "console=tty0 consoleblank=0";
+		/* this is for console on PGU */
+		/* bootargs = "console=tty0 consoleblank=0"; */
+		/* this is for console on serial */
+		bootargs = "earlycon=uart8250,mmio32,0xc0000000,115200n8 console=ttyS0,115200n8 consoleblank=0 debug";
 	};
 
 	aliases {
arch/arc/configs/nsimosci_defconfig +1 -0
index 451af30914f6..c01ba35a4eff 100644
@@ -54,6 +54,7 @@ CONFIG_SERIO_ARC_PS2=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SERIAL_ARC=y
 CONFIG_SERIAL_ARC_CONSOLE=y
 # CONFIG_HW_RANDOM is not set