iMX6 needs to write some code to OCRAM which resumes the DDR controller
after suspend. However, merely using __arm_ioremap_exec() causes the
kernel to complain of a W+X mapping. Solve this by using the newly
introduced __arm_iomem_set_ro() function to prevent inadvertent or
malicious writes to code we may later execute.
Tested-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
&imx6_suspend,
MX6Q_SUSPEND_OCRAM_SIZE - sizeof(*pm_info));
+ __arm_iomem_set_ro(suspend_ocram_base, MX6Q_SUSPEND_OCRAM_SIZE);
+
goto put_device;
pl310_cache_map_failed: