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

Miquel Raynal miquel.raynal at bootlin.com
Fri Sep 22 07:51:21 PDT 2023


On Tue, 2023-09-19 at 11:33:20 UTC, Shivamurthy Shastri wrote:
> 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: Shivamurthy Shastri <shivamurthy.shastri at linutronix.de>
> Reviewed-by: Benedikt Spranger <b.spranger at linutronix.de>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel



More information about the linux-mtd mailing list