Hello,
We are using P2040 based board and in this we need to access the registers in the CCSR address space from Linux. So how we can access these registers from Linux user space.
Regards
You can mmap() /dev/mem -- but in general this is not recommended. Why do you need to do this?
We need to configure the registers of SPI. So to configure these registers how we can
We need to configure the registers of SPI. As these registers are in CCSR address space, it is required to access CCSR address space to read/write these registers.
Does the existing kernel SPI driver (drivers/spi/spi-fsl-espi.c or drivers/spi/spi_fsl_espi.c depending on kernel version) not work for you?
Thanks for the reply. In the board (P2040 based ), there is one Ethernet switch in SPI bus. So how I communicate with the Ethernet switch through SPI using APIs mentioned in drivers/spi/spi_fsl_espi.c. Is there any application note for writing SPI driver using freescale SPI driver SPIs ?
I have a tool I can send you if you want that basically does mmaps from kernel space (CCSR) over to user space
Hi Paul,
We are using the LS1021A and I want to peek and poke CCSR space to help debug a PCIe issue. Could you send me a copy of your utility if it's available.
Thanks
Bill Anderson
It will be very helpful if you send me the tool.
There is documentation in Documentation/spi/, including a userspace interface (spidev).