mvebu: add inital support for Marvell Armada XP/370 SoCs
[openwrt/staging/dedeckeh.git] / target / linux / mvebu / patches-3.8 / 018-arm_mvebu_dw_apb_uart.patch
1 From 3487b074a742bc3300683e91e3ade383b659fbe9 Mon Sep 17 00:00:00 2001
2 From: Gregory CLEMENT <gregory.clement@free-electrons.com>
3 Date: Tue, 4 Dec 2012 18:04:59 +0100
4 Subject: [PATCH] arm: mvebu: Use dw-apb-uart instead of ns16650 as UART
5 driver
6
7 The UART controller used in the Armada 370 and Armada XP SoCs is the
8 Synopsys DesignWare 8250 (aka Synopsys DesignWare ABP UART). The
9 improper use of the ns16550 can lead to a kernel oops during boot if
10 a character is sent to the UART before the initialization of the
11 driver. The DW APB has an extra interrupt that gets raised when
12 writing to the LCR when busy. This explains why we need to use
13 dw-apb-uart driver to handle this.
14
15 Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
16 ---
17 arch/arm/boot/dts/armada-370-xp.dtsi | 6 ++++--
18 arch/arm/boot/dts/armada-xp.dtsi | 6 ++++--
19 arch/arm/configs/mvebu_defconfig | 1 +
20 3 files changed, 9 insertions(+), 4 deletions(-)
21
22 diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
23 index cf6c48a..4c0abe8 100644
24 --- a/arch/arm/boot/dts/armada-370-xp.dtsi
25 +++ b/arch/arm/boot/dts/armada-370-xp.dtsi
26 @@ -50,17 +50,19 @@
27 ranges;
28
29 serial@d0012000 {
30 - compatible = "ns16550";
31 + compatible = "snps,dw-apb-uart";
32 reg = <0xd0012000 0x100>;
33 reg-shift = <2>;
34 interrupts = <41>;
35 + reg-io-width = <4>;
36 status = "disabled";
37 };
38 serial@d0012100 {
39 - compatible = "ns16550";
40 + compatible = "snps,dw-apb-uart";
41 reg = <0xd0012100 0x100>;
42 reg-shift = <2>;
43 interrupts = <42>;
44 + reg-io-width = <4>;
45 status = "disabled";
46 };
47
48 diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
49 index 367aa3f..8a85ffe 100644
50 --- a/arch/arm/boot/dts/armada-xp.dtsi
51 +++ b/arch/arm/boot/dts/armada-xp.dtsi
52 @@ -42,17 +42,19 @@
53
54 soc {
55 serial@d0012200 {
56 - compatible = "ns16550";
57 + compatible = "snps,dw-apb-uart";
58 reg = <0xd0012200 0x100>;
59 reg-shift = <2>;
60 interrupts = <43>;
61 + reg-io-width = <4>;
62 status = "disabled";
63 };
64 serial@d0012300 {
65 - compatible = "ns16550";
66 + compatible = "snps,dw-apb-uart";
67 reg = <0xd0012300 0x100>;
68 reg-shift = <2>;
69 interrupts = <44>;
70 + reg-io-width = <4>;
71 status = "disabled";
72 };
73
74 diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig
75 index a702fb3..3ba35f1 100644
76 --- a/arch/arm/configs/mvebu_defconfig
77 +++ b/arch/arm/configs/mvebu_defconfig
78 @@ -34,6 +34,7 @@ CONFIG_MARVELL_PHY=y
79 CONFIG_SERIAL_8250=y
80 CONFIG_SERIAL_8250_CONSOLE=y
81 CONFIG_SERIAL_OF_PLATFORM=y
82 +CONFIG_SERIAL_8250_DW=y
83 CONFIG_I2C=y
84 CONFIG_I2C_MV64XXX=y
85 CONFIG_GPIOLIB=y
86 --
87 1.7.10.4
88