File tree Expand file tree Collapse file tree
drivers/pci/controller/dwc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8585#define PCIE_LINKUP_MASK GENMASK(17, 16)
8686#define PCIE_LTSSM_STATUS_MASK GENMASK(5, 0)
8787
88+ #define PCIE_TYPE0_HDR_DBI2_OFFSET 0x100000
89+
8890struct rockchip_pcie {
8991 struct dw_pcie pci ;
9092 void __iomem * apb_base ;
@@ -312,6 +314,8 @@ static int rockchip_pcie_host_init(struct dw_pcie_rp *pp)
312314 if (irq < 0 )
313315 return irq ;
314316
317+ pci -> dbi_base2 = pci -> dbi_base + PCIE_TYPE0_HDR_DBI2_OFFSET ;
318+
315319 ret = rockchip_pcie_init_irq_domain (rockchip );
316320 if (ret < 0 )
317321 dev_err (dev , "failed to init irq domain\n" );
@@ -322,6 +326,10 @@ static int rockchip_pcie_host_init(struct dw_pcie_rp *pp)
322326 rockchip_pcie_configure_l1ss (pci );
323327 rockchip_pcie_enable_l0s (pci );
324328
329+ /* Disable Root Ports BAR0 and BAR1 as they report bogus size */
330+ dw_pcie_writel_dbi2 (pci , PCI_BASE_ADDRESS_0 , 0x0 );
331+ dw_pcie_writel_dbi2 (pci , PCI_BASE_ADDRESS_1 , 0x0 );
332+
325333 return 0 ;
326334}
327335
You can’t perform that action at this time.
0 commit comments