From: Hou Zhiqiang Date: Fri, 5 Jul 2019 09:56:38 +0000 (+0800) Subject: PCI: mobiveil: Initialize Primary/Secondary/Subordinate bus numbers X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=6f3ab451aa5c2cbff33197d82fe8489cbd55ad91;p=openwrt%2Fstaging%2Fblogic.git PCI: mobiveil: Initialize Primary/Secondary/Subordinate bus numbers 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 Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index cdf15cca526e..8f561300a88e 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -561,6 +561,12 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) u32 value, pab_ctrl, type = 0; struct resource_entry *win; + /* 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