Skip to contentSkip to conversation

arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver

PATCH New Gregory CLEMENT 3 participants 6 messages Dec 4, 2012 – Jan 6, 2013

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

PATCH 1/1 arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver

The UART controller used in the Armada 370 and Armada XP SoCs is the Synopsys DesignWare 8250 (aka Synopsys DesignWare ABP UART). The improper use of the ns16550 can lead to a kernel oops during boot if a character is sent to the UART before the initialization of the driver. The DW APB has an extra interrupt that gets raised when writing to the LCR when busy. This explains why we need to use dw-apb-uart driver to handle this.

---

This patch fixed a bug introduced in 3.7, but as there are very few boards supported in 3.7 (only the Armada 370 and Armada XP evaluation boards), it is not a big deal if this patch is only applied for 3.8.

This patch is based on 3.7-rc8 and can be applied on top of the current arm-soc/for-next with a trivial conflict on mvebu_defconfig.

---
 arch/arm/boot/dts/armada-370-xp.dtsi |    6 ++++--
 arch/arm/boot/dts/armada-xp.dtsi     |    6 ++++--
 arch/arm/configs/mvebu_defconfig     |    2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-370-xp.dtsi +4 -2
index 16cc82c..03640f7 100644
@@ -44,17 +44,19 @@
 		ranges;
 
 		serial at d0012000 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012000 0x100>;
 				reg-shift = <2>;
 				interrupts = <41>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 		serial at d0012100 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012100 0x100>;
 				reg-shift = <2>;
 				interrupts = <42>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 
arch/arm/boot/dts/armada-xp.dtsi +4 -2
index 71d6b5d..9a0e744 100644
@@ -29,17 +29,19 @@
 
 	soc {
 		serial at d0012200 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012200 0x100>;
 				reg-shift = <2>;
 				interrupts = <43>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 		serial at d0012300 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012300 0x100>;
 				reg-shift = <2>;
 				interrupts = <44>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 
arch/arm/configs/mvebu_defconfig +1 -1
index 3458752..9e34084 100644
@@ -22,7 +22,7 @@ CONFIG_VFP=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_8250_DW=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_USB_SUPPORT is not set
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver

Quoted 9 lines · Gregory CLEMENT

The UART controller used in the Armada 370 and Armada XP SoCs is the Synopsys DesignWare 8250 (aka Synopsys DesignWare ABP UART). The improper use of the ns16550 can lead to a kernel oops during boot if a character is sent to the UART before the initialization of the driver. The DW APB has an extra interrupt that gets raised when writing to the LCR when busy. This explains why we need to use dw-apb-uart driver to handle this.

Quoted 9 lines

---

This patch fixed a bug introduced in 3.7, but as there are very few boards supported in 3.7 (only the Armada 370 and Armada XP evaluation boards), it is not a big deal if this patch is only applied for 3.8.

This patch is based on 3.7-rc8 and can be applied on top of the current arm-soc/for-next with a trivial conflict on mvebu_defconfig.

Jason,

do you want a git pull, or is it easier to just pick this single patch?

Thanks,
Gregory

Quoted 72 lines
---
 arch/arm/boot/dts/armada-370-xp.dtsi |    6 ++++--
 arch/arm/boot/dts/armada-xp.dtsi     |    6 ++++--
 arch/arm/configs/mvebu_defconfig     |    2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-370-xp.dtsi +4 -2
index 16cc82c..03640f7 100644
@@ -44,17 +44,19 @@
 		ranges;
 
 		serial at d0012000 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012000 0x100>;
 				reg-shift = <2>;
 				interrupts = <41>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 		serial at d0012100 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012100 0x100>;
 				reg-shift = <2>;
 				interrupts = <42>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 
arch/arm/boot/dts/armada-xp.dtsi +4 -2
index 71d6b5d..9a0e744 100644
@@ -29,17 +29,19 @@
 
 	soc {
 		serial at d0012200 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012200 0x100>;
 				reg-shift = <2>;
 				interrupts = <43>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 		serial at d0012300 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012300 0x100>;
 				reg-shift = <2>;
 				interrupts = <44>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 
arch/arm/configs/mvebu_defconfig +1 -1
index 3458752..9e34084 100644
@@ -22,7 +22,7 @@ CONFIG_VFP=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_8250_DW=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_USB_SUPPORT is not set
#2 lore raw

PATCH 1/1 arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver

Quoted 9 lines · Gregory CLEMENT
Quoted 8 lines · Gregory CLEMENT

The UART controller used in the Armada 370 and Armada XP SoCs is the Synopsys DesignWare 8250 (aka Synopsys DesignWare ABP UART). The improper use of the ns16550 can lead to a kernel oops during boot if a character is sent to the UART before the initialization of the driver. The DW APB has an extra interrupt that gets raised when writing to the LCR when busy. This explains why we need to use dw-apb-uart driver to handle this.

Quoted 6 lines
Quoted 6 lines

---

This patch fixed a bug introduced in 3.7, but as there are very few boards supported in 3.7 (only the Armada 370 and Armada XP evaluation boards), it is not a big deal if this patch is only applied for 3.8.

mirabox, openblocks A3/4, but your point still stands.

Quoted 7 lines
Quoted 3 lines

This patch is based on 3.7-rc8 and can be applied on top of the current arm-soc/for-next with a trivial conflict on mvebu_defconfig.

Jason,

do you want a git pull, or is it easier to just pick this single patch?

nah, I'll just queue it up for v3.8-rc1

thx,

Jason.

#3 lore raw

PATCH 1/1 arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver

Dear Jason Cooper,

Quoted 6 lines · Jason Cooper
Quoted 4 lines
Quoted 4 lines

This patch fixed a bug introduced in 3.7, but as there are very few boards supported in 3.7 (only the Armada 370 and Armada XP evaluation boards), it is not a big deal if this patch is only applied for 3.8.

mirabox, openblocks A3/4, but your point still stands.

No, there was no support in mainline for the Mirabox or OpenBlocks in 3.7. The support for those boards has been introduced for 3.8.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 1/1 arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver

Quoted 9 lines · Thomas Petazzoni

Dear Jason Cooper,

Quoted 5 lines · Jason Cooper
Quoted 4 lines
Quoted 4 lines

This patch fixed a bug introduced in 3.7, but as there are very few boards supported in 3.7 (only the Armada 370 and Armada XP evaluation boards), it is not a big deal if this patch is only applied for 3.8.

Quoted 4 lines
Quoted 1 line

mirabox, openblocks A3/4, but your point still stands.

No, there was no support in mainline for the Mirabox or OpenBlocks in 3.7. The support for those boards has been introduced for 3.8.

Gah, you're correct. I pushed the patches so long ago, it felt like v3.7 ;-)

thx,

Jason.

Applied
#5 lore raw

PATCH 1/1 arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver

In reply to Gregory CLEMENT
Quoted 9 lines · Gregory CLEMENT

The UART controller used in the Armada 370 and Armada XP SoCs is the Synopsys DesignWare 8250 (aka Synopsys DesignWare ABP UART). The improper use of the ns16550 can lead to a kernel oops during boot if a character is sent to the UART before the initialization of the driver. The DW APB has an extra interrupt that gets raised when writing to the LCR when busy. This explains why we need to use dw-apb-uart driver to handle this.

Applied to mvebu/fixes.

thx,

Jason.

Quoted 88 lines

---

This patch fixed a bug introduced in 3.7, but as there are very few boards supported in 3.7 (only the Armada 370 and Armada XP evaluation boards), it is not a big deal if this patch is only applied for 3.8.

This patch is based on 3.7-rc8 and can be applied on top of the current arm-soc/for-next with a trivial conflict on mvebu_defconfig.

---
 arch/arm/boot/dts/armada-370-xp.dtsi |    6 ++++--
 arch/arm/boot/dts/armada-xp.dtsi     |    6 ++++--
 arch/arm/configs/mvebu_defconfig     |    2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-370-xp.dtsi +4 -2
index 16cc82c..03640f7 100644
@@ -44,17 +44,19 @@
 		ranges;
 
 		serial at d0012000 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012000 0x100>;
 				reg-shift = <2>;
 				interrupts = <41>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 		serial at d0012100 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012100 0x100>;
 				reg-shift = <2>;
 				interrupts = <42>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 
arch/arm/boot/dts/armada-xp.dtsi +4 -2
index 71d6b5d..9a0e744 100644
@@ -29,17 +29,19 @@
 
 	soc {
 		serial at d0012200 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012200 0x100>;
 				reg-shift = <2>;
 				interrupts = <43>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 		serial at d0012300 {
-				compatible = "ns16550";
+				compatible = "snps,dw-apb-uart";
 				reg = <0xd0012300 0x100>;
 				reg-shift = <2>;
 				interrupts = <44>;
+				reg-io-width = <4>;
 				status = "disabled";
 		};
 
arch/arm/configs/mvebu_defconfig +1 -1
index 3458752..9e34084 100644
@@ -22,7 +22,7 @@ CONFIG_VFP=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_8250_DW=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_USB_SUPPORT is not set
Signature · 7 lines
1.7.9.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel