mvebu: Add basic support for WRT1900AC (v1) and Turris Omnia (pre 2019)
[librecmc/librecmc.git] / target / linux / mvebu / patches-4.14 / 526-PCI-aardvark-disable-LOS-state-by-default.patch
1 From patchwork Thu Sep 28 12:58:36 2017
2 Content-Type: text/plain; charset="utf-8"
3 MIME-Version: 1.0
4 Content-Transfer-Encoding: 7bit
5 Subject: [v2,5/7] PCI: aardvark: disable LOS state by default
6 X-Patchwork-Submitter: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 X-Patchwork-Id: 819590
8 Message-Id: <20170928125838.11887-6-thomas.petazzoni@free-electrons.com>
9 To: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
10 Cc: Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
11  Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Gregory Clement
12  <gregory.clement@free-electrons.com>, 
13  Nadav Haklai <nadavh@marvell.com>, Hanna Hawa <hannah@marvell.com>,
14  Yehuda Yitschak <yehuday@marvell.com>,
15  linux-arm-kernel@lists.infradead.org, Antoine Tenart
16  <antoine.tenart@free-electrons.com>, =?utf-8?q?Miqu=C3=A8l_Raynal?=
17  <miquel.raynal@free-electrons.com>, Victor Gu <xigu@marvell.com>,
18  Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
19 Date: Thu, 28 Sep 2017 14:58:36 +0200
20 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
21 List-Id: <linux-pci.vger.kernel.org>
22
23 From: Victor Gu <xigu@marvell.com>
24
25 Some PCIe devices do not support LOS, and will cause timeouts if the
26 root complex forces the LOS state. This patch disables the LOS state
27 by default.
28
29 This is part of fixing bug
30 https://bugzilla.kernel.org/show_bug.cgi?id=196339, this commit was
31 reported as the user to be important to get a Intel 7260 mini-PCIe
32 WiFi card working.
33
34 Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver")
35 Signed-off-by: Victor Gu <xigu@marvell.com>
36 Reviewed-by: Evan Wang <xswang@marvell.com>
37 Reviewed-by: Nadav Haklai <nadavh@marvell.com>
38 [Thomas: tweak commit log.]
39 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
40 ---
41  drivers/pci/host/pci-aardvark.c | 3 +--
42  1 file changed, 1 insertion(+), 2 deletions(-)
43
44 --- a/drivers/pci/host/pci-aardvark.c
45 +++ b/drivers/pci/host/pci-aardvark.c
46 @@ -368,8 +368,7 @@ static void advk_pcie_setup_hw(struct ad
47  
48         advk_pcie_wait_for_link(pcie);
49  
50 -       reg = PCIE_CORE_LINK_L0S_ENTRY |
51 -               (1 << PCIE_CORE_LINK_WIDTH_SHIFT);
52 +       reg = (1 << PCIE_CORE_LINK_WIDTH_SHIFT);
53         advk_writel(pcie, reg, PCIE_CORE_LINK_CTRL_STAT_REG);
54  
55         reg = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG);