Lines Matching +full:interleave +full:- +full:mode
44 unsigned interleave = cfi_interleave(cfi); in cfi_build_cmd_addr() local
45 unsigned type = cfi->device_type; in cfi_build_cmd_addr()
48 addr = (cmd_ofs * type) * interleave; in cfi_build_cmd_addr()
50 /* Modify the unlock address if we are in compatibility mode. in cfi_build_cmd_addr()
55 if (((type * interleave) > bankwidth) && ((cmd_ofs & 0xff) == 0xaa)) in cfi_build_cmd_addr()
56 addr |= (type >> 1)*interleave; in cfi_build_cmd_addr()
63 * Transforms the CFI command for the given geometry (bus width & interleave).
89 /* First, determine what the bit-pattern should be for a single in cfi_build_cmd()
90 device, according to chip mode and endianness... */ in cfi_build_cmd()
123 /* And finally, for the multi-word case, replicate it in cfi_build_cmd()
179 /* Last, determine what the bit-pattern should be for a single in cfi_merge_status()
180 device, according to chip mode and endianness... */ in cfi_merge_status()
200 * If prev_val is non-null, it will be set to the value at the command address,
216 return addr - base; in cfi_send_gen_cmd()
223 int osf = cfi->interleave * cfi->device_type; /* scale factor */ in cfi_qry_present()
251 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
252 cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
257 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
258 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
259 cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
263 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
264 cfi_send_gen_cmd(0x98, 0x555, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
268 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
269 cfi_send_gen_cmd(0xAA, 0x5555, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
270 cfi_send_gen_cmd(0x55, 0x2AAA, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
271 cfi_send_gen_cmd(0x98, 0x5555, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
275 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
276 cfi_send_gen_cmd(0xAA, 0x555, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
277 cfi_send_gen_cmd(0x55, 0x2AA, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
278 cfi_send_gen_cmd(0x98, 0x555, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
289 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_off()
290 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_off()
292 when exit qry mode */ in cfi_qry_mode_off()
293 if ((cfi->mfr == CFI_MFR_ST) && (cfi->id == 0x227E || cfi->id == 0x7E)) in cfi_qry_mode_off()
294 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_off()
301 struct cfi_private *cfi = map->fldrv_priv; in cfi_read_pri()
302 __u32 base = 0; // cfi->chips[0].start; in cfi_read_pri()
303 int ofs_factor = cfi->interleave * cfi->device_type; in cfi_read_pri()
320 /* Switch it into Query Mode */ in cfi_read_pri()
328 /* Make sure it returns to read mode */ in cfi_read_pri()
344 struct map_info *map = mtd->priv; in cfi_fixup()
345 struct cfi_private *cfi = map->fldrv_priv; in cfi_fixup()
348 for (f=fixups; f->fixup; f++) { in cfi_fixup()
349 if (((f->mfr == CFI_MFR_ANY) || (f->mfr == cfi->mfr)) && in cfi_fixup()
350 ((f->id == CFI_ID_ANY) || (f->id == cfi->id))) { in cfi_fixup()
351 f->fixup(mtd); in cfi_fixup()
361 struct map_info *map = mtd->priv; in cfi_varsize_frob()
362 struct cfi_private *cfi = map->fldrv_priv; in cfi_varsize_frob()
366 struct mtd_erase_region_info *regions = mtd->eraseregions; in cfi_varsize_frob()
380 while (i < mtd->numeraseregions && ofs >= regions[i].offset) in cfi_varsize_frob()
382 i--; in cfi_varsize_frob()
390 if (ofs & (regions[i].erasesize-1)) in cfi_varsize_frob()
391 return -EINVAL; in cfi_varsize_frob()
400 while (i<mtd->numeraseregions && (ofs + len) >= regions[i].offset) in cfi_varsize_frob()
406 i--; in cfi_varsize_frob()
408 if ((ofs + len) & (regions[i].erasesize-1)) in cfi_varsize_frob()
409 return -EINVAL; in cfi_varsize_frob()
411 chipnum = ofs >> cfi->chipshift; in cfi_varsize_frob()
412 adr = ofs - (chipnum << cfi->chipshift); in cfi_varsize_frob()
419 ret = (*frob)(map, &cfi->chips[chipnum], adr, size, thunk); in cfi_varsize_frob()
426 len -= size; in cfi_varsize_frob()
431 if (adr >> cfi->chipshift) { in cfi_varsize_frob()
435 if (chipnum >= cfi->numchips) in cfi_varsize_frob()