]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
PCIe:change the method to get the address of a requested capability in configuration...
authorZhao Qiang <B45475@freescale.com>
Sat, 12 Oct 2013 05:46:33 +0000 (13:46 +0800)
committerYork Sun <yorksun@freescale.com>
Wed, 16 Oct 2013 23:15:17 +0000 (16:15 -0700)
commit287df01e6aef0464c5e5bcbd7e87aa4ff1f24f5a
tree638da6ca13c77d494a81603d18ea9c1f7feddc25
parent787964b8118b47a50bda796a315068639977c884
PCIe:change the method to get the address of a requested capability in configuration space.

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: Zhao Qiang <B45475@freescale.com>
arch/powerpc/include/asm/fsl_pci.h
drivers/pci/fsl_pci_init.c
drivers/pci/pci.c
include/pci.h