/linux-4.4.14/fs/coda/ |
H A D | file.c | 33 struct coda_file_info *cfi = CODA_FTOC(coda_file); coda_file_read_iter() local 35 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); coda_file_read_iter() 37 return vfs_iter_read(cfi->cfi_container, to, &iocb->ki_pos); coda_file_read_iter() 47 struct coda_file_info *cfi; coda_file_splice_read() local 50 cfi = CODA_FTOC(coda_file); coda_file_splice_read() 51 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); coda_file_splice_read() 52 host_file = cfi->cfi_container; coda_file_splice_read() 66 struct coda_file_info *cfi = CODA_FTOC(coda_file); coda_file_write_iter() local 70 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); coda_file_write_iter() 72 host_file = cfi->cfi_container; coda_file_write_iter() 75 ret = vfs_iter_write(cfi->cfi_container, to, &iocb->ki_pos); coda_file_write_iter() 87 struct coda_file_info *cfi; coda_file_mmap() local 92 cfi = CODA_FTOC(coda_file); coda_file_mmap() 93 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); coda_file_mmap() 94 host_file = cfi->cfi_container; coda_file_mmap() 117 cfi->cfi_mapcount++; coda_file_mmap() 129 struct coda_file_info *cfi; coda_open() local 131 cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL); coda_open() 132 if (!cfi) coda_open() 141 kfree(cfi); coda_open() 147 cfi->cfi_magic = CODA_MAGIC; coda_open() 148 cfi->cfi_mapcount = 0; coda_open() 149 cfi->cfi_container = host_file; coda_open() 152 coda_file->private_data = cfi; coda_open() 160 struct coda_file_info *cfi; coda_release() local 165 cfi = CODA_FTOC(coda_file); coda_release() 166 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); coda_release() 171 host_inode = file_inode(cfi->cfi_container); coda_release() 177 cii->c_mapcount -= cfi->cfi_mapcount; coda_release() 183 fput(cfi->cfi_container); coda_release() 196 struct coda_file_info *cfi; coda_fsync() local 208 cfi = CODA_FTOC(coda_file); coda_fsync() 209 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); coda_fsync() 210 host_file = cfi->cfi_container; coda_fsync()
|
H A D | dir.c | 344 struct coda_file_info *cfi; coda_venus_readdir() local 354 cfi = CODA_FTOC(coda_file); coda_venus_readdir() 355 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); coda_venus_readdir() 356 host_file = cfi->cfi_container; coda_venus_readdir() 419 struct coda_file_info *cfi; coda_readdir() local 423 cfi = CODA_FTOC(coda_file); coda_readdir() 424 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); coda_readdir() 425 host_file = cfi->cfi_container; coda_readdir()
|
/linux-4.4.14/drivers/mtd/chips/ |
H A D | cfi_util.c | 24 #include <linux/mtd/cfi.h> 41 struct map_info *map, struct cfi_private *cfi) cfi_build_cmd_addr() 44 unsigned interleave = cfi_interleave(cfi); cfi_build_cmd_addr() 45 unsigned type = cfi->device_type; cfi_build_cmd_addr() 67 map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cfi_private *cfi) cfi_build_cmd() argument 86 chip_mode = map_bankwidth(map) / cfi_interleave(cfi); cfi_build_cmd() 87 chips_per_word = wordwidth * cfi_interleave(cfi) / map_bankwidth(map); cfi_build_cmd() 131 struct cfi_private *cfi) cfi_merge_status() 149 chip_mode = map_bankwidth(map) / cfi_interleave(cfi); cfi_merge_status() 150 chips_per_word = wordwidth * cfi_interleave(cfi) / map_bankwidth(map); cfi_merge_status() 198 struct map_info *map, struct cfi_private *cfi, cfi_send_gen_cmd() 202 uint32_t addr = base + cfi_build_cmd_addr(cmd_addr, map, cfi); cfi_send_gen_cmd() 203 val = cfi_build_cmd(cmd, map, cfi); cfi_send_gen_cmd() 215 struct cfi_private *cfi) cfi_qry_present() 217 int osf = cfi->interleave * cfi->device_type; /* scale factor */ cfi_qry_present() 221 qry[0] = cfi_build_cmd('Q', map, cfi); cfi_qry_present() 222 qry[1] = cfi_build_cmd('R', map, cfi); cfi_qry_present() 223 qry[2] = cfi_build_cmd('Y', map, cfi); cfi_qry_present() 243 struct cfi_private *cfi) cfi_qry_mode_on() 245 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 246 cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 247 if (cfi_qry_present(map, base, cfi)) cfi_qry_mode_on() 251 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 252 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 253 cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 254 if (cfi_qry_present(map, base, cfi)) cfi_qry_mode_on() 257 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 258 cfi_send_gen_cmd(0x98, 0x555, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 259 if (cfi_qry_present(map, base, cfi)) cfi_qry_mode_on() 262 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 263 cfi_send_gen_cmd(0xAA, 0x5555, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 264 cfi_send_gen_cmd(0x55, 0x2AAA, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 265 cfi_send_gen_cmd(0x98, 0x5555, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 266 if (cfi_qry_present(map, base, cfi)) cfi_qry_mode_on() 269 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 270 cfi_send_gen_cmd(0xAA, 0x555, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 271 cfi_send_gen_cmd(0x55, 0x2AA, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 272 cfi_send_gen_cmd(0x98, 0x555, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_on() 273 if (cfi_qry_present(map, base, cfi)) cfi_qry_mode_on() 281 struct cfi_private *cfi) cfi_qry_mode_off() 283 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_off() 284 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_off() 287 if ((cfi->mfr == CFI_MFR_ST) && (cfi->id == 0x227E || cfi->id == 0x7E)) cfi_qry_mode_off() 288 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); cfi_qry_mode_off() 295 struct cfi_private *cfi = map->fldrv_priv; cfi_read_pri() local 296 __u32 base = 0; // cfi->chips[0].start; cfi_read_pri() 297 int ofs_factor = cfi->interleave * cfi->device_type; cfi_read_pri() 315 cfi_qry_mode_on(base, map, cfi); cfi_read_pri() 323 cfi_qry_mode_off(base, map, cfi); cfi_read_pri() 339 struct cfi_private *cfi = map->fldrv_priv; cfi_fixup() local 343 if (((f->mfr == CFI_MFR_ANY) || (f->mfr == cfi->mfr)) && cfi_fixup() 344 ((f->id == CFI_ID_ANY) || (f->id == cfi->id))) { cfi_fixup() 356 struct cfi_private *cfi = map->fldrv_priv; cfi_varsize_frob() local 405 chipnum = ofs >> cfi->chipshift; cfi_varsize_frob() 406 adr = ofs - (chipnum << cfi->chipshift); cfi_varsize_frob() 413 ret = (*frob)(map, &cfi->chips[chipnum], adr, size, thunk); cfi_varsize_frob() 425 if (adr >> cfi->chipshift) { cfi_varsize_frob() 429 if (chipnum >= cfi->numchips) cfi_varsize_frob() 40 cfi_build_cmd_addr(uint32_t cmd_ofs, struct map_info *map, struct cfi_private *cfi) cfi_build_cmd_addr() argument 130 cfi_merge_status(map_word val, struct map_info *map, struct cfi_private *cfi) cfi_merge_status() argument 197 cfi_send_gen_cmd(u_char cmd, uint32_t cmd_addr, uint32_t base, struct map_info *map, struct cfi_private *cfi, int type, map_word *prev_val) cfi_send_gen_cmd() argument 214 cfi_qry_present(struct map_info *map, __u32 base, struct cfi_private *cfi) cfi_qry_present() argument 242 cfi_qry_mode_on(uint32_t base, struct map_info *map, struct cfi_private *cfi) cfi_qry_mode_on() argument 280 cfi_qry_mode_off(uint32_t base, struct map_info *map, struct cfi_private *cfi) cfi_qry_mode_off() argument
|
H A D | gen_probe.c | 12 #include <linux/mtd/cfi.h> 19 struct cfi_private *cfi); 24 struct cfi_private *cfi; mtd_do_chip_probe() local 27 cfi = genprobe_ident_chips(map, cp); mtd_do_chip_probe() 29 if (!cfi) mtd_do_chip_probe() 32 map->fldrv_priv = cfi; mtd_do_chip_probe() 51 kfree(cfi->cfiq); mtd_do_chip_probe() 52 kfree(cfi); mtd_do_chip_probe() 61 struct cfi_private cfi; genprobe_ident_chips() local 67 memset(&cfi, 0, sizeof(cfi)); genprobe_ident_chips() 71 if (!genprobe_new_chip(map, cp, &cfi)) { genprobe_ident_chips() 82 if (cfi.cfiq->NumEraseRegions == 0) { genprobe_ident_chips() 84 kfree(cfi.cfiq); genprobe_ident_chips() 88 cfi.chipshift = cfi.cfiq->DevSize; genprobe_ident_chips() 90 if (cfi_interleave_is_1(&cfi)) { genprobe_ident_chips() 92 } else if (cfi_interleave_is_2(&cfi)) { genprobe_ident_chips() 93 cfi.chipshift++; genprobe_ident_chips() 94 } else if (cfi_interleave_is_4((&cfi))) { genprobe_ident_chips() 95 cfi.chipshift += 2; genprobe_ident_chips() 96 } else if (cfi_interleave_is_8(&cfi)) { genprobe_ident_chips() 97 cfi.chipshift += 3; genprobe_ident_chips() 102 cfi.numchips = 1; genprobe_ident_chips() 108 max_chips = map->size >> cfi.chipshift; genprobe_ident_chips() 117 kfree(cfi.cfiq); genprobe_ident_chips() 130 cp->probe_chip(map, i << cfi.chipshift, chip_map, &cfi); genprobe_ident_chips() 138 retcfi = kmalloc(sizeof(struct cfi_private) + cfi.numchips * sizeof(struct flchip), GFP_KERNEL); genprobe_ident_chips() 141 kfree(cfi.cfiq); genprobe_ident_chips() 146 memcpy(retcfi, &cfi, sizeof(cfi)); genprobe_ident_chips() 147 memset(&retcfi->chips[0], 0, sizeof(struct flchip) * cfi.numchips); genprobe_ident_chips() 149 for (i = 0, j = 0; (j < cfi.numchips) && (i < max_chips); i++) { genprobe_ident_chips() 153 pchip->start = (i << cfi.chipshift); genprobe_ident_chips() 166 struct cfi_private *cfi) genprobe_new_chip() 177 cfi->interleave = nr_chips; genprobe_new_chip() 184 cfi->device_type = type; genprobe_new_chip() 186 if (cp->probe_chip(map, 0, NULL, cfi)) genprobe_new_chip() 202 struct cfi_private *cfi = map->fldrv_priv; cfi_cmdset_unknown() local 203 __u16 type = primary?cfi->cfiq->P_ID:cfi->cfiq->A_ID; cfi_cmdset_unknown() 232 struct cfi_private *cfi = map->fldrv_priv; check_cmd_set() local 233 __u16 type = primary?cfi->cfiq->P_ID:cfi->cfiq->A_ID; check_cmd_set() 165 genprobe_new_chip(struct map_info *map, struct chip_probe *cp, struct cfi_private *cfi) genprobe_new_chip() argument
|
H A D | cfi_probe.c | 18 #include <linux/mtd/cfi.h> 28 unsigned long *chip_map, struct cfi_private *cfi); 29 static int cfi_chip_setup(struct map_info *map, struct cfi_private *cfi); 45 #define xip_enable(base, map, cfi) \ 47 cfi_qry_mode_off(base, map, cfi); \ 51 #define xip_disable_qry(base, map, cfi) \ 54 cfi_qry_mode_on(base, map, cfi); \ 61 #define xip_enable(base, map, cfi) do { } while (0) 62 #define xip_disable_qry(base, map, cfi) do { } while (0) 72 unsigned long *chip_map, struct cfi_private *cfi) cfi_probe_chip() 90 if (!cfi_qry_mode_on(base, map, cfi)) { cfi_probe_chip() 91 xip_enable(base, map, cfi); cfi_probe_chip() 95 if (!cfi->numchips) { cfi_probe_chip() 98 return cfi_chip_setup(map, cfi); cfi_probe_chip() 102 for (i=0; i < (base >> cfi->chipshift); i++) { cfi_probe_chip() 108 start = i << cfi->chipshift; cfi_probe_chip() 111 if (cfi_qry_present(map, start, cfi)) { cfi_probe_chip() 114 cfi_qry_mode_off(start, map, cfi); cfi_probe_chip() 117 if (!cfi_qry_present(map, start, cfi)) { cfi_probe_chip() 127 cfi_qry_mode_off(base, map, cfi); cfi_probe_chip() 129 if (cfi_qry_present(map, base, cfi)) { cfi_probe_chip() 140 set_bit((base >> cfi->chipshift), chip_map); /* Update chip map */ cfi_probe_chip() 141 cfi->numchips++; cfi_probe_chip() 144 cfi_qry_mode_off(base, map, cfi); cfi_probe_chip() 148 map->name, cfi->interleave, cfi->device_type*8, base, cfi_probe_chip() 155 struct cfi_private *cfi) cfi_chip_setup() 157 int ofs_factor = cfi->interleave*cfi->device_type; cfi_chip_setup() 163 xip_enable(base, map, cfi); cfi_chip_setup() 170 cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); cfi_chip_setup() 171 if (!cfi->cfiq) cfi_chip_setup() 174 memset(cfi->cfiq,0,sizeof(struct cfi_ident)); cfi_chip_setup() 176 cfi->cfi_mode = CFI_MODE_CFI; cfi_chip_setup() 178 cfi->sector_erase_cmd = CMD(0x30); cfi_chip_setup() 181 xip_disable_qry(base, map, cfi); cfi_chip_setup() 183 ((unsigned char *)cfi->cfiq)[i] = cfi_read_query(map,base + (0x10 + i)*ofs_factor); cfi_chip_setup() 186 cfi->cfiq->P_ID = le16_to_cpu(cfi->cfiq->P_ID); cfi_chip_setup() 188 cfi->cfiq->P_ADR = le16_to_cpu(cfi->cfiq->P_ADR); cfi_chip_setup() 189 cfi->cfiq->A_ID = le16_to_cpu(cfi->cfiq->A_ID); cfi_chip_setup() 190 cfi->cfiq->A_ADR = le16_to_cpu(cfi->cfiq->A_ADR); cfi_chip_setup() 191 cfi->cfiq->InterfaceDesc = le16_to_cpu(cfi->cfiq->InterfaceDesc); cfi_chip_setup() 192 cfi->cfiq->MaxBufWriteSize = le16_to_cpu(cfi->cfiq->MaxBufWriteSize); cfi_chip_setup() 196 print_cfi_ident(cfi->cfiq); cfi_chip_setup() 199 for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { cfi_chip_setup() 200 cfi->cfiq->EraseRegionInfo[i] = le32_to_cpu(cfi->cfiq->EraseRegionInfo[i]); cfi_chip_setup() 204 i, (cfi->cfiq->EraseRegionInfo[i] >> 8) & ~0xff, cfi_chip_setup() 205 (cfi->cfiq->EraseRegionInfo[i] & 0xffff) + 1); cfi_chip_setup() 209 if (cfi->cfiq->P_ID == P_ID_SST_OLD) { cfi_chip_setup() 222 cfi_send_gen_cmd(0xf0, 0, base, map, cfi, cfi->device_type, NULL); cfi_chip_setup() 223 cfi_send_gen_cmd(0xaa, addr_unlock1, base, map, cfi, cfi->device_type, NULL); cfi_chip_setup() 224 cfi_send_gen_cmd(0x55, addr_unlock2, base, map, cfi, cfi->device_type, NULL); cfi_chip_setup() 225 cfi_send_gen_cmd(0x90, addr_unlock1, base, map, cfi, cfi->device_type, NULL); cfi_chip_setup() 226 cfi->mfr = cfi_read_query16(map, base); cfi_chip_setup() 227 cfi->id = cfi_read_query16(map, base + ofs_factor); cfi_chip_setup() 230 if (cfi->mfr == CFI_MFR_AMD && (cfi->id & 0xff) == 0x7e) cfi_chip_setup() 231 cfi->id = cfi_read_query(map, base + 0xe * ofs_factor) << 8 | cfi_chip_setup() 235 cfi_qry_mode_off(base, map, cfi); cfi_chip_setup() 239 map->name, cfi->interleave, cfi->device_type*8, base, cfi_chip_setup() 240 map->bankwidth*8, cfi->mfr, cfi->id); cfi_chip_setup() 71 cfi_probe_chip(struct map_info *map, __u32 base, unsigned long *chip_map, struct cfi_private *cfi) cfi_probe_chip() argument 154 cfi_chip_setup(struct map_info *map, struct cfi_private *cfi) cfi_chip_setup() argument
|
H A D | cfi_cmdset_0002.c | 39 #include <linux/mtd/cfi.h> 159 struct cfi_private *cfi = map->fldrv_priv; fixup_amd_bootblock() local 160 struct cfi_pri_amdstd *extp = cfi->cmdset_priv; fixup_amd_bootblock() 168 map->name, cfi->mfr, cfi->id); fixup_amd_bootblock() 175 if (((cfi->id == 0xBA) || (cfi->id == 0x22BA)) && fixup_amd_bootblock() 186 (cfi->mfr == CFI_MFR_MACRONIX)) { fixup_amd_bootblock() 191 if (cfi->id & 0x80) { fixup_amd_bootblock() 192 printk(KERN_WARNING "%s: JEDEC Device ID is 0x%02X. Assuming broken CFI table.\n", map->name, cfi->id); fixup_amd_bootblock() 208 struct cfi_private *cfi = map->fldrv_priv; fixup_use_write_buffers() local 209 if (cfi->cfiq->BufWriteTimeoutTyp) { fixup_use_write_buffers() 219 struct cfi_private *cfi = map->fldrv_priv; fixup_convert_atmel_pri() local 220 struct cfi_pri_amdstd *extp = cfi->cmdset_priv; fixup_convert_atmel_pri() 230 if (cfi->id == AT49BV6416) { fixup_convert_atmel_pri() 243 cfi->cfiq->BufWriteTimeoutTyp = 0; fixup_convert_atmel_pri() 244 cfi->cfiq->BufWriteTimeoutMax = 0; fixup_convert_atmel_pri() 257 struct cfi_private *cfi = map->fldrv_priv; fixup_use_erase_chip() local 258 if ((cfi->cfiq->NumEraseRegions == 1) && fixup_use_erase_chip() 259 ((cfi->cfiq->EraseRegionInfo[0] & 0xffff) == 0)) { fixup_use_erase_chip() 279 struct cfi_private *cfi = map->fldrv_priv; fixup_old_sst_eraseregion() local 287 cfi->cfiq->NumEraseRegions = 1; fixup_old_sst_eraseregion() 293 struct cfi_private *cfi = map->fldrv_priv; fixup_sst39vf() local 297 cfi->addr_unlock1 = 0x5555; fixup_sst39vf() 298 cfi->addr_unlock2 = 0x2AAA; fixup_sst39vf() 304 struct cfi_private *cfi = map->fldrv_priv; fixup_sst39vf_rev_b() local 308 cfi->addr_unlock1 = 0x555; fixup_sst39vf_rev_b() 309 cfi->addr_unlock2 = 0x2AA; fixup_sst39vf_rev_b() 311 cfi->sector_erase_cmd = CMD(0x50); fixup_sst39vf_rev_b() 317 struct cfi_private *cfi = map->fldrv_priv; fixup_sst38vf640x_sectorsize() local 325 cfi->cfiq->EraseRegionInfo[0] = 0x002003ff; fixup_sst38vf640x_sectorsize() 332 struct cfi_private *cfi = map->fldrv_priv; fixup_s29gl064n_sectors() local 334 if ((cfi->cfiq->EraseRegionInfo[0] & 0xffff) == 0x003f) { fixup_s29gl064n_sectors() 335 cfi->cfiq->EraseRegionInfo[0] |= 0x0040; fixup_s29gl064n_sectors() 343 struct cfi_private *cfi = map->fldrv_priv; fixup_s29gl032n_sectors() local 345 if ((cfi->cfiq->EraseRegionInfo[1] & 0xffff) == 0x007e) { fixup_s29gl032n_sectors() 346 cfi->cfiq->EraseRegionInfo[1] &= ~0x0040; fixup_s29gl032n_sectors() 354 struct cfi_private *cfi = map->fldrv_priv; fixup_s29ns512p_sectors() local 360 cfi->cfiq->EraseRegionInfo[0] = 0x020001ff; fixup_s29ns512p_sectors() 423 static void cfi_fixup_major_minor(struct cfi_private *cfi, cfi_fixup_major_minor() argument 426 if (cfi->mfr == CFI_MFR_SAMSUNG) { cfi_fixup_major_minor() 444 if (cfi->mfr == CFI_MFR_SST && (cfi->id >> 4) == 0x0536) { cfi_fixup_major_minor() 450 static int is_m29ew(struct cfi_private *cfi) is_m29ew() argument 452 if (cfi->mfr == CFI_MFR_INTEL && is_m29ew() 453 ((cfi->device_type == CFI_DEVICETYPE_X8 && (cfi->id & 0xff) == 0x7e) || is_m29ew() 454 (cfi->device_type == CFI_DEVICETYPE_X16 && cfi->id == 0x227e))) is_m29ew() 472 struct cfi_private *cfi = map->fldrv_priv; cfi_fixup_m29ew_erase_suspend() local 474 if (is_m29ew(cfi)) cfi_fixup_m29ew_erase_suspend() 502 static void cfi_fixup_m29ew_delay_after_resume(struct cfi_private *cfi) cfi_fixup_m29ew_delay_after_resume() argument 508 if (is_m29ew(cfi)) cfi_fixup_m29ew_delay_after_resume() 514 struct cfi_private *cfi = map->fldrv_priv; cfi_cmdset_0002() local 541 mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; cfi_cmdset_0002() 549 if (cfi->cfi_mode==CFI_MODE_CFI){ cfi_cmdset_0002() 551 __u16 adr = primary?cfi->cfiq->P_ADR:cfi->cfiq->A_ADR; cfi_cmdset_0002() 560 cfi_fixup_major_minor(cfi, extp); cfi_cmdset_0002() 584 cfi->cmdset_priv = extp; cfi_cmdset_0002() 586 /* Apply cfi device specific fixups */ cfi_cmdset_0002() 613 if (bootloc == 3 && cfi->cfiq->NumEraseRegions > 1) { cfi_cmdset_0002() 616 for (i=0; i<cfi->cfiq->NumEraseRegions / 2; i++) { cfi_cmdset_0002() 617 int j = (cfi->cfiq->NumEraseRegions-1)-i; cfi_cmdset_0002() 620 swap = cfi->cfiq->EraseRegionInfo[i]; cfi_cmdset_0002() 621 cfi->cfiq->EraseRegionInfo[i] = cfi->cfiq->EraseRegionInfo[j]; cfi_cmdset_0002() 622 cfi->cfiq->EraseRegionInfo[j] = swap; cfi_cmdset_0002() 626 cfi->addr_unlock1 = 0x555; cfi_cmdset_0002() 627 cfi->addr_unlock2 = 0x2aa; cfi_cmdset_0002() 631 if (!cfi->addr_unlock1 || !cfi->addr_unlock2) { cfi_cmdset_0002() 637 else if (cfi->cfi_mode == CFI_MODE_JEDEC) { cfi_cmdset_0002() 644 for (i=0; i< cfi->numchips; i++) { cfi_cmdset_0002() 645 cfi->chips[i].word_write_time = 1<<cfi->cfiq->WordWriteTimeoutTyp; cfi_cmdset_0002() 646 cfi->chips[i].buffer_write_time = 1<<cfi->cfiq->BufWriteTimeoutTyp; cfi_cmdset_0002() 647 cfi->chips[i].erase_time = 1<<cfi->cfiq->BlockEraseTimeoutTyp; cfi_cmdset_0002() 654 if (cfi->cfiq->BufWriteTimeoutTyp && cfi_cmdset_0002() 655 cfi->cfiq->BufWriteTimeoutMax) cfi_cmdset_0002() 656 cfi->chips[i].buffer_write_time_max = cfi_cmdset_0002() 657 1 << (cfi->cfiq->BufWriteTimeoutTyp + cfi_cmdset_0002() 658 cfi->cfiq->BufWriteTimeoutMax); cfi_cmdset_0002() 660 cfi->chips[i].buffer_write_time_max = 0; cfi_cmdset_0002() 662 cfi->chips[i].buffer_write_time_max = cfi_cmdset_0002() 663 max(cfi->chips[i].buffer_write_time_max, 2000); cfi_cmdset_0002() 665 cfi->chips[i].ref_point_counter = 0; cfi_cmdset_0002() 666 init_waitqueue_head(&(cfi->chips[i].wq)); cfi_cmdset_0002() 682 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_setup() local 683 unsigned long devsize = (1<<cfi->cfiq->DevSize) * cfi->interleave; cfi_amdstd_setup() 688 (cfi->cfi_mode == CFI_MODE_CFI)?"CFI":"JEDEC",cfi->numchips); cfi_amdstd_setup() 690 mtd->size = devsize * cfi->numchips; cfi_amdstd_setup() 692 mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; cfi_amdstd_setup() 698 for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { cfi_amdstd_setup() 700 ersize = ((cfi->cfiq->EraseRegionInfo[i] >> 8) & ~0xff) * cfi->interleave; cfi_amdstd_setup() 701 ernum = (cfi->cfiq->EraseRegionInfo[i] & 0xffff) + 1; cfi_amdstd_setup() 706 for (j=0; j<cfi->numchips; j++) { cfi_amdstd_setup() 707 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].offset = (j*devsize)+offset; cfi_amdstd_setup() 708 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].erasesize = ersize; cfi_amdstd_setup() 709 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].numblocks = ernum; cfi_amdstd_setup() 726 kfree(cfi->cmdset_priv); cfi_amdstd_setup() 727 kfree(cfi->cfiq); cfi_amdstd_setup() 781 struct cfi_private *cfi = map->fldrv_priv; get_chip() local 783 struct cfi_pri_amdstd *cfip = (struct cfi_pri_amdstd *)cfi->cmdset_priv; get_chip() 884 struct cfi_private *cfi = map->fldrv_priv; put_chip() local 890 map_write(map, cfi->sector_erase_cmd, chip->in_progress_block_addr); put_chip() 891 cfi_fixup_m29ew_delay_after_resume(cfi); put_chip() 934 struct cfi_private *cfi = map->fldrv_priv; xip_enable() local 961 struct cfi_private *cfi = map->fldrv_priv; xip_udelay() local 962 struct cfi_pri_amdstd *extp = cfi->cmdset_priv; xip_udelay() 971 (cfi_interleave_is_1(cfi) || chip->oldstate == FL_READY)) { xip_udelay() 1034 map_write(map, cfi->sector_erase_cmd, adr); xip_udelay() 1108 struct cfi_private *cfi = map->fldrv_priv; do_read_onechip() local 1140 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_read() local 1146 chipnum = (from >> cfi->chipshift); cfi_amdstd_read() 1147 ofs = from - (chipnum << cfi->chipshift); cfi_amdstd_read() 1152 if (chipnum >= cfi->numchips) cfi_amdstd_read() 1155 if ((len + ofs -1) >> cfi->chipshift) cfi_amdstd_read() 1156 thislen = (1<<cfi->chipshift) - ofs; cfi_amdstd_read() 1160 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf); cfi_amdstd_read() 1180 struct cfi_private *cfi = map->fldrv_priv; otp_enter() local 1182 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, otp_enter() 1183 cfi->device_type, NULL); otp_enter() 1184 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, otp_enter() 1185 cfi->device_type, NULL); otp_enter() 1186 cfi_send_gen_cmd(0x88, cfi->addr_unlock1, chip->start, map, cfi, otp_enter() 1187 cfi->device_type, NULL); otp_enter() 1195 struct cfi_private *cfi = map->fldrv_priv; otp_exit() local 1197 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, otp_exit() 1198 cfi->device_type, NULL); otp_exit() 1199 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, otp_exit() 1200 cfi->device_type, NULL); otp_exit() 1201 cfi_send_gen_cmd(0x90, cfi->addr_unlock1, chip->start, map, cfi, otp_exit() 1202 cfi->device_type, NULL); otp_exit() 1203 cfi_send_gen_cmd(0x00, cfi->addr_unlock1, chip->start, map, cfi, otp_exit() 1204 cfi->device_type, NULL); otp_exit() 1250 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_secsi_read() local 1263 if (chipnum >= cfi->numchips) cfi_amdstd_secsi_read() 1271 ret = do_read_secsi_onechip(map, &cfi->chips[chipnum], ofs, cfi_amdstd_secsi_read() 1323 struct cfi_private *cfi = map->fldrv_priv; do_otp_lock() local 1341 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, do_otp_lock() 1342 cfi->device_type, NULL); do_otp_lock() 1343 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, do_otp_lock() 1344 cfi->device_type, NULL); do_otp_lock() 1345 cfi_send_gen_cmd(0x40, cfi->addr_unlock1, chip->start, map, cfi, do_otp_lock() 1346 cfi->device_type, NULL); do_otp_lock() 1389 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_otp_walk() local 1390 int ofs_factor = cfi->interleave * cfi->device_type; cfi_amdstd_otp_walk() 1403 for (chipnum = 0; chipnum < cfi->numchips; chipnum++) { cfi_amdstd_otp_walk() 1404 chip = &cfi->chips[chipnum]; cfi_amdstd_otp_walk() 1409 if (is_m29ew(cfi)) { cfi_amdstd_otp_walk() 1420 cfi_qry_mode_on(base, map, cfi); cfi_amdstd_otp_walk() 1422 cfi_qry_mode_off(base, map, cfi); cfi_amdstd_otp_walk() 1443 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, cfi_amdstd_otp_walk() 1444 chip->start, map, cfi, cfi_amdstd_otp_walk() 1445 cfi->device_type, NULL); cfi_amdstd_otp_walk() 1446 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, cfi_amdstd_otp_walk() 1447 chip->start, map, cfi, cfi_amdstd_otp_walk() 1448 cfi->device_type, NULL); cfi_amdstd_otp_walk() 1449 cfi_send_gen_cmd(0x40, cfi->addr_unlock1, cfi_amdstd_otp_walk() 1450 chip->start, map, cfi, cfi_amdstd_otp_walk() 1451 cfi->device_type, NULL); cfi_amdstd_otp_walk() 1552 struct cfi_private *cfi = map->fldrv_priv; do_write_oneword() local 1601 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_write_oneword() 1602 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); do_write_oneword() 1603 cfi_send_gen_cmd(0xA0, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_write_oneword() 1669 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_write_words() local 1675 chipnum = to >> cfi->chipshift; cfi_amdstd_write_words() 1676 ofs = to - (chipnum << cfi->chipshift); cfi_amdstd_write_words() 1677 chipstart = cfi->chips[chipnum].start; cfi_amdstd_write_words() 1687 mutex_lock(&cfi->chips[chipnum].mutex); cfi_amdstd_write_words() 1689 if (cfi->chips[chipnum].state != FL_READY) { cfi_amdstd_write_words() 1691 add_wait_queue(&cfi->chips[chipnum].wq, &wait); cfi_amdstd_write_words() 1693 mutex_unlock(&cfi->chips[chipnum].mutex); cfi_amdstd_write_words() 1696 remove_wait_queue(&cfi->chips[chipnum].wq, &wait); cfi_amdstd_write_words() 1703 mutex_unlock(&cfi->chips[chipnum].mutex); cfi_amdstd_write_words() 1710 ret = do_write_oneword(map, &cfi->chips[chipnum], cfi_amdstd_write_words() 1720 if (ofs >> cfi->chipshift) { cfi_amdstd_write_words() 1723 if (chipnum == cfi->numchips) cfi_amdstd_write_words() 1734 ret = do_write_oneword(map, &cfi->chips[chipnum], cfi_amdstd_write_words() 1744 if (ofs >> cfi->chipshift) { cfi_amdstd_write_words() 1747 if (chipnum == cfi->numchips) cfi_amdstd_write_words() 1749 chipstart = cfi->chips[chipnum].start; cfi_amdstd_write_words() 1758 mutex_lock(&cfi->chips[chipnum].mutex); cfi_amdstd_write_words() 1760 if (cfi->chips[chipnum].state != FL_READY) { cfi_amdstd_write_words() 1762 add_wait_queue(&cfi->chips[chipnum].wq, &wait); cfi_amdstd_write_words() 1764 mutex_unlock(&cfi->chips[chipnum].mutex); cfi_amdstd_write_words() 1767 remove_wait_queue(&cfi->chips[chipnum].wq, &wait); cfi_amdstd_write_words() 1773 mutex_unlock(&cfi->chips[chipnum].mutex); cfi_amdstd_write_words() 1777 ret = do_write_oneword(map, &cfi->chips[chipnum], cfi_amdstd_write_words() 1796 struct cfi_private *cfi = map->fldrv_priv; do_write_buffer() local 1828 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_write_buffer() 1829 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); do_write_buffer() 1897 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, do_write_buffer() 1898 cfi->device_type, NULL); do_write_buffer() 1899 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, do_write_buffer() 1900 cfi->device_type, NULL); do_write_buffer() 1901 cfi_send_gen_cmd(0xF0, cfi->addr_unlock1, chip->start, map, cfi, do_write_buffer() 1902 cfi->device_type, NULL); do_write_buffer() 1924 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_write_buffers() local 1925 int wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; cfi_amdstd_write_buffers() 1930 chipnum = to >> cfi->chipshift; cfi_amdstd_write_buffers() 1931 ofs = to - (chipnum << cfi->chipshift); cfi_amdstd_write_buffers() 1938 ret = cfi_amdstd_write_words(mtd, ofs + (chipnum<<cfi->chipshift), cfi_amdstd_write_buffers() 1946 if (ofs >> cfi->chipshift) { cfi_amdstd_write_buffers() 1949 if (chipnum == cfi->numchips) cfi_amdstd_write_buffers() 1964 ret = do_write_buffer(map, &cfi->chips[chipnum], cfi_amdstd_write_buffers() 1974 if (ofs >> cfi->chipshift) { cfi_amdstd_write_buffers() 1977 if (chipnum == cfi->numchips) cfi_amdstd_write_buffers() 1985 ret = cfi_amdstd_write_words(mtd, ofs + (chipnum<<cfi->chipshift), cfi_amdstd_write_buffers() 2006 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_panic_wait() local 2059 struct cfi_private *cfi = map->fldrv_priv; do_panic_write_oneword() local 2089 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_panic_write_oneword() 2090 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); do_panic_write_oneword() 2091 cfi_send_gen_cmd(0xA0, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_panic_write_oneword() 2134 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_panic_write() local 2139 chipnum = to >> cfi->chipshift; cfi_amdstd_panic_write() 2140 ofs = to - (chipnum << cfi->chipshift); cfi_amdstd_panic_write() 2141 chipstart = cfi->chips[chipnum].start; cfi_amdstd_panic_write() 2150 ret = cfi_amdstd_panic_wait(map, &cfi->chips[chipnum], bus_ofs); cfi_amdstd_panic_write() 2162 ret = do_panic_write_oneword(map, &cfi->chips[chipnum], cfi_amdstd_panic_write() 2172 if (ofs >> cfi->chipshift) { cfi_amdstd_panic_write() 2175 if (chipnum == cfi->numchips) cfi_amdstd_panic_write() 2186 ret = do_panic_write_oneword(map, &cfi->chips[chipnum], cfi_amdstd_panic_write() 2196 if (ofs >> cfi->chipshift) { cfi_amdstd_panic_write() 2199 if (chipnum == cfi->numchips) cfi_amdstd_panic_write() 2202 chipstart = cfi->chips[chipnum].start; cfi_amdstd_panic_write() 2210 ret = cfi_amdstd_panic_wait(map, &cfi->chips[chipnum], ofs); cfi_amdstd_panic_write() 2218 ret = do_panic_write_oneword(map, &cfi->chips[chipnum], cfi_amdstd_panic_write() 2236 struct cfi_private *cfi = map->fldrv_priv; do_erase_chip() local 2242 adr = cfi->addr_unlock1; do_erase_chip() 2258 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_erase_chip() 2259 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); do_erase_chip() 2260 cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_erase_chip() 2261 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_erase_chip() 2262 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); do_erase_chip() 2263 cfi_send_gen_cmd(0x10, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_erase_chip() 2326 struct cfi_private *cfi = map->fldrv_priv; do_erase_oneblock() local 2347 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_erase_oneblock() 2348 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); do_erase_oneblock() 2349 cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_erase_oneblock() 2350 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); do_erase_oneblock() 2351 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); do_erase_oneblock() 2352 map_write(map, cfi->sector_erase_cmd, adr); do_erase_oneblock() 2436 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_erase_chip() local 2445 ret = do_erase_chip(map, &cfi->chips[0]); cfi_amdstd_erase_chip() 2458 struct cfi_private *cfi = map->fldrv_priv; do_atmel_lock() local 2469 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, do_atmel_lock() 2470 cfi->device_type, NULL); do_atmel_lock() 2471 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, do_atmel_lock() 2472 cfi->device_type, NULL); do_atmel_lock() 2473 cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, do_atmel_lock() 2474 cfi->device_type, NULL); do_atmel_lock() 2475 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, do_atmel_lock() 2476 cfi->device_type, NULL); do_atmel_lock() 2477 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, do_atmel_lock() 2478 cfi->device_type, NULL); do_atmel_lock() 2493 struct cfi_private *cfi = map->fldrv_priv; do_atmel_unlock() local 2504 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, do_atmel_unlock() 2505 cfi->device_type, NULL); do_atmel_unlock() 2547 struct cfi_private *cfi = map->fldrv_priv; do_ppb_xxlock() local 2560 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, do_ppb_xxlock() 2561 cfi->device_type, NULL); do_ppb_xxlock() 2562 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, do_ppb_xxlock() 2563 cfi->device_type, NULL); do_ppb_xxlock() 2565 cfi_send_gen_cmd(0xC0, cfi->addr_unlock1, chip->start, map, cfi, do_ppb_xxlock() 2566 cfi->device_type, NULL); do_ppb_xxlock() 2627 struct cfi_private *cfi = map->fldrv_priv; cfi_ppb_unlock() local 2667 sect[sectors].chip = &cfi->chips[chipnum]; cfi_ppb_unlock() 2670 map, &cfi->chips[chipnum], adr, 0, cfi_ppb_unlock() 2681 if (adr >> cfi->chipshift) { cfi_ppb_unlock() 2685 if (chipnum >= cfi->numchips) cfi_ppb_unlock() 2730 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_sync() local 2736 for (i=0; !ret && i<cfi->numchips; i++) { cfi_amdstd_sync() 2737 chip = &cfi->chips[i]; cfi_amdstd_sync() 2775 chip = &cfi->chips[i]; cfi_amdstd_sync() 2791 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_suspend() local 2796 for (i=0; !ret && i<cfi->numchips; i++) { cfi_amdstd_suspend() 2797 chip = &cfi->chips[i]; cfi_amdstd_suspend() 2826 chip = &cfi->chips[i]; cfi_amdstd_suspend() 2845 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_resume() local 2849 for (i=0; i<cfi->numchips; i++) { cfi_amdstd_resume() 2851 chip = &cfi->chips[i]; cfi_amdstd_resume() 2877 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_reset() local 2881 for (i = 0; i < cfi->numchips; i++) { cfi_amdstd_reset() 2883 chip = &cfi->chips[i]; cfi_amdstd_reset() 2915 struct cfi_private *cfi = map->fldrv_priv; cfi_amdstd_destroy() local 2919 kfree(cfi->cmdset_priv); cfi_amdstd_destroy() 2920 kfree(cfi->cfiq); cfi_amdstd_destroy() 2921 kfree(cfi); cfi_amdstd_destroy()
|
H A D | jedec_probe.c | 22 #include <linux/mtd/cfi.h> 1879 struct cfi_private *cfi) jedec_read_mfr() 1890 uint32_t ofs = cfi_build_cmd_addr(0 + (bank << 8), map, cfi); jedec_read_mfr() 1891 mask = (1 << (cfi->device_type * 8)) - 1; jedec_read_mfr() 1900 struct cfi_private *cfi) jedec_read_id() 1904 u32 ofs = cfi_build_cmd_addr(1, map, cfi); jedec_read_id() 1905 mask = (1 << (cfi->device_type * 8)) -1; jedec_read_id() 1910 static void jedec_reset(u32 base, struct map_info *map, struct cfi_private *cfi) jedec_reset() argument 1920 if (cfi->addr_unlock1) { jedec_reset() 1922 cfi->addr_unlock1,cfi->addr_unlock2); jedec_reset() 1923 cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); jedec_reset() 1924 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi, cfi->device_type, NULL); jedec_reset() 1927 cfi_send_gen_cmd(0xF0, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); jedec_reset() 1933 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); jedec_reset() 1938 static int cfi_jedec_setup(struct map_info *map, struct cfi_private *cfi, int index) cfi_jedec_setup() argument 1943 if (!(jedec_table[index].devtypes & cfi->device_type)) { cfi_jedec_setup() 1945 jedec_table[index].name, 4 * (1<<cfi->device_type)); cfi_jedec_setup() 1953 cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); cfi_jedec_setup() 1954 if (!cfi->cfiq) { cfi_jedec_setup() 1959 memset(cfi->cfiq, 0, sizeof(struct cfi_ident)); cfi_jedec_setup() 1961 cfi->cfiq->P_ID = jedec_table[index].cmd_set; cfi_jedec_setup() 1962 cfi->cfiq->NumEraseRegions = jedec_table[index].nr_regions; cfi_jedec_setup() 1963 cfi->cfiq->DevSize = jedec_table[index].dev_size; cfi_jedec_setup() 1964 cfi->cfi_mode = CFI_MODE_JEDEC; cfi_jedec_setup() 1965 cfi->sector_erase_cmd = CMD(0x30); cfi_jedec_setup() 1968 cfi->cfiq->EraseRegionInfo[i] = jedec_table[index].regions[i]; cfi_jedec_setup() 1970 cfi->cmdset_priv = NULL; cfi_jedec_setup() 1973 cfi->mfr = jedec_table[index].mfr_id; cfi_jedec_setup() 1974 cfi->id = jedec_table[index].dev_id; cfi_jedec_setup() 1982 cfi->addr_unlock1 = unlock_addrs[uaddr].addr1 / cfi->device_type; cfi_jedec_setup() 1983 cfi->addr_unlock2 = unlock_addrs[uaddr].addr2 / cfi->device_type; cfi_jedec_setup() 1998 struct cfi_private *cfi, jedec_match() 2014 switch (cfi->device_type) { jedec_match() 2040 __func__, cfi->device_type); jedec_match() 2043 if ( cfi->mfr != mfr || cfi->id != id ) { jedec_match() 2050 if ( base + cfi_interleave(cfi) * ( 1 << finfo->dev_size ) > map->size ) { jedec_match() 2057 if (! (finfo->devtypes & cfi->device_type)) jedec_match() 2063 __func__, cfi->addr_unlock1, cfi->addr_unlock2 ); jedec_match() 2065 && ( unlock_addrs[uaddr].addr1 / cfi->device_type != cfi->addr_unlock1 || jedec_match() 2066 unlock_addrs[uaddr].addr2 / cfi->device_type != cfi->addr_unlock2 ) ) { jedec_match() 2085 jedec_reset( base, map, cfi ); jedec_match() 2086 mfr = jedec_read_mfr( map, base, cfi ); jedec_match() 2087 id = jedec_read_id( map, base, cfi ); jedec_match() 2088 if ( mfr == cfi->mfr && id == cfi->id ) { jedec_match() 2091 __func__, cfi->mfr, cfi->id ); jedec_match() 2103 if (cfi->addr_unlock1) { jedec_match() 2104 cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); jedec_match() 2105 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi, cfi->device_type, NULL); jedec_match() 2107 cfi_send_gen_cmd(0x90, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); jedec_match() 2116 unsigned long *chip_map, struct cfi_private *cfi) jedec_probe_chip() 2123 if (!cfi->numchips) { jedec_probe_chip() 2129 cfi->addr_unlock1 = unlock_addrs[uaddr_idx].addr1 / cfi->device_type; jedec_probe_chip() 2130 cfi->addr_unlock2 = unlock_addrs[uaddr_idx].addr2 / cfi->device_type; jedec_probe_chip() 2142 probe_offset1 = cfi_build_cmd_addr(cfi->addr_unlock1, map, cfi); jedec_probe_chip() 2143 probe_offset2 = cfi_build_cmd_addr(cfi->addr_unlock2, map, cfi); jedec_probe_chip() 2149 jedec_reset(base, map, cfi); jedec_probe_chip() 2152 if(cfi->addr_unlock1) { jedec_probe_chip() 2153 cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); jedec_probe_chip() 2154 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi, cfi->device_type, NULL); jedec_probe_chip() 2156 cfi_send_gen_cmd(0x90, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); jedec_probe_chip() 2159 if (!cfi->numchips) { jedec_probe_chip() 2163 cfi->mfr = jedec_read_mfr(map, base, cfi); jedec_probe_chip() 2164 cfi->id = jedec_read_id(map, base, cfi); jedec_probe_chip() 2166 cfi->mfr, cfi->id, cfi_interleave(cfi), cfi->device_type); jedec_probe_chip() 2168 if ( jedec_match( base, map, cfi, &jedec_table[i] ) ) { jedec_probe_chip() 2170 __func__, cfi->mfr, cfi->id, jedec_probe_chip() 2171 cfi->addr_unlock1, cfi->addr_unlock2 ); jedec_probe_chip() 2172 if (!cfi_jedec_setup(map, cfi, i)) jedec_probe_chip() 2183 mfr = jedec_read_mfr(map, base, cfi); jedec_probe_chip() 2184 id = jedec_read_id(map, base, cfi); jedec_probe_chip() 2186 if ((mfr != cfi->mfr) || (id != cfi->id)) { jedec_probe_chip() 2189 jedec_reset(base, map, cfi); jedec_probe_chip() 2195 for (i=0; i < (base >> cfi->chipshift); i++) { jedec_probe_chip() 2200 start = i << cfi->chipshift; jedec_probe_chip() 2201 if (jedec_read_mfr(map, start, cfi) == cfi->mfr && jedec_probe_chip() 2202 jedec_read_id(map, start, cfi) == cfi->id) { jedec_probe_chip() 2205 jedec_reset(start, map, cfi); jedec_probe_chip() 2208 if (jedec_read_mfr(map, base, cfi) != cfi->mfr || jedec_probe_chip() 2209 jedec_read_id(map, base, cfi) != cfi->id) { jedec_probe_chip() 2219 jedec_reset(base, map, cfi); jedec_probe_chip() 2220 if (jedec_read_mfr(map, base, cfi) == cfi->mfr && jedec_probe_chip() 2221 jedec_read_id(map, base, cfi) == cfi->id) { jedec_probe_chip() 2231 set_bit((base >> cfi->chipshift), chip_map); /* Update chip map */ jedec_probe_chip() 2232 cfi->numchips++; jedec_probe_chip() 2236 jedec_reset(base, map, cfi); jedec_probe_chip() 2239 map->name, cfi_interleave(cfi), cfi->device_type*8, base, jedec_probe_chip() 1878 jedec_read_mfr(struct map_info *map, uint32_t base, struct cfi_private *cfi) jedec_read_mfr() argument 1899 jedec_read_id(struct map_info *map, uint32_t base, struct cfi_private *cfi) jedec_read_id() argument 1996 jedec_match( uint32_t base, struct map_info *map, struct cfi_private *cfi, const struct amd_flash_info *finfo ) jedec_match() argument 2115 jedec_probe_chip(struct map_info *map, __u32 base, unsigned long *chip_map, struct cfi_private *cfi) jedec_probe_chip() argument
|
H A D | cfi_cmdset_0020.c | 11 * (see include/linux/mtd/cfi.h for selection) 33 #include <linux/mtd/cfi.h> 109 * addresses passed back in cfi are valid as long as the use count of 115 struct cfi_private *cfi = map->fldrv_priv; cfi_cmdset_0020() local 118 if (cfi->cfi_mode) { cfi_cmdset_0020() 124 __u16 adr = primary?cfi->cfiq->P_ADR:cfi->cfiq->A_ADR; cfi_cmdset_0020() 151 cfi->cmdset_priv = extp; cfi_cmdset_0020() 154 for (i=0; i< cfi->numchips; i++) { cfi_cmdset_0020() 155 cfi->chips[i].word_write_time = 128; cfi_cmdset_0020() 156 cfi->chips[i].buffer_write_time = 128; cfi_cmdset_0020() 157 cfi->chips[i].erase_time = 1024; cfi_cmdset_0020() 158 cfi->chips[i].ref_point_counter = 0; cfi_cmdset_0020() 159 init_waitqueue_head(&(cfi->chips[i].wq)); cfi_cmdset_0020() 168 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_setup() local 172 unsigned long devsize = (1<<cfi->cfiq->DevSize) * cfi->interleave; cfi_staa_setup() 175 //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); cfi_staa_setup() 178 kfree(cfi->cmdset_priv); cfi_staa_setup() 184 mtd->size = devsize * cfi->numchips; cfi_staa_setup() 186 mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; cfi_staa_setup() 190 kfree(cfi->cmdset_priv); cfi_staa_setup() 195 for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { cfi_staa_setup() 197 ersize = ((cfi->cfiq->EraseRegionInfo[i] >> 8) & ~0xff) * cfi->interleave; cfi_staa_setup() 198 ernum = (cfi->cfiq->EraseRegionInfo[i] & 0xffff) + 1; cfi_staa_setup() 203 for (j=0; j<cfi->numchips; j++) { cfi_staa_setup() 204 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].offset = (j*devsize)+offset; cfi_staa_setup() 205 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].erasesize = ersize; cfi_staa_setup() 206 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].numblocks = ernum; cfi_staa_setup() 215 kfree(cfi->cmdset_priv); cfi_staa_setup() 239 mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; cfi_staa_setup() 254 struct cfi_private *cfi = map->fldrv_priv; do_read_onechip() local 273 if (!(((struct cfi_pri_intelext *)cfi->cmdset_priv)->FeatureSupport & 2)) do_read_onechip() 385 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_read() local 391 chipnum = (from >> cfi->chipshift); cfi_staa_read() 392 ofs = from - (chipnum << cfi->chipshift); cfi_staa_read() 397 if (chipnum >= cfi->numchips) cfi_staa_read() 400 if ((len + ofs -1) >> cfi->chipshift) cfi_staa_read() 401 thislen = (1<<cfi->chipshift) - ofs; cfi_staa_read() 405 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf); cfi_staa_read() 422 struct cfi_private *cfi = map->fldrv_priv; do_write_buffer() local 432 wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; do_write_buffer() 609 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_write_buffers() local 610 int wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; cfi_staa_write_buffers() 615 chipnum = to >> cfi->chipshift; cfi_staa_write_buffers() 616 ofs = to - (chipnum << cfi->chipshift); cfi_staa_write_buffers() 632 ret = do_write_buffer(map, &cfi->chips[chipnum], cfi_staa_write_buffers() 642 if (ofs >> cfi->chipshift) { cfi_staa_write_buffers() 645 if (chipnum == cfi->numchips) cfi_staa_write_buffers() 733 struct cfi_private *cfi = map->fldrv_priv; do_erase_oneblock() local 850 for (i = 0; i<cfi_interleave(cfi); i++) { do_erase_oneblock() 851 chipstatus |= status.x[w] >> (cfi->device_type * 8); do_erase_oneblock() 892 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_erase_varsize() local 941 chipnum = instr->addr >> cfi->chipshift; cfi_staa_erase_varsize() 942 adr = instr->addr - (chipnum << cfi->chipshift); cfi_staa_erase_varsize() 948 ret = do_erase_oneblock(map, &cfi->chips[chipnum], adr); cfi_staa_erase_varsize() 956 if (adr % (1<< cfi->chipshift) == (((unsigned long)regions[i].offset + (regions[i].erasesize * regions[i].numblocks)) %( 1<< cfi->chipshift))) cfi_staa_erase_varsize() 959 if (adr >> cfi->chipshift) { cfi_staa_erase_varsize() 963 if (chipnum >= cfi->numchips) cfi_staa_erase_varsize() 977 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_sync() local 983 for (i=0; !ret && i<cfi->numchips; i++) { cfi_staa_sync() 984 chip = &cfi->chips[i]; cfi_staa_sync() 1020 chip = &cfi->chips[i]; cfi_staa_sync() 1034 struct cfi_private *cfi = map->fldrv_priv; do_lock_oneblock() local 1130 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_lock() local 1134 int ofs_factor = cfi->interleave * cfi->device_type; cfi_staa_lock() 1143 chipnum = ofs >> cfi->chipshift; cfi_staa_lock() 1144 adr = ofs - (chipnum << cfi->chipshift); cfi_staa_lock() 1149 cfi_send_gen_cmd(0x90, 0x55, 0, map, cfi, cfi->device_type, NULL); cfi_staa_lock() 1151 cfi_send_gen_cmd(0xff, 0x55, 0, map, cfi, cfi->device_type, NULL); cfi_staa_lock() 1154 ret = do_lock_oneblock(map, &cfi->chips[chipnum], adr); cfi_staa_lock() 1157 cfi_send_gen_cmd(0x90, 0x55, 0, map, cfi, cfi->device_type, NULL); cfi_staa_lock() 1159 cfi_send_gen_cmd(0xff, 0x55, 0, map, cfi, cfi->device_type, NULL); cfi_staa_lock() 1168 if (adr >> cfi->chipshift) { cfi_staa_lock() 1172 if (chipnum >= cfi->numchips) cfi_staa_lock() 1180 struct cfi_private *cfi = map->fldrv_priv; do_unlock_oneblock() local 1276 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_unlock() local 1280 int ofs_factor = cfi->interleave * cfi->device_type; cfi_staa_unlock() 1283 chipnum = ofs >> cfi->chipshift; cfi_staa_unlock() 1284 adr = ofs - (chipnum << cfi->chipshift); cfi_staa_unlock() 1291 cfi_send_gen_cmd(0x90, 0x55, 0, map, cfi, cfi->device_type, NULL); cfi_staa_unlock() 1297 cfi_send_gen_cmd(0xff, 0x55, 0, map, cfi, cfi->device_type, NULL); cfi_staa_unlock() 1301 ret = do_unlock_oneblock(map, &cfi->chips[chipnum], adr); cfi_staa_unlock() 1304 cfi_send_gen_cmd(0x90, 0x55, 0, map, cfi, cfi->device_type, NULL); cfi_staa_unlock() 1306 cfi_send_gen_cmd(0xff, 0x55, 0, map, cfi, cfi->device_type, NULL); cfi_staa_unlock() 1315 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_suspend() local 1320 for (i=0; !ret && i<cfi->numchips; i++) { cfi_staa_suspend() 1321 chip = &cfi->chips[i]; cfi_staa_suspend() 1350 chip = &cfi->chips[i]; cfi_staa_suspend() 1371 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_resume() local 1375 for (i=0; i<cfi->numchips; i++) { cfi_staa_resume() 1377 chip = &cfi->chips[i]; cfi_staa_resume() 1395 struct cfi_private *cfi = map->fldrv_priv; cfi_staa_destroy() local 1396 kfree(cfi->cmdset_priv); cfi_staa_destroy() 1397 kfree(cfi); cfi_staa_destroy()
|
H A D | cfi_cmdset_0001.c | 12 * (see include/linux/mtd/cfi.h for selection) 36 #include <linux/mtd/cfi.h> 172 struct cfi_private *cfi = map->fldrv_priv; fixup_convert_atmel_pri() local 173 struct cfi_pri_intelext *extp = cfi->cmdset_priv; fixup_convert_atmel_pri() 205 cfi->cfiq->BufWriteTimeoutTyp = 0; fixup_convert_atmel_pri() 206 cfi->cfiq->BufWriteTimeoutMax = 0; fixup_convert_atmel_pri() 212 struct cfi_private *cfi = map->fldrv_priv; fixup_at49bv640dx_lock() local 213 struct cfi_pri_intelext *cfip = cfi->cmdset_priv; fixup_at49bv640dx_lock() 224 struct cfi_private *cfi = map->fldrv_priv; fixup_intel_strataflash() local 225 struct cfi_pri_intelext *extp = cfi->cmdset_priv; fixup_intel_strataflash() 237 struct cfi_private *cfi = map->fldrv_priv; fixup_no_write_suspend() local 238 struct cfi_pri_intelext *cfip = cfi->cmdset_priv; fixup_no_write_suspend() 250 struct cfi_private *cfi = map->fldrv_priv; fixup_st_m28w320ct() local 252 cfi->cfiq->BufWriteTimeoutTyp = 0; /* Not supported */ fixup_st_m28w320ct() 253 cfi->cfiq->BufWriteTimeoutMax = 0; /* Not supported */ fixup_st_m28w320ct() 259 struct cfi_private *cfi = map->fldrv_priv; fixup_st_m28w320cb() local 262 cfi->cfiq->EraseRegionInfo[1] = fixup_st_m28w320cb() 263 (cfi->cfiq->EraseRegionInfo[1] & 0xffff0000) | 0x3e; fixup_st_m28w320cb() 266 static int is_LH28F640BF(struct cfi_private *cfi) is_LH28F640BF() argument 269 if (cfi->mfr == CFI_MFR_SHARP && ( is_LH28F640BF() 270 cfi->id == LH28F640BFHE_PTTL90 || cfi->id == LH28F640BFHE_PBTL90 || is_LH28F640BF() 271 cfi->id == LH28F640BFHE_PTTL70A || cfi->id == LH28F640BFHE_PBTL70A)) is_LH28F640BF() 279 struct cfi_private *cfi = map->fldrv_priv; fixup_LH28F640BF() local 280 struct cfi_pri_intelext *extp = cfi->cmdset_priv; fixup_LH28F640BF() 284 if (is_LH28F640BF(cfi)) { fixup_LH28F640BF() 308 struct cfi_private *cfi = map->fldrv_priv; fixup_use_write_buffers() local 309 if (cfi->cfiq->BufWriteTimeoutTyp) { fixup_use_write_buffers() 322 struct cfi_private *cfi = map->fldrv_priv; fixup_unlock_powerup_lock() local 323 struct cfi_pri_intelext *cfip = cfi->cmdset_priv; fixup_unlock_powerup_lock() 370 static void cfi_fixup_major_minor(struct cfi_private *cfi, cfi_fixup_major_minor() argument 373 if (cfi->mfr == CFI_MFR_INTEL && cfi_fixup_major_minor() 374 cfi->id == PF38F4476 && extp->MinorVersion == '3') cfi_fixup_major_minor() 381 struct cfi_private *cfi = map->fldrv_priv; read_pri_intelext() local 391 cfi_fixup_major_minor(cfi, extp); read_pri_intelext() 469 struct cfi_private *cfi = map->fldrv_priv; cfi_cmdset_0001() local 492 mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; cfi_cmdset_0001() 496 if (cfi->cfi_mode == CFI_MODE_CFI) { cfi_cmdset_0001() 502 __u16 adr = primary?cfi->cfiq->P_ADR:cfi->cfiq->A_ADR; cfi_cmdset_0001() 512 cfi->cmdset_priv = extp; cfi_cmdset_0001() 525 else if (cfi->cfi_mode == CFI_MODE_JEDEC) { cfi_cmdset_0001() 532 for (i=0; i< cfi->numchips; i++) { cfi_cmdset_0001() 533 if (cfi->cfiq->WordWriteTimeoutTyp) cfi_cmdset_0001() 534 cfi->chips[i].word_write_time = cfi_cmdset_0001() 535 1<<cfi->cfiq->WordWriteTimeoutTyp; cfi_cmdset_0001() 537 cfi->chips[i].word_write_time = 50000; cfi_cmdset_0001() 539 if (cfi->cfiq->BufWriteTimeoutTyp) cfi_cmdset_0001() 540 cfi->chips[i].buffer_write_time = cfi_cmdset_0001() 541 1<<cfi->cfiq->BufWriteTimeoutTyp; cfi_cmdset_0001() 544 if (cfi->cfiq->BlockEraseTimeoutTyp) cfi_cmdset_0001() 545 cfi->chips[i].erase_time = cfi_cmdset_0001() 546 1000<<cfi->cfiq->BlockEraseTimeoutTyp; cfi_cmdset_0001() 548 cfi->chips[i].erase_time = 2000000; cfi_cmdset_0001() 550 if (cfi->cfiq->WordWriteTimeoutTyp && cfi_cmdset_0001() 551 cfi->cfiq->WordWriteTimeoutMax) cfi_cmdset_0001() 552 cfi->chips[i].word_write_time_max = cfi_cmdset_0001() 553 1<<(cfi->cfiq->WordWriteTimeoutTyp + cfi_cmdset_0001() 554 cfi->cfiq->WordWriteTimeoutMax); cfi_cmdset_0001() 556 cfi->chips[i].word_write_time_max = 50000 * 8; cfi_cmdset_0001() 558 if (cfi->cfiq->BufWriteTimeoutTyp && cfi_cmdset_0001() 559 cfi->cfiq->BufWriteTimeoutMax) cfi_cmdset_0001() 560 cfi->chips[i].buffer_write_time_max = cfi_cmdset_0001() 561 1<<(cfi->cfiq->BufWriteTimeoutTyp + cfi_cmdset_0001() 562 cfi->cfiq->BufWriteTimeoutMax); cfi_cmdset_0001() 564 if (cfi->cfiq->BlockEraseTimeoutTyp && cfi_cmdset_0001() 565 cfi->cfiq->BlockEraseTimeoutMax) cfi_cmdset_0001() 566 cfi->chips[i].erase_time_max = cfi_cmdset_0001() 567 1000<<(cfi->cfiq->BlockEraseTimeoutTyp + cfi_cmdset_0001() 568 cfi->cfiq->BlockEraseTimeoutMax); cfi_cmdset_0001() 570 cfi->chips[i].erase_time_max = 2000000 * 8; cfi_cmdset_0001() 572 cfi->chips[i].ref_point_counter = 0; cfi_cmdset_0001() 573 init_waitqueue_head(&(cfi->chips[i].wq)); cfi_cmdset_0001() 589 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_setup() local 592 unsigned long devsize = (1<<cfi->cfiq->DevSize) * cfi->interleave; cfi_intelext_setup() 594 //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); cfi_intelext_setup() 596 mtd->size = devsize * cfi->numchips; cfi_intelext_setup() 598 mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; cfi_intelext_setup() 604 for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { cfi_intelext_setup() 606 ersize = ((cfi->cfiq->EraseRegionInfo[i] >> 8) & ~0xff) * cfi->interleave; cfi_intelext_setup() 607 ernum = (cfi->cfiq->EraseRegionInfo[i] & 0xffff) + 1; cfi_intelext_setup() 612 for (j=0; j<cfi->numchips; j++) { cfi_intelext_setup() 613 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].offset = (j*devsize)+offset; cfi_intelext_setup() 614 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].erasesize = ersize; cfi_intelext_setup() 615 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].numblocks = ernum; cfi_intelext_setup() 616 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].lockmap = kmalloc(ernum / 8 + 1, GFP_KERNEL); cfi_intelext_setup() 645 if (cfi_intelext_partition_fixup(mtd, &cfi) != 0) cfi_intelext_setup() 655 kfree(cfi->cmdset_priv); cfi_intelext_setup() 663 struct cfi_private *cfi = *pcfi; cfi_intelext_partition_fixup() local 664 struct cfi_pri_intelext *extp = cfi->cmdset_priv; cfi_intelext_partition_fixup() 717 mtd->writesize = cfi->interleave << prinfo->ProgRegShift; cfi_intelext_partition_fixup() 721 cfi->interleave * prinfo->ControlValid, cfi_intelext_partition_fixup() 722 cfi->interleave * prinfo->ControlInvalid); cfi_intelext_partition_fixup() 730 partshift = cfi->chipshift - __ffs(numparts); cfi_intelext_partition_fixup() 739 numvirtchips = cfi->numchips * numparts; cfi_intelext_partition_fixup() 743 shared = kmalloc(sizeof(struct flchip_shared) * cfi->numchips, GFP_KERNEL); cfi_intelext_partition_fixup() 748 memcpy(newcfi, cfi, sizeof(struct cfi_private)); cfi_intelext_partition_fixup() 753 for (i = 0; i < cfi->numchips; i++) { cfi_intelext_partition_fixup() 757 *chip = cfi->chips[i]; cfi_intelext_partition_fixup() 770 map->name, cfi->numchips, cfi->interleave, cfi_intelext_partition_fixup() 775 kfree(cfi); cfi_intelext_partition_fixup() 787 struct cfi_private *cfi = map->fldrv_priv; chip_ready() local 789 struct cfi_pri_intelext *cfip = cfi->cmdset_priv; chip_ready() 990 struct cfi_private *cfi = map->fldrv_priv; put_chip() local 1083 struct cfi_private *cfi = map->fldrv_priv; xip_enable() local 1110 struct cfi_private *cfi = map->fldrv_priv; xip_wait_for_operation() local 1111 struct cfi_pri_intelext *cfip = cfi->cmdset_priv; xip_wait_for_operation() 1127 (cfi_interleave_is_1(cfi) || chip->oldstate == FL_READY)) { xip_wait_for_operation() 1242 struct cfi_private *cfi = map->fldrv_priv; inval_cache_and_wait_for_operation() local 1324 struct cfi_private *cfi = map->fldrv_priv; do_point_onechip() local 1352 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_point() local 1363 chipnum = (from >> cfi->chipshift); cfi_intelext_point() 1364 ofs = from - (chipnum << cfi->chipshift); cfi_intelext_point() 1366 *virt = map->virt + cfi->chips[chipnum].start + ofs; cfi_intelext_point() 1368 *phys = map->phys + cfi->chips[chipnum].start + ofs; cfi_intelext_point() 1373 if (chipnum >= cfi->numchips) cfi_intelext_point() 1378 last_end = cfi->chips[chipnum].start; cfi_intelext_point() 1379 else if (cfi->chips[chipnum].start != last_end) cfi_intelext_point() 1382 if ((len + ofs -1) >> cfi->chipshift) cfi_intelext_point() 1383 thislen = (1<<cfi->chipshift) - ofs; cfi_intelext_point() 1387 ret = do_point_onechip(map, &cfi->chips[chipnum], ofs, thislen); cfi_intelext_point() 1395 last_end += 1 << cfi->chipshift; cfi_intelext_point() 1404 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_unpoint() local 1411 chipnum = (from >> cfi->chipshift); cfi_intelext_unpoint() 1412 ofs = from - (chipnum << cfi->chipshift); cfi_intelext_unpoint() 1418 chip = &cfi->chips[chipnum]; cfi_intelext_unpoint() 1419 if (chipnum >= cfi->numchips) cfi_intelext_unpoint() 1422 if ((len + ofs -1) >> cfi->chipshift) cfi_intelext_unpoint() 1423 thislen = (1<<cfi->chipshift) - ofs; cfi_intelext_unpoint() 1451 struct cfi_private *cfi = map->fldrv_priv; do_read_onechip() local 1483 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_read() local 1489 chipnum = (from >> cfi->chipshift); cfi_intelext_read() 1490 ofs = from - (chipnum << cfi->chipshift); cfi_intelext_read() 1495 if (chipnum >= cfi->numchips) cfi_intelext_read() 1498 if ((len + ofs -1) >> cfi->chipshift) cfi_intelext_read() 1499 thislen = (1<<cfi->chipshift) - ofs; cfi_intelext_read() 1503 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf); cfi_intelext_read() 1520 struct cfi_private *cfi = map->fldrv_priv; do_write_oneword() local 1528 write_cmd = (cfi->cfiq->P_ID != P_ID_INTEL_PERFORMANCE) ? CMD(0x40) : CMD(0x41); do_write_oneword() 1595 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_write_words() local 1600 chipnum = to >> cfi->chipshift; cfi_intelext_write_words() 1601 ofs = to - (chipnum << cfi->chipshift); cfi_intelext_write_words() 1614 ret = do_write_oneword(map, &cfi->chips[chipnum], cfi_intelext_write_words() 1624 if (ofs >> cfi->chipshift) { cfi_intelext_write_words() 1627 if (chipnum == cfi->numchips) cfi_intelext_write_words() 1635 ret = do_write_oneword(map, &cfi->chips[chipnum], cfi_intelext_write_words() 1645 if (ofs >> cfi->chipshift) { cfi_intelext_write_words() 1648 if (chipnum == cfi->numchips) cfi_intelext_write_words() 1659 ret = do_write_oneword(map, &cfi->chips[chipnum], cfi_intelext_write_words() 1675 struct cfi_private *cfi = map->fldrv_priv; do_write_buffer() local 1684 wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; do_write_buffer() 1692 if (is_LH28F640BF(cfi)) do_write_buffer() 1696 write_cmd = (cfi->cfiq->P_ID != P_ID_INTEL_PERFORMANCE) ? CMD(0xe8) : CMD(0xe9); do_write_buffer() 1841 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_writev() local 1842 int wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; cfi_intelext_writev() 1854 chipnum = to >> cfi->chipshift; cfi_intelext_writev() 1855 ofs = to - (chipnum << cfi->chipshift); cfi_intelext_writev() 1864 ret = do_write_buffer(map, &cfi->chips[chipnum], cfi_intelext_writev() 1873 if (ofs >> cfi->chipshift) { cfi_intelext_writev() 1876 if (chipnum == cfi->numchips) cfi_intelext_writev() 1903 struct cfi_private *cfi = map->fldrv_priv; do_erase_oneblock() local 2009 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_sync() local 2014 for (i=0; !ret && i<cfi->numchips; i++) { cfi_intelext_sync() 2015 chip = &cfi->chips[i]; cfi_intelext_sync() 2034 chip = &cfi->chips[i]; cfi_intelext_sync() 2052 struct cfi_private *cfi = map->fldrv_priv; do_getlockstatus_oneblock() local 2053 int status, ofs_factor = cfi->interleave * cfi->device_type; do_getlockstatus_oneblock() 2082 struct cfi_private *cfi = map->fldrv_priv; do_xxlock_oneblock() local 2083 struct cfi_pri_intelext *extp = cfi->cmdset_priv; do_xxlock_oneblock() 2204 struct cfi_private *cfi = map->fldrv_priv; do_otp_read() local 2262 struct cfi_private *cfi = map->fldrv_priv; do_otp_lock() local 2279 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_otp_walk() local 2280 struct cfi_pri_intelext *extp = cfi->cmdset_priv; cfi_intelext_otp_walk() 2295 devsize = (1 << cfi->cfiq->DevSize) * cfi->interleave; cfi_intelext_otp_walk() 2296 chip_step = devsize >> cfi->chipshift; cfi_intelext_otp_walk() 2301 if (cfi->mfr == CFI_MFR_INTEL) { cfi_intelext_otp_walk() 2302 switch (cfi->id) { cfi_intelext_otp_walk() 2310 for ( ; chip_num < cfi->numchips; chip_num += chip_step) { cfi_intelext_otp_walk() 2311 chip = &cfi->chips[chip_num]; cfi_intelext_otp_walk() 2325 data_offset *= cfi->interleave * cfi->device_type; cfi_intelext_otp_walk() 2326 reg_prot_offset *= cfi->interleave * cfi->device_type; cfi_intelext_otp_walk() 2327 reg_fact_size *= cfi->interleave; cfi_intelext_otp_walk() 2328 reg_user_size *= cfi->interleave; cfi_intelext_otp_walk() 2486 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_suspend() local 2487 struct cfi_pri_intelext *extp = cfi->cmdset_priv; cfi_intelext_suspend() 2496 for (i=0; !ret && i<cfi->numchips; i++) { cfi_intelext_suspend() 2497 chip = &cfi->chips[i]; cfi_intelext_suspend() 2508 map_write(map, CMD(0xFF), cfi->chips[i].start); cfi_intelext_suspend() 2538 chip = &cfi->chips[i]; cfi_intelext_suspend() 2580 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_resume() local 2581 struct cfi_pri_intelext *extp = cfi->cmdset_priv; cfi_intelext_resume() 2585 for (i=0; i<cfi->numchips; i++) { cfi_intelext_resume() 2587 chip = &cfi->chips[i]; cfi_intelext_resume() 2595 map_write(map, CMD(0xFF), cfi->chips[i].start); cfi_intelext_resume() 2611 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_reset() local 2614 for (i=0; i < cfi->numchips; i++) { cfi_intelext_reset() 2615 struct flchip *chip = &cfi->chips[i]; cfi_intelext_reset() 2646 struct cfi_private *cfi = map->fldrv_priv; cfi_intelext_destroy() local 2651 kfree(cfi->cmdset_priv); cfi_intelext_destroy() 2652 kfree(cfi->cfiq); cfi_intelext_destroy() 2653 kfree(cfi->chips[0].priv); cfi_intelext_destroy() 2654 kfree(cfi); cfi_intelext_destroy()
|
H A D | map_absent.c | 11 * my_dev[i] = do_map_probe("cfi", &my_map[i]);
|
H A D | fwh_lock.h | 31 struct cfi_private *cfi = map->fldrv_priv; fwh_xxlock_oneblock() local
|
/linux-4.4.14/include/linux/mtd/ |
H A D | cfi.h | 33 #define cfi_interleave(cfi) 1 34 #define cfi_interleave_is_1(cfi) (cfi_interleave(cfi) == 1) 36 #define cfi_interleave_is_1(cfi) (0) 42 # define cfi_interleave(cfi) ((cfi)->interleave) 44 # define cfi_interleave(cfi) 2 46 #define cfi_interleave_is_2(cfi) (cfi_interleave(cfi) == 2) 48 #define cfi_interleave_is_2(cfi) (0) 54 # define cfi_interleave(cfi) ((cfi)->interleave) 56 # define cfi_interleave(cfi) 4 58 #define cfi_interleave_is_4(cfi) (cfi_interleave(cfi) == 4) 60 #define cfi_interleave_is_4(cfi) (0) 66 # define cfi_interleave(cfi) ((cfi)->interleave) 68 # define cfi_interleave(cfi) 8 70 #define cfi_interleave_is_8(cfi) (cfi_interleave(cfi) == 8) 72 #define cfi_interleave_is_8(cfi) (0) 77 static inline int cfi_interleave(void *cfi) cfi_interleave() argument 300 struct map_info *map, struct cfi_private *cfi); 302 map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cfi_private *cfi); 303 #define CMD(x) cfi_build_cmd((x), map, cfi) 306 struct cfi_private *cfi); 307 #define MERGESTATUS(x) cfi_merge_status((x), map, cfi) 310 struct map_info *map, struct cfi_private *cfi, 348 struct cfi_private *cfi); 350 struct cfi_private *cfi); 352 struct cfi_private *cfi);
|
H A D | gen_probe.h | 26 #include <linux/mtd/cfi.h> 32 unsigned long *chip_map, struct cfi_private *cfi);
|
H A D | spi-nor.h | 14 #include <linux/mtd/cfi.h>
|
/linux-4.4.14/fs/udf/ |
H A D | namei.c | 43 int udf_write_fi(struct inode *inode, struct fileIdentDesc *cfi, udf_write_fi() argument 50 uint16_t liu = le16_to_cpu(cfi->lengthOfImpUse); udf_write_fi() 51 uint8_t lfi = cfi->lengthFileIdent; udf_write_fi() 99 crc = crc_itu_t(0, (uint8_t *)cfi + sizeof(struct tag), udf_write_fi() 118 cfi->descTag.descCRC = cpu_to_le16(crc); udf_write_fi() 119 cfi->descTag.descCRCLength = cpu_to_le16(crclen); udf_write_fi() 120 cfi->descTag.tagChecksum = udf_tag_checksum(&cfi->descTag); udf_write_fi() 123 memcpy((uint8_t *)sfi, (uint8_t *)cfi, udf_write_fi() 126 memcpy((uint8_t *)sfi, (uint8_t *)cfi, -fibh->soffset); udf_write_fi() 127 memcpy(fibh->ebh->b_data, (uint8_t *)cfi - fibh->soffset, udf_write_fi() 147 * @cfi: found file identifier descriptor with given name 155 * for other directory manipulation functions. For inspection of the FID @cfi 163 struct fileIdentDesc *cfi) udf_find_entry() 217 fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &epos, &eloc, udf_find_entry() 224 liu = le16_to_cpu(cfi->lengthOfImpUse); udf_find_entry() 225 lfi = cfi->lengthFileIdent; udf_find_entry() 247 if ((cfi->fileCharacteristics & FID_FILE_CHAR_DELETED) != 0) { udf_find_entry() 252 if ((cfi->fileCharacteristics & FID_FILE_CHAR_HIDDEN) != 0) { udf_find_entry() 257 if ((cfi->fileCharacteristics & FID_FILE_CHAR_PARENT) && udf_find_entry() 290 struct fileIdentDesc cfi; udf_lookup() local 312 fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); udf_lookup() 323 loc = lelb_to_cpu(cfi.icb.extLocation); udf_lookup() 335 struct fileIdentDesc *cfi, int *err) udf_add_entry() 408 fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &epos, &eloc, udf_add_entry() 416 liu = le16_to_cpu(cfi->lengthOfImpUse); udf_add_entry() 417 lfi = cfi->lengthFileIdent; udf_add_entry() 419 if ((cfi->fileCharacteristics & FID_FILE_CHAR_DELETED) != 0) { udf_add_entry() 422 cfi->descTag.tagSerialNum = cpu_to_le16(1); udf_add_entry() 423 cfi->fileVersionNum = cpu_to_le16(1); udf_add_entry() 424 cfi->fileCharacteristics = 0; udf_add_entry() 425 cfi->lengthFileIdent = namelen; udf_add_entry() 426 cfi->lengthOfImpUse = cpu_to_le16(0); udf_add_entry() 427 if (!udf_write_fi(dir, cfi, fi, fibh, NULL, udf_add_entry() 531 memset(cfi, 0, sizeof(struct fileIdentDesc)); udf_add_entry() 533 udf_new_tag((char *)cfi, TAG_IDENT_FID, 3, 1, block, udf_add_entry() 536 udf_new_tag((char *)cfi, TAG_IDENT_FID, 2, 1, block, udf_add_entry() 538 cfi->fileVersionNum = cpu_to_le16(1); udf_add_entry() 539 cfi->lengthFileIdent = namelen; udf_add_entry() 540 cfi->lengthOfImpUse = cpu_to_le16(0); udf_add_entry() 541 if (!udf_write_fi(dir, cfi, fi, fibh, NULL, name)) { udf_add_entry() 579 struct fileIdentDesc *cfi) udf_delete_entry() 581 cfi->fileCharacteristics |= FID_FILE_CHAR_DELETED; udf_delete_entry() 584 memset(&(cfi->icb), 0x00, sizeof(struct long_ad)); udf_delete_entry() 586 return udf_write_fi(inode, cfi, fi, fibh, NULL, NULL); udf_delete_entry() 594 struct fileIdentDesc cfi, *fi; udf_add_nondir() local 597 fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); udf_add_nondir() 604 cfi.icb.extLength = cpu_to_le32(inode->i_sb->s_blocksize); udf_add_nondir() 605 cfi.icb.extLocation = cpu_to_lelb(iinfo->i_location); udf_add_nondir() 606 *(__le32 *)((struct allocDescImpUse *)cfi.icb.impUse)->impUse = udf_add_nondir() 608 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); udf_add_nondir() 678 struct fileIdentDesc cfi, *fi; udf_mkdir() local 690 fi = udf_add_entry(inode, NULL, &fibh, &cfi, &err); udf_mkdir() 698 cfi.icb.extLength = cpu_to_le32(inode->i_sb->s_blocksize); udf_mkdir() 699 cfi.icb.extLocation = cpu_to_lelb(dinfo->i_location); udf_mkdir() 700 *(__le32 *)((struct allocDescImpUse *)cfi.icb.impUse)->impUse = udf_mkdir() 702 cfi.fileCharacteristics = udf_mkdir() 704 udf_write_fi(inode, &cfi, fi, &fibh, NULL, NULL); udf_mkdir() 708 fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); udf_mkdir() 716 cfi.icb.extLength = cpu_to_le32(inode->i_sb->s_blocksize); udf_mkdir() 717 cfi.icb.extLocation = cpu_to_lelb(iinfo->i_location); udf_mkdir() 718 *(__le32 *)((struct allocDescImpUse *)cfi.icb.impUse)->impUse = udf_mkdir() 720 cfi.fileCharacteristics |= FID_FILE_CHAR_DIRECTORY; udf_mkdir() 721 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); udf_mkdir() 738 struct fileIdentDesc *fi, cfi; empty_dir() local 777 fi = udf_fileident_read(dir, &f_pos, &fibh, &cfi, &epos, &eloc, empty_dir() 787 if (cfi.lengthFileIdent && empty_dir() 788 (cfi.fileCharacteristics & FID_FILE_CHAR_DELETED) == 0) { empty_dir() 810 struct fileIdentDesc *fi, cfi; udf_rmdir() local 814 fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); udf_rmdir() 822 tloc = lelb_to_cpu(cfi.icb.extLocation); udf_rmdir() 828 retval = udf_delete_entry(dir, fi, &fibh, &cfi); udf_rmdir() 856 struct fileIdentDesc cfi; udf_unlink() local 860 fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); udf_unlink() 869 tloc = lelb_to_cpu(cfi.icb.extLocation); udf_unlink() 878 retval = udf_delete_entry(dir, fi, &fibh, &cfi); udf_unlink() 1049 struct fileIdentDesc cfi, *fi; udf_link() local 1052 fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); udf_link() 1056 cfi.icb.extLength = cpu_to_le32(inode->i_sb->s_blocksize); udf_link() 1057 cfi.icb.extLocation = cpu_to_lelb(UDF_I(inode)->i_location); udf_link() 1059 *(__le32 *)((struct allocDescImpUse *)cfi.icb.impUse)->impUse = udf_link() 1062 udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); udf_link() 1230 struct fileIdentDesc cfi; udf_get_parent() local 1233 if (!udf_find_entry(d_inode(child), &dotdot, &fibh, &cfi)) udf_get_parent() 1240 tloc = lelb_to_cpu(cfi.icb.extLocation); udf_get_parent() 160 udf_find_entry(struct inode *dir, const struct qstr *child, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi) udf_find_entry() argument 332 udf_add_entry(struct inode *dir, struct dentry *dentry, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi, int *err) udf_add_entry() argument 577 udf_delete_entry(struct inode *inode, struct fileIdentDesc *fi, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi) udf_delete_entry() argument
|
H A D | dir.c | 44 struct fileIdentDesc cfi; udf_readdir() local 128 fi = udf_fileident_read(dir, &nf_pos, &fibh, &cfi, &epos, &eloc, udf_readdir() 133 liu = le16_to_cpu(cfi.lengthOfImpUse); udf_readdir() 134 lfi = cfi.lengthFileIdent; udf_readdir() 154 if ((cfi.fileCharacteristics & FID_FILE_CHAR_DELETED) != 0) { udf_readdir() 159 if ((cfi.fileCharacteristics & FID_FILE_CHAR_HIDDEN) != 0) { udf_readdir() 164 if (cfi.fileCharacteristics & FID_FILE_CHAR_PARENT) { udf_readdir() 174 tloc = lelb_to_cpu(cfi.icb.extLocation); udf_readdir()
|
H A D | directory.c | 22 struct fileIdentDesc *cfi, udf_fileident_read() 46 memcpy((uint8_t *)cfi, (uint8_t *)fi, udf_fileident_read() 109 memcpy((uint8_t *)cfi, (uint8_t *)fi, udf_fileident_read() 137 memcpy((uint8_t *)cfi, (uint8_t *)fi, -fibh->soffset); udf_fileident_read() 138 memcpy((uint8_t *)cfi - fibh->soffset, udf_fileident_read() 143 cfi->lengthFileIdent + udf_fileident_read() 144 le16_to_cpu(cfi->lengthOfImpUse) + 3) & ~3; udf_fileident_read() 149 memcpy((uint8_t *)cfi, (uint8_t *)fi, udf_fileident_read() 20 udf_fileident_read(struct inode *dir, loff_t *nf_pos, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi, struct extent_position *epos, struct kernel_lb_addr *eloc, uint32_t *elen, sector_t *offset) udf_fileident_read() argument
|
H A D | inode.c | 340 struct fileIdentDesc cfi, *sfi, *dfi; udf_expand_dir_adinicb() local 381 sfi = udf_fileident_read(inode, &f_pos, &sfibh, &cfi, NULL, udf_expand_dir_adinicb()
|
/linux-4.4.14/tools/perf/arch/powerpc/util/ |
H A D | skip-callchain-idx.c | 97 Dwarf_CFI *cfi; get_eh_frame() local 100 cfi = dwfl_module_eh_cfi(mod, &bias); get_eh_frame() 101 if (!cfi) { get_eh_frame() 106 result = dwarf_cfi_addrframe(cfi, pc-bias, &frame); get_eh_frame() 120 Dwarf_CFI *cfi; get_dwarf_frame() local 125 cfi = dwfl_module_dwarf_cfi(mod, &bias); get_dwarf_frame() 126 if (!cfi) { get_dwarf_frame() 131 result = dwarf_cfi_addrframe(cfi, pc-bias, &frame); get_dwarf_frame()
|
/linux-4.4.14/drivers/mtd/maps/ |
H A D | lantiq-flash.c | 19 #include <linux/mtd/cfi.h> 115 struct cfi_private *cfi; ltq_mtd_probe() local 165 cfi = ltq_mtd->map->fldrv_priv; ltq_mtd_probe() 166 cfi->addr_unlock1 ^= 1; ltq_mtd_probe() 167 cfi->addr_unlock2 ^= 1; ltq_mtd_probe()
|
H A D | scb2_flash.c | 53 #include <linux/mtd/cfi.h> 76 struct cfi_private *cfi = map->fldrv_priv; scb2_fixup_mtd() local 79 if (cfi->cfiq->InterfaceDesc != CFI_INTERFACE_X16_ASYNC) { scb2_fixup_mtd() 81 cfi->cfiq->InterfaceDesc); scb2_fixup_mtd()
|
H A D | amd76xrom.c | 15 #include <linux/mtd/cfi.h> 185 struct cfi_private *cfi; amd76xrom_init_one() local 258 cfi = map->map.fldrv_priv; amd76xrom_init_one() 259 for(i = 0; i < cfi->numchips; i++) { amd76xrom_init_one() 260 cfi->chips[i].start += offset; amd76xrom_init_one()
|
H A D | ck804xrom.c | 18 #include <linux/mtd/cfi.h> 215 struct cfi_private *cfi; ck804xrom_init_one() local 288 cfi = map->map.fldrv_priv; ck804xrom_init_one() 289 for(i = 0; i < cfi->numchips; i++) ck804xrom_init_one() 290 cfi->chips[i].start += offset; ck804xrom_init_one()
|
H A D | ichxrom.c | 15 #include <linux/mtd/cfi.h> 207 struct cfi_private *cfi; ichxrom_init_one() local 283 cfi = map->map.fldrv_priv; ichxrom_init_one() 284 for(i = 0; i < cfi->numchips; i++) { ichxrom_init_one() 285 cfi->chips[i].start += offset; ichxrom_init_one()
|
H A D | nettel.c | 19 #include <linux/mtd/cfi.h> 144 struct cfi_private *cfi = nettel_intel_map.fldrv_priv; nettel_reboot_notifier() local 149 cfi_send_gen_cmd(0xff, 0x55, b, &nettel_intel_map, cfi, nettel_reboot_notifier() 150 cfi->device_type, NULL); nettel_reboot_notifier()
|
H A D | esb2rom.c | 21 #include <linux/mtd/cfi.h> 275 struct cfi_private *cfi; esb2rom_init_one() local 349 cfi = map->map.fldrv_priv; esb2rom_init_one() 350 for(i = 0; i < cfi->numchips; i++) esb2rom_init_one() 351 cfi->chips[i].start += offset; esb2rom_init_one()
|
H A D | intel_vr_nor.c | 37 #include <linux/mtd/cfi.h>
|
H A D | sbc_gxx.c | 170 of flash so the cfi probe routines find all
|
H A D | physmap_of.c | 337 .compatible = "cfi-flash",
|
/linux-4.4.14/arch/x86/ |
H A D | Makefile | 163 cfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_endproc,-DCONFIG_AS_CFI=1) macro 165 cfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1) 166 cfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1) 177 KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(sha1_ni_instr) $(sha256_ni_instr) 178 KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(sha1_ni_instr) $(sha256_ni_instr)
|
/linux-4.4.14/arch/unicore32/ |
H A D | Makefile | 24 KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
|
/linux-4.4.14/drivers/media/pci/cobalt/ |
H A D | cobalt-flash.c | 23 #include <linux/mtd/cfi.h>
|
/linux-4.4.14/arch/mips/cavium-octeon/ |
H A D | flash_setup.c | 123 .compatible = "cfi-flash",
|
/linux-4.4.14/tools/perf/util/ |
H A D | probe-finder.h | 79 Dwarf_CFI *cfi; /* Call Frame Information */ member in struct:probe_finder
|
H A D | probe-finder.c | 688 pf->cfi != NULL) { call_probe_finder() 690 if (dwarf_cfi_addrframe(pf->cfi, pf->addr, &frame) != 0 || call_probe_finder() 1041 pf->cfi = dwarf_getcfi_elf(elf); debuginfo__find_probes() 1043 pf->cfi = dwarf_getcfi(dbg->dbg); debuginfo__find_probes()
|
/linux-4.4.14/drivers/net/ethernet/cisco/enic/ |
H A D | cq_enet_desc.h | 149 * Tag Control Information(16) = user_priority(3) + cfi(1) + vlan(12) cq_enet_rq_desc_dec()
|
/linux-4.4.14/arch/arm/mach-integrator/ |
H A D | integrator_ap.c | 269 OF_DEV_AUXDATA("cfi-flash", INTEGRATOR_FLASH_BASE,
|
H A D | integrator_cp.c | 263 OF_DEV_AUXDATA("cfi-flash", INTCP_PA_FLASH_BASE,
|
/linux-4.4.14/drivers/net/ethernet/freescale/ |
H A D | gianfar_ethtool.c | 1167 u32 cfi = 0, cfi_mask = 0; gfar_convert_to_filer() local 1183 cfi = vlan_tci_cfi(rule); gfar_convert_to_filer() 1188 if (cfi == VLAN_TAG_PRESENT && cfi_mask == VLAN_TAG_PRESENT) { gfar_convert_to_filer() 1191 } else if (cfi != VLAN_TAG_PRESENT && gfar_convert_to_filer()
|
/linux-4.4.14/arch/arm/ |
H A D | Makefile | 31 KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
|
/linux-4.4.14/arch/powerpc/platforms/85xx/ |
H A D | p1022_ds.c | 495 np2 = of_find_compatible_node(np, NULL, "cfi-flash"); p1022_ds_setup_arch()
|
/linux-4.4.14/arch/powerpc/ |
H A D | Makefile | 193 KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
|
/linux-4.4.14/drivers/net/hyperv/ |
H A D | hyperv_net.h | 882 u32 cfi:1; /* Canonical Format ID */ member in struct:ndis_pkt_8021q_info::__anon7924::__anon7925
|
/linux-4.4.14/net/core/ |
H A D | pktgen.c | 2694 static inline __be16 build_tci(unsigned int id, unsigned int cfi, build_tci() argument 2697 return htons(id | (cfi << 12) | (prio << 13)); build_tci()
|
/linux-4.4.14/arch/s390/kernel/ |
H A D | dis.c | 1232 { "cfi", 0x0d, INSTR_RIL_RI },
|
/linux-4.4.14/drivers/net/ethernet/tehuti/ |
H A D | tehuti.c | 1322 DBG("ERROR: rxdd bc %d rxfq %d to %d type %d err %d rxp %d pkt_id %d vtag %d len %d vlan_id %d cfi %d prio %d va_lo %d va_hi %d\n", print_rxdd()
|