We found out it use different way to configure PCIe: It configures RC to use clock from EP
As we use RC clock to drive EP, so I disabled the PHY_MPLL override code in pcie.c
#define ZEP_DEBUG_DONT_INIT_PCI 1
#undef ZEP_DEBUG_DONT_INIT_PCI
#define ZEP_PCIE_OVERRIDE_PHY_MPLL 1
#undef ZEP_PCIE_OVERRIDE_PHY_MPLL /* !!!!! */
#define IMX_PCIE_CORE_DEBUG
#undef IMX_PCIE_CORE_DEBUG
#ifdef IMX_PCIE_CORE_DEBUG
#define IMX_PCIE_PL_DEBUG_BUFFER_SZ (1024)
I did “echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove” , then I recycled the EP power, and did “echo 1 > /sys/bus/pci/rescan”
The result is Linux kernel crash:
Unhandled fault: imprecise external abort (0x1406) at 0x000c4000
Internal error: : 1406 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 Not tainted (3.0.35-2508-g54750ff #77)
It also has lots of changed in the pcie.c comparing to my 4.0.0 release.
Would you please help us find if there is a solution for the 4.0.0 release?
Thanks.