Lines Matching refs:cfi

24 #include <linux/mtd/cfi.h>
27 struct cfi_private *cfi)
29 int osf = cfi->interleave * cfi->device_type; /* scale factor */
33 qry[0] = cfi_build_cmd('Q', map, cfi);
34 qry[1] = cfi_build_cmd('R', map, cfi);
35 qry[2] = cfi_build_cmd('Y', map, cfi);
55 struct cfi_private *cfi)
57 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
58 cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL);
59 if (cfi_qry_present(map, base, cfi))
63 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
64 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
65 cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL);
66 if (cfi_qry_present(map, base, cfi))
69 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
70 cfi_send_gen_cmd(0x98, 0x555, base, map, cfi, cfi->device_type, NULL);
71 if (cfi_qry_present(map, base, cfi))
74 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
75 cfi_send_gen_cmd(0xAA, 0x5555, base, map, cfi, cfi->device_type, NULL);
76 cfi_send_gen_cmd(0x55, 0x2AAA, base, map, cfi, cfi->device_type, NULL);
77 cfi_send_gen_cmd(0x98, 0x5555, base, map, cfi, cfi->device_type, NULL);
78 if (cfi_qry_present(map, base, cfi))
81 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
82 cfi_send_gen_cmd(0xAA, 0x555, base, map, cfi, cfi->device_type, NULL);
83 cfi_send_gen_cmd(0x55, 0x2AA, base, map, cfi, cfi->device_type, NULL);
84 cfi_send_gen_cmd(0x98, 0x555, base, map, cfi, cfi->device_type, NULL);
85 if (cfi_qry_present(map, base, cfi))
93 struct cfi_private *cfi)
95 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
96 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
99 if ((cfi->mfr == CFI_MFR_ST) && (cfi->id == 0x227E || cfi->id == 0x7E))
100 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
107 struct cfi_private *cfi = map->fldrv_priv;
108 __u32 base = 0; // cfi->chips[0].start;
109 int ofs_factor = cfi->interleave * cfi->device_type;
129 cfi_qry_mode_on(base, map, cfi);
137 cfi_qry_mode_off(base, map, cfi);
153 struct cfi_private *cfi = map->fldrv_priv;
157 if (((f->mfr == CFI_MFR_ANY) || (f->mfr == cfi->mfr)) &&
158 ((f->id == CFI_ID_ANY) || (f->id == cfi->id))) {
170 struct cfi_private *cfi = map->fldrv_priv;
219 chipnum = ofs >> cfi->chipshift;
220 adr = ofs - (chipnum << cfi->chipshift);
227 ret = (*frob)(map, &cfi->chips[chipnum], adr, size, thunk);
239 if (adr >> cfi->chipshift) {
243 if (chipnum >= cfi->numchips)