How to access pcie cfg registers through DBI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to access pcie cfg registers through DBI

1,574 Views
jianminlv
Contributor I

We are designing a product based on sabresd. After we select 396/352 boot, kernel is dead at "readl(dbi_base)" of imx_pcie_regions_setup() in pcie.c.how to deal with it?? Anybody can help me, thanks very much!!

Labels (1)
0 Kudos
2 Replies

911 Views
jamesbone
NXP TechSupport
NXP TechSupport

Configure the LNK_CAP (offset 0xc) of 0x70 PCI Express Capabilities, can keep the PCIe in GEN1 mode.
You can make a reference to the chapter " PCI Standard Capability Structures Register Maps " of imx6 RM DOC too.

Here are the codes used to keep the PCIe always in GEN1 mode.
@@ -714,6 +714,13 @@ static int __devinit imx_pcie_pltfm_probe(struct platform_device *pdev)
         imx_pcie_regions_setup(dbi_base);

+       /*
+        * Force to GEN1
+        */
+       writel(((readl(dbi_base + LNK_CAP) & 0xfffffff0) | 0x1),
+                       dbi_base + LNK_CAP);
+

*****

911 Views
jianminlv
Contributor I

Hi,jamesbone

Thanks very much! The problem has been resolved, and the reason is power to pcie is not stable. After re-welding related resistances, accesing to registers of pcie is ok!

0 Kudos