My FPGA bitstream (ZYNQ) embeds a PCIe IP used to connect a mini-PCIe wifi module. But this bitstream is loaded in the FPGA by the main application. So at boot time, PCIe is not available. I wonder how to handle this situation.
If I do not describe the PCIe and wifi module in the device tree, I need to load kernel modules at application runtime. But it looks like there is no way to compile the PCIe driver as a module...
If I describe the PCIe and wifi module in the device tree, I get a Uboot crash as the PCIe is not present.
I've heard about "device tree overlays" , but the kernel I use (3.10) do not provide such function.
What I did for a SDIO interface that went through logic was add a fake power supply requirement that made the MMC1 controller need a "fpga-power". I wrote a power supply driver that just provides that power, and load it as a module. This caused the MMC1 to defer probing, while the MMC0 could just continue.
If the PCIe doesn't have any regulator support, you could quite easily alter the PCIe driver in the kernel to support a power supply, and then make it defer until that supply is available. That way, you can have the driver built-in in the kernel but postpone its actual initialization until a later time.