• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/mtd/chips/

Lines Matching refs:map

11 #include <linux/mtd/map.h>
16 static struct cfi_private *genprobe_ident_chips(struct map_info *map,
18 static int genprobe_new_chip(struct map_info *map, struct chip_probe *cp,
21 struct mtd_info *mtd_do_chip_probe(struct map_info *map, struct chip_probe *cp)
26 /* First probe the map to see if we have CFI stuff there. */
27 cfi = genprobe_ident_chips(map, cp);
32 map->fldrv_priv = cfi;
35 mtd = check_cmd_set(map, 1); /* First the primary cmdset */
37 mtd = check_cmd_set(map, 0); /* Then the secondary */
40 if (mtd->size > map->size) {
43 (unsigned long)map->size >> 10);
44 mtd->size = map->size;
53 map->fldrv_priv = NULL;
59 static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chip_probe *cp)
71 if (!genprobe_new_chip(map, cp, &cfi)) {
74 cp->name, map->name);
108 max_chips = map->size >> cfi.chipshift;
117 printk(KERN_WARNING "%s: kmalloc failed for CFI chip map\n", map->name);
131 cp->probe_chip(map, i << cfi.chipshift, chip_map, &cfi);
142 printk(KERN_WARNING "%s: kmalloc failed for CFI private structure\n", map->name);
167 static int genprobe_new_chip(struct map_info *map, struct chip_probe *cp,
170 int min_chips = (map_bankwidth(map)/4?:1); /* At most 4-bytes wide. */
171 int max_chips = map_bankwidth(map); /* And minimum 1 */
183 type = map_bankwidth(map) / nr_chips;
188 if (cp->probe_chip(map, 0, NULL, cfi))
201 static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map,
204 struct cfi_private *cfi = map->fldrv_priv;
221 mtd = (*probe_function)(map, primary);
232 static struct mtd_info *check_cmd_set(struct map_info *map, int primary)
234 struct cfi_private *cfi = map->fldrv_priv;
247 return cfi_cmdset_0001(map, primary);
253 return cfi_cmdset_0002(map, primary);
257 return cfi_cmdset_0020(map, primary);
260 return cfi_cmdset_unknown(map, primary);