I am trying to interface an external SRAM which is connected to the CS0 of the iMX53's EIM. The memory region starts at 0xF0000000. I want to access it from Linux as an MTD device using the plat-ram driver. On a previous platform running the iMX35, this worked without any problems. However, on the iMX53 there seems to be an access restriction. While I can read and write the memory from a kernel driver directly (using ioremap, __raw_writel and __raw_readl), I can only read the memory from user space (cat /dev/mtd0). Writing to the memory is not possible (echo "test" > /dev/mtd0).
I cannot find the place where to enable access from user space. There is a bit in the EIM (GCR1, b19) which should be responsible for this, but it is already cleared, i.e. user space access is allowed. There is also a write-protect bit (b27), which is cleared as well, i.e. not write-protected. I also checked the AIPS registers (OPACR) where permissions for several peripherals can be set, but these get correctly initialized with zeros. The clocks cannot be the reason either, I tested the access with all of the clocks running. I have no idea why the access does not work from the user space. Does anyone have a clue?