+static map_word ar91xx_flash_read_lock(struct map_info *map, unsigned long ofs)
+{
+ map_word ret;
+
+ ar71xx_flash_acquire();
+ ret = ar91xx_flash_read(map, ofs);
+ ar71xx_flash_release();
+
+ return ret;
+}
+
+static void ar91xx_flash_write_lock(struct map_info *map, map_word d,
+ unsigned long ofs)
+{
+ ar71xx_flash_acquire();
+ ar91xx_flash_write(map, d, ofs);
+ ar71xx_flash_release();
+}
+
+static void ar91xx_flash_copy_from_lock(struct map_info *map, void *to,
+ unsigned long from, ssize_t len)
+{
+ ar71xx_flash_acquire();
+ inline_map_copy_from(map, to, from, len);
+ ar71xx_flash_release();
+}
+
+static void ar91xx_flash_copy_to_lock(struct map_info *map, unsigned long to,
+ const void *from, ssize_t len)
+{
+ ar71xx_flash_acquire();
+ inline_map_copy_to(map, to, from, len);
+ ar71xx_flash_release();
+}
+