For the iMX6SDL, the Linux PCIe driver sets the DEVICE_TYPE in GPR12 to 0x4 for RC mode: // set device type to RC (PCI_EXP_TYPE_ROOT_PORT=4 is from pcie_regs.h)
imx_pcie_clrset(iomuxc_gpr12_device_type, PCI_EXP_TYPE_ROOT_PORT << 12, IOMUXC_GPR12
This seems odd since the ref manual says that 0x2 is the proper value for RC mode:
0000 PCIE_EP — EP Mode
0010 PCIE_RC — RC Mode
Can anyone explain why that it is? And how it is that it works that way? Wondering what setting I should use for an RTOS version of the driver I'm creating.