Lines Matching defs:map
2 * MTD map driver for flash on the DC21285 (the StrongARM-110 companion chip)
16 #include <linux/mtd/map.h>
54 static map_word dc21285_read8(struct map_info *map, unsigned long ofs)
57 val.x[0] = *(uint8_t*)(map->virt + ofs);
61 static map_word dc21285_read16(struct map_info *map, unsigned long ofs)
64 val.x[0] = *(uint16_t*)(map->virt + ofs);
68 static map_word dc21285_read32(struct map_info *map, unsigned long ofs)
71 val.x[0] = *(uint32_t*)(map->virt + ofs);
75 static void dc21285_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
77 memcpy(to, (void*)(map->virt + from), len);
80 static void dc21285_write8(struct map_info *map, const map_word d, unsigned long adr)
86 *(uint8_t*)(map->virt + adr) = d.x[0];
89 static void dc21285_write16(struct map_info *map, const map_word d, unsigned long adr)
95 *(uint16_t*)(map->virt + adr) = d.x[0];
98 static void dc21285_write32(struct map_info *map, const map_word d, unsigned long adr)
102 *(uint32_t*)(map->virt + adr) = d.x[0];
105 static void dc21285_copy_to_32(struct map_info *map, unsigned long to, const void *from, ssize_t len)
110 dc21285_write32(map, d, to);
117 static void dc21285_copy_to_16(struct map_info *map, unsigned long to, const void *from, ssize_t len)
122 dc21285_write16(map, d, to);
129 static void dc21285_copy_to_8(struct map_info *map, unsigned long to, const void *from, ssize_t len)
133 dc21285_write8(map, d, to);
178 /* Let's map the flash area */
231 MODULE_DESCRIPTION("MTD map driver for DC21285 boards");