Or cheat!
Find a well documented something that is sort of kind of like whatever you are going to implement, and setup the PCIe endpoint on the FPGA to pretend to be it, then just use the normal kernel driver for whatever it is.
I have used this to great effect with some custom AD stuff, by pretending to be a multichannel sound card, saved a lot of driver writing.
Regards, Dan.