During cross compilation I found out that I had to comment out CC=gcc in the make files of driver, lib and test as well as adding export CC=$(CROSS_COMPILE)gcc to the main Makefile. With this I was able to get everything compiled nut I'm not able to load the driver.
As we also emulate ISA communication with the external memory interface of the ARM controller we are using (AT91SAMA5D27-D1G) loading of the driver with following command
Code: Select all
insmod /lib/modules/4.14.73-linux4sam_6.0/misc/pcan.ko io=0x10000300 irq=5
Code: Select all
insmod: can't insert '/lib/modules/4.14.73-linux4sam_6.0/misc/pcan.ko': Numerical result out of range
Jan 1 00:04:37 pc104_wb12 user.err kernel: pcan: `0x10000300' invalid for parameter `io'
Is there a way to modify yout kernel driver so it works as memory mapped device instead of strictly using ISA I/O?