Skip to content

Commit 50fa63a

Browse files
shawn1221rkhuangtao
authored andcommitted
PCI: dw: rockchip: Disable RC's BAR into rk_pcie_host_config()
To fix the unnecessary RC's bar allocation warning: [ 2.226288] pci 0000:00:00.0: BAR 0: no space for [mem size 0x40000000] [ 2.226305] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x40000000] [ 2.226317] pci 0000:00:00.0: BAR 1: no space for [mem size 0x40000000] [ 2.226327] pci 0000:00:00.0: BAR 1: failed to assign [mem size 0x40000000] Signed-off-by: Shawn Lin <[email protected]> Change-Id: I617cfa3408115d7c73190c6b9816d48ae82a37c8
1 parent 6c008c1 commit 50fa63a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

drivers/pci/controller/dwc/pcie-dw-rockchip.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,6 @@ static int rk_add_pcie_port(struct rk_pcie *rk_pcie, struct platform_device *pde
628628
return ret;
629629
}
630630

631-
/* Disable BAR0 BAR1 */
632-
dw_pcie_writel_dbi2(pci, PCI_BASE_ADDRESS_0, 0x0);
633-
dw_pcie_writel_dbi2(pci, PCI_BASE_ADDRESS_1, 0x0);
634-
635631
return 0;
636632
}
637633

@@ -1566,6 +1562,10 @@ static int rk_pcie_host_config(struct rk_pcie *rk_pcie)
15661562
rk_pcie_writel_apb(rk_pcie, PCIE_CLIENT_INTR_MASK_LEGACY,
15671563
rk_pcie->intx | 0xffff0000);
15681564

1565+
/* Disable BAR0 BAR1 */
1566+
dw_pcie_writel_dbi2(pci, PCI_BASE_ADDRESS_0, 0x0);
1567+
dw_pcie_writel_dbi2(pci, PCI_BASE_ADDRESS_1, 0x0);
1568+
15691569
return 0;
15701570
}
15711571

@@ -1993,10 +1993,6 @@ static int __maybe_unused rockchip_dw_pcie_resume(struct device *dev)
19931993
goto unconfig_host;
19941994
}
19951995

1996-
/* Disable BAR0 BAR1 */
1997-
dw_pcie_writel_dbi2(pci, PCI_BASE_ADDRESS_0, 0x0);
1998-
dw_pcie_writel_dbi2(pci, PCI_BASE_ADDRESS_1, 0x0);
1999-
20001996
dw_pcie_dbi_ro_wr_dis(pci);
20011997
rk_pcie->in_suspend = false;
20021998
if (rk_pcie->skip_scan_in_resume)

0 commit comments

Comments
 (0)