Lines Matching refs:cfi
18 struct cfi_private *cfi);
23 struct cfi_private *cfi; in mtd_do_chip_probe() local
26 cfi = genprobe_ident_chips(map, cp); in mtd_do_chip_probe()
28 if (!cfi) in mtd_do_chip_probe()
31 map->fldrv_priv = cfi; in mtd_do_chip_probe()
43 kfree(cfi->cfiq); in mtd_do_chip_probe()
44 kfree(cfi); in mtd_do_chip_probe()
54 struct cfi_private cfi; in genprobe_ident_chips() local
59 memset(&cfi, 0, sizeof(cfi)); in genprobe_ident_chips()
63 if (!genprobe_new_chip(map, cp, &cfi)) { in genprobe_ident_chips()
74 if (cfi.cfiq->NumEraseRegions == 0) { in genprobe_ident_chips()
76 kfree(cfi.cfiq); in genprobe_ident_chips()
82 cfi.chipshift = cfi.cfiq->DevSize; in genprobe_ident_chips()
84 switch(cfi.interleave) { in genprobe_ident_chips()
91 cfi.chipshift++; in genprobe_ident_chips()
96 cfi.chipshift+=2; in genprobe_ident_chips()
103 cfi.numchips = 1; in genprobe_ident_chips()
117 for (base = (1<<cfi.chipshift); base + (1<<cfi.chipshift) <= map->size; in genprobe_ident_chips()
118 base += (1<<cfi.chipshift)) in genprobe_ident_chips()
119 cp->probe_chip(map, base, &chip[0], &cfi); in genprobe_ident_chips()
126 retcfi = kmalloc(sizeof(struct cfi_private) + cfi.numchips * sizeof(struct flchip), GFP_KERNEL); in genprobe_ident_chips()
130 kfree(cfi.cfiq); in genprobe_ident_chips()
134 memcpy(retcfi, &cfi, sizeof(cfi)); in genprobe_ident_chips()
135 memcpy(&retcfi->chips[0], chip, sizeof(struct flchip) * cfi.numchips); in genprobe_ident_chips()
149 struct cfi_private *cfi) in genprobe_new_chip() argument
154 cfi->interleave = CFIDEV_INTERLEAVE_1; in genprobe_new_chip()
156 cfi->device_type = CFI_DEVICETYPE_X8; in genprobe_new_chip()
157 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
160 cfi->device_type = CFI_DEVICETYPE_X16; in genprobe_new_chip()
161 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
169 cfi->interleave = CFIDEV_INTERLEAVE_1; in genprobe_new_chip()
171 cfi->device_type = CFI_DEVICETYPE_X16; in genprobe_new_chip()
172 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
176 cfi->interleave = CFIDEV_INTERLEAVE_2; in genprobe_new_chip()
178 cfi->device_type = CFI_DEVICETYPE_X8; in genprobe_new_chip()
179 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
182 cfi->device_type = CFI_DEVICETYPE_X16; in genprobe_new_chip()
183 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
192 cfi->interleave = CFIDEV_INTERLEAVE_1; in genprobe_new_chip()
194 cfi->device_type = CFI_DEVICETYPE_X32; in genprobe_new_chip()
195 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
199 cfi->interleave = CFIDEV_INTERLEAVE_2; in genprobe_new_chip()
202 cfi->device_type = CFI_DEVICETYPE_X32; in genprobe_new_chip()
203 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
206 cfi->device_type = CFI_DEVICETYPE_X16; in genprobe_new_chip()
207 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
210 cfi->device_type = CFI_DEVICETYPE_X8; in genprobe_new_chip()
211 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
215 cfi->interleave = CFIDEV_INTERLEAVE_4; in genprobe_new_chip()
218 cfi->device_type = CFI_DEVICETYPE_X32; in genprobe_new_chip()
219 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
222 cfi->device_type = CFI_DEVICETYPE_X16; in genprobe_new_chip()
223 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
226 cfi->device_type = CFI_DEVICETYPE_X8; in genprobe_new_chip()
227 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
236 cfi->interleave = CFIDEV_INTERLEAVE_2; in genprobe_new_chip()
238 cfi->device_type = CFI_DEVICETYPE_X32; in genprobe_new_chip()
239 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
243 cfi->interleave = CFIDEV_INTERLEAVE_4; in genprobe_new_chip()
246 cfi->device_type = CFI_DEVICETYPE_X32; in genprobe_new_chip()
247 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
250 cfi->device_type = CFI_DEVICETYPE_X16; in genprobe_new_chip()
251 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
255 cfi->interleave = CFIDEV_INTERLEAVE_8; in genprobe_new_chip()
257 cfi->device_type = CFI_DEVICETYPE_X16; in genprobe_new_chip()
258 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
261 cfi->device_type = CFI_DEVICETYPE_X8; in genprobe_new_chip()
262 if (cp->probe_chip(map, 0, NULL, cfi)) in genprobe_new_chip()
285 struct cfi_private *cfi = map->fldrv_priv; in cfi_cmdset_unknown() local
286 __u16 type = primary?cfi->cfiq->P_ID:cfi->cfiq->A_ID; in cfi_cmdset_unknown()
312 struct cfi_private *cfi = map->fldrv_priv; in check_cmd_set() local
313 __u16 type = primary?cfi->cfiq->P_ID:cfi->cfiq->A_ID; in check_cmd_set()