Skip to content
Commit 3cff177f authored by Shivamurthy Shastri's avatar Shivamurthy Shastri Committed by Miquel Raynal
Browse files

mtd: map_ram: prevent use of point and unpoint when NO_XIP is set



When the DT property no-unaligned-direct-access is set, map->phys is set
to NO_XIP. With this property set, the flash should not be exposed
directly to MTD users, since it cannot be mapped.

map_ram() exposes the flash direct access unconditionally which leads to
access errors (when the bus width does not match the RAM width).

Therefore do not set point and unpoint when NO_XIP is set.

Signed-off-by: default avatarShivamurthy Shastri <shivamurthy.shastri@linutronix.de>
Reviewed-by: default avatarBenedikt Spranger <b.spranger@linutronix.de>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230919113320.16953-1-shivamurthy.shastri@linutronix.de
parent 28a05da7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment