I’m running a 3.1.10 Kernel (from Toradex fork) on a Tegra 2 CPU. I’m porting a driver I wrote which handles an interface between Tegra 2 and an FPGA through the GMI(SNOR) interface.
First thing the driver does when inserted is to configure SNOR registers. It happens that I can read them (and the value read is coherent with the TRM) but when I write a new configuration, the value remains unchanged in the next read.
I’m using the following mem management kernel functions:
- request_mem_region to allocate space
- ioremap for each register (I run iounmap once finished)
- ioread32 to read. This call works perfect, for example, I read 0x76543210 from SNOR_CS_MUX_CFG_0 register.
- iowrite32 to write. This call is not working somehow. The address used to write is the same as the one used to read, but when I read the register after having written, value remains unchanged.
- I’m using compiler barriers (i.e. rmb() wmb()) to avoid reordering and optimizations.
I’ve searched through the TRM and found nothing that can shed some light on this. I’ve googled this issue as well with no success.
Any ideas really appreciated. Thanks you for your time.