[PATCH linux 2/2] arm/aspeed: Enable VUART driver

Xo Wang xow at google.com
Fri Aug 5 06:51:03 AEST 2016


From: Jeremy Kerr <jk at ozlabs.org>

This change makes use of the new VUART device driver. We need a separate
compatible property for the VUART node, and a fix for the interrupt
definitions. We also change the SCU setup to notify host firmware that the
VUART is available.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
Signed-off-by: Xo Wang <xow at google.com>
---
 arch/arm/boot/dts/aspeed-g4.dtsi  | 6 +++---
 arch/arm/boot/dts/aspeed-g5.dtsi  | 6 +++---
 arch/arm/configs/aspeed_defconfig | 3 +++
 arch/arm/mach-aspeed/aspeed.c     | 2 +-
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index ff1eb0b..41c59ab 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -174,11 +174,11 @@
 				status = "disabled";
 			};
 
-			uart6: serial at 1e787000 {
-				compatible = "ns16550a";
+			uart6: vuart at 1e787000 {
+				compatible = "aspeed,vuart";
 				reg = <0x1e787000 0x1000>;
 				reg-shift = <2>;
-				interrupts = <10>;
+				interrupts = <8>;
 				clocks = <&clk_uart>;
 				no-loopback-test;
 				status = "disabled";
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index afddbb8..6aaddfb 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -191,11 +191,11 @@
 				status = "disabled";
 			};
 
-			uart6: serial at 1e787000 {
-				compatible = "ns16550a";
+			uart6: vuart at 1e787000 {
+				compatible = "aspeed,vuart";
 				reg = <0x1e787000 0x1000>;
 				reg-shift = <2>;
-				interrupts = <10>;
+				interrupts = <8>;
 				clocks = <&clk_uart>;
 				no-loopback-test;
 				status = "disabled";
diff --git a/arch/arm/configs/aspeed_defconfig b/arch/arm/configs/aspeed_defconfig
index 4d850fc..003d39d 100644
--- a/arch/arm/configs/aspeed_defconfig
+++ b/arch/arm/configs/aspeed_defconfig
@@ -94,6 +94,9 @@ CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=6
 CONFIG_SERIAL_8250_RUNTIME_UARTS=6
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_ASPEED_VUART=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SERIAL_ASPEED_VUART=y
 CONFIG_HW_RANDOM=y
diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
index dd9b3b8..9c9f6bc 100644
--- a/arch/arm/mach-aspeed/aspeed.c
+++ b/arch/arm/mach-aspeed/aspeed.c
@@ -119,7 +119,7 @@ static void __init do_common_setup(void)
 
 	/* Setup scratch registers */
 	writel(0x00000042, AST_IO(AST_BASE_LPC | 0x170));
-	writel(0x00004000, AST_IO(AST_BASE_LPC | 0x174));
+	writel(0x00008000, AST_IO(AST_BASE_LPC | 0x174));
 }
 
 static void __init do_barreleye_setup(void)
-- 
2.8.0.rc3.226.g39d4020



More information about the openbmc mailing list