linux/drivers/mtd/chips
Shivamurthy Shastri 3cff177fc2 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: Shivamurthy Shastri <shivamurthy.shastri@linutronix.de>
Reviewed-by: Benedikt Spranger <b.spranger@linutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230919113320.16953-1-shivamurthy.shastri@linutronix.de
2023-09-22 16:33:34 +02:00
..
cfi_cmdset_0001.c mtd: chips: Use SPDX license headers 2023-06-09 17:27:11 +02:00
cfi_cmdset_0002.c mfd: Explicitly include correct DT includes 2023-08-18 21:48:03 +01:00
cfi_cmdset_0020.c mtd: chips: Use SPDX license headers 2023-06-09 17:27:11 +02:00
cfi_probe.c mtd: chips: Use SPDX license headers 2023-06-09 17:27:11 +02:00
cfi_util.c mtd: chips: Use SPDX license headers 2023-06-09 17:27:11 +02:00
chipreg.c mtd: Convert list_for_each to entry variant 2021-06-11 21:05:06 +02:00
fwh_lock.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gen_probe.c mtd: chips: Use SPDX license headers 2023-06-09 17:27:11 +02:00
jedec_probe.c mtd: chips: Use SPDX license headers 2023-06-09 17:27:11 +02:00
Kconfig mtd: fixup CFI on ixp4xx 2021-10-15 12:27:10 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
map_absent.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
map_ram.c mtd: map_ram: prevent use of point and unpoint when NO_XIP is set 2023-09-22 16:33:34 +02:00
map_rom.c mtd: chips: Use SPDX license headers 2023-06-09 17:27:11 +02:00