Skip to content
Snippets Groups Projects
Select Git revision
4 results

fsl_pci_init.c

Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Zhao Qiang's avatar
    287df01e
    PCIe:change the method to get the address of a requested capability in configuration space. · 287df01e
    Zhao Qiang authored
    
    Previously, the address of a requested capability is define like that
    	"#define PCI_DCR	0x78"
    But, the addresses of capabilities is different with regard to PCIe revs.
    So this method is not flexible.
    
    Now a function to get the address of a requested capability is added and used.
    It can get the address dynamically by capability ID.
    The step of this function:
    	1. Read Status register in PCIe configuration space to confirm that
    	   Capabilities List is valid.
    	2. Find the address of Capabilities Pointer Register.
    	3. Find the address of requested capability from the first capability.
    
    Signed-off-by: default avatarZhao Qiang <B45475@freescale.com>
    287df01e
    History
    PCIe:change the method to get the address of a requested capability in configuration space.
    Zhao Qiang authored
    
    Previously, the address of a requested capability is define like that
    	"#define PCI_DCR	0x78"
    But, the addresses of capabilities is different with regard to PCIe revs.
    So this method is not flexible.
    
    Now a function to get the address of a requested capability is added and used.
    It can get the address dynamically by capability ID.
    The step of this function:
    	1. Read Status register in PCIe configuration space to confirm that
    	   Capabilities List is valid.
    	2. Find the address of Capabilities Pointer Register.
    	3. Find the address of requested capability from the first capability.
    
    Signed-off-by: default avatarZhao Qiang <B45475@freescale.com>