@@ -153,6 +153,9 @@ static int physmap_flash_probe(struct platform_device *dev)
simple_map_init(&info->map[i]);
+ if (physmap_data->no_unaligned_access)
+ info->map[i].phys = NO_XIP;
+
probe_type = rom_probe_types;
if (physmap_data->probe_type == NULL) {
for (; info->mtd[i] == NULL && *probe_type != NULL; probe_type++)
@@ -31,6 +31,7 @@ struct physmap_flash_data {
char *probe_type;
struct mtd_partition *parts;
const char * const *part_probe_types;
+ int no_unaligned_access;
};
#endif /* __LINUX_MTD_PHYSMAP__ */
Similar to physmap_of, allow preventing unaligned accesses to physmap also for non OF enabled platforms. Signed-off-by: Jonas Gorski <jogo@openwrt.org> --- drivers/mtd/maps/physmap.c | 3 +++ include/linux/mtd/physmap.h | 1 + 2 files changed, 4 insertions(+)