static dev_t pexor_devt;
static int my_major_nr = 0;
+//#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
+static u64 pexor_dma_mask = DMA_BIT_MASK(32);
+//#endif
+
struct dev_pexor
{
u32* irq_control; /* irq control register */
/* TODO: export special things to class in sysfs ? */
-
if (!IS_ERR(pexor_class)) {
/* driver init had successfully created class, now we create device: */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
support here: */
pexor_msg(KERN_ERR "Could not add PEXOR device node to /dev !");
}
+
+ /** JAM 4-APR-2019: try this for kernel 5.0.3*/
+ priv->class_dev->dma_mask = &pexor_dma_mask;
/* init pexor_dma buffer */
if (pexor_alloc_dma_buffer(priv, DMA_BUFFER_NUM_PAGES * PAGE_SIZE) != 0) {