I wrote the device driver code for the SPI slave device mounted under the spi device tree node, and it works normally. But now I have a requirement for fast communication. I do not use APIs such as kernel spi_sync during transmission, and choose to directly operate the SPI register. I found that it will cause the kernel to hang directly. When matching the device driver, I used ioremap again to obtain the starting virtual address of the hardware SPI, and then directly operated the offset (register) of the starting address in the device driver file, but the kernel hung. What is this? The reason? Is it because Ioremap uses the same SPI memory twice? Or is there a conflict with spi_imx.c when using functions such as readl?
Please answer it. Thank you!
Recommend you use regmap framework to operate regs
Avoid using ioremap, regmap is more safety.