0001
0002
0003
0004
0005
0006
0007 #include <linux/kernel.h>
0008 #include <linux/module.h>
0009
0010 #include <linux/mtd/map.h>
0011 #include <linux/mtd/xip.h>
0012
0013 static map_word __xipram simple_map_read(struct map_info *map, unsigned long ofs)
0014 {
0015 return inline_map_read(map, ofs);
0016 }
0017
0018 static void __xipram simple_map_write(struct map_info *map, const map_word datum, unsigned long ofs)
0019 {
0020 inline_map_write(map, datum, ofs);
0021 }
0022
0023 static void __xipram simple_map_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
0024 {
0025 inline_map_copy_from(map, to, from, len);
0026 }
0027
0028 static void __xipram simple_map_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
0029 {
0030 inline_map_copy_to(map, to, from, len);
0031 }
0032
0033 void simple_map_init(struct map_info *map)
0034 {
0035 BUG_ON(!map_bankwidth_supported(map->bankwidth));
0036
0037 map->read = simple_map_read;
0038 map->write = simple_map_write;
0039 map->copy_from = simple_map_copy_from;
0040 map->copy_to = simple_map_copy_to;
0041 }
0042
0043 EXPORT_SYMBOL(simple_map_init);
0044 MODULE_LICENSE("GPL");