]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PCI: mobiveil: Initialize Primary/Secondary/Subordinate bus numbers
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Fri, 5 Jul 2019 09:56:38 +0000 (17:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:27:05 +0000 (07:27 +0200)
[ Upstream commit 6f3ab451aa5c2cbff33197d82fe8489cbd55ad91 ]

The reset value of Primary, Secondary and Subordinate bus numbers is
zero which is a broken setup.

Program a sensible default value for Primary/Secondary/Subordinate
bus numbers.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Minghuan Lian <Minghuan.Lian@nxp.com>
Reviewed-by: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/pcie-mobiveil.c

index 3e81e68b5ce02f360c0f2e8b1c8e1773642f4fdb..2fe7ebdad2d2f71d4a881394f6d5e9ee83eb12a6 100644 (file)
@@ -508,6 +508,12 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie)
                return err;
        }
 
+       /* setup bus numbers */
+       value = csr_readl(pcie, PCI_PRIMARY_BUS);
+       value &= 0xff000000;
+       value |= 0x00ff0100;
+       csr_writel(pcie, value, PCI_PRIMARY_BUS);
+
        /*
         * program Bus Master Enable Bit in Command Register in PAB Config
         * Space