• Home
  • Raw
  • Download

Lines Matching refs:cfi

41 				struct map_info *map, struct cfi_private *cfi)  in cfi_build_cmd_addr()  argument
44 unsigned interleave = cfi_interleave(cfi); in cfi_build_cmd_addr()
45 unsigned type = cfi->device_type; in cfi_build_cmd_addr()
67 map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cfi_private *cfi) in cfi_build_cmd() argument
86 chip_mode = map_bankwidth(map) / cfi_interleave(cfi); in cfi_build_cmd()
87 chips_per_word = wordwidth * cfi_interleave(cfi) / map_bankwidth(map); in cfi_build_cmd()
134 struct cfi_private *cfi) in cfi_merge_status() argument
152 chip_mode = map_bankwidth(map) / cfi_interleave(cfi); in cfi_merge_status()
153 chips_per_word = wordwidth * cfi_interleave(cfi) / map_bankwidth(map); in cfi_merge_status()
204 struct map_info *map, struct cfi_private *cfi, in cfi_send_gen_cmd() argument
208 uint32_t addr = base + cfi_build_cmd_addr(cmd_addr, map, cfi); in cfi_send_gen_cmd()
209 val = cfi_build_cmd(cmd, map, cfi); in cfi_send_gen_cmd()
221 struct cfi_private *cfi) in cfi_qry_present() argument
223 int osf = cfi->interleave * cfi->device_type; /* scale factor */ in cfi_qry_present()
227 qry[0] = cfi_build_cmd('Q', map, cfi); in cfi_qry_present()
228 qry[1] = cfi_build_cmd('R', map, cfi); in cfi_qry_present()
229 qry[2] = cfi_build_cmd('Y', map, cfi); in cfi_qry_present()
249 struct cfi_private *cfi) in cfi_qry_mode_on() argument
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()
253 if (cfi_qry_present(map, base, cfi)) 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()
260 if (cfi_qry_present(map, base, cfi)) 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()
265 if (cfi_qry_present(map, base, cfi)) 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()
272 if (cfi_qry_present(map, base, cfi)) 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()
279 if (cfi_qry_present(map, base, cfi)) in cfi_qry_mode_on()
287 struct cfi_private *cfi) in cfi_qry_mode_off() argument
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()
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() local
303 int ofs_factor = cfi->interleave * cfi->device_type; in cfi_read_pri()
321 cfi_qry_mode_on(base, map, cfi); in cfi_read_pri()
329 cfi_qry_mode_off(base, map, cfi); in cfi_read_pri()
345 struct cfi_private *cfi = map->fldrv_priv; in cfi_fixup() local
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()
362 struct cfi_private *cfi = map->fldrv_priv; in cfi_varsize_frob() local
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()
431 if (adr >> cfi->chipshift) { in cfi_varsize_frob()
435 if (chipnum >= cfi->numchips) in cfi_varsize_frob()