I am developing a pcie device driver for the iMX8M evaluation kit. The end-point is an FPGA which supports 64-bit DMA and a single MSI interrupt.
First of all in my driver I tried to enable DMA_BIT_MASK(64) using Linux pcie framework API:
pci_set_dma_mask(pdev, DMA_BIT_MASK(64);
This function is failing and the kernel error message is:
[ +0.008434] Can't support > 32 bit dma.
Second when I tried to enable the pcie interrupt using:
pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);then pci_irq_vector(pdev, 0); this function is returnting Linux IRQ 11.
So when I assign a handler to this IRQ using request_irq() it returns err -22.
(1) Is it possible to enable DMA_BIT_MASK(64)?
(2) Why the kernel is not allowing me to assign an IRQ handler? Is there any PCIe driver example for i.MX8?
Thanks