Lines Matching refs:extp

121 static void cfi_tell_features(struct cfi_pri_intelext *extp)  in cfi_tell_features()  argument
124 printk(" Extended Query version %c.%c\n", extp->MajorVersion, extp->MinorVersion); in cfi_tell_features()
125 printk(" Feature/Command Support: %4.4X\n", extp->FeatureSupport); in cfi_tell_features()
126 printk(" - Chip Erase: %s\n", extp->FeatureSupport&1?"supported":"unsupported"); in cfi_tell_features()
127 printk(" - Suspend Erase: %s\n", extp->FeatureSupport&2?"supported":"unsupported"); in cfi_tell_features()
128 printk(" - Suspend Program: %s\n", extp->FeatureSupport&4?"supported":"unsupported"); in cfi_tell_features()
129 printk(" - Legacy Lock/Unlock: %s\n", extp->FeatureSupport&8?"supported":"unsupported"); in cfi_tell_features()
130 printk(" - Queued Erase: %s\n", extp->FeatureSupport&16?"supported":"unsupported"); in cfi_tell_features()
131 printk(" - Instant block lock: %s\n", extp->FeatureSupport&32?"supported":"unsupported"); in cfi_tell_features()
132 printk(" - Protection Bits: %s\n", extp->FeatureSupport&64?"supported":"unsupported"); in cfi_tell_features()
133 printk(" - Page-mode read: %s\n", extp->FeatureSupport&128?"supported":"unsupported"); in cfi_tell_features()
134 printk(" - Synchronous read: %s\n", extp->FeatureSupport&256?"supported":"unsupported"); in cfi_tell_features()
135 printk(" - Simultaneous operations: %s\n", extp->FeatureSupport&512?"supported":"unsupported"); in cfi_tell_features()
136 …printk(" - Extended Flash Array: %s\n", extp->FeatureSupport&1024?"supported":"unsupported"… in cfi_tell_features()
138 if (extp->FeatureSupport & (1<<i)) in cfi_tell_features()
142 printk(" Supported functions after Suspend: %2.2X\n", extp->SuspendCmdSupport); in cfi_tell_features()
143 …printk(" - Program after Erase Suspend: %s\n", extp->SuspendCmdSupport&1?"supported":"unsuppor… in cfi_tell_features()
145 if (extp->SuspendCmdSupport & (1<<i)) in cfi_tell_features()
149 printk(" Block Status Register Mask: %4.4X\n", extp->BlkStatusRegMask); in cfi_tell_features()
150 printk(" - Lock Bit Active: %s\n", extp->BlkStatusRegMask&1?"yes":"no"); in cfi_tell_features()
151 printk(" - Lock-Down Bit Active: %s\n", extp->BlkStatusRegMask&2?"yes":"no"); in cfi_tell_features()
153 if (extp->BlkStatusRegMask & (1<<i)) in cfi_tell_features()
156 printk(" - EFA Lock Bit: %s\n", extp->BlkStatusRegMask&16?"yes":"no"); in cfi_tell_features()
157 printk(" - EFA Lock-Down Bit: %s\n", extp->BlkStatusRegMask&32?"yes":"no"); in cfi_tell_features()
159 if (extp->BlkStatusRegMask & (1<<i)) in cfi_tell_features()
164 extp->VccOptimal >> 4, extp->VccOptimal & 0xf); in cfi_tell_features()
165 if (extp->VppOptimal) in cfi_tell_features()
167 extp->VppOptimal >> 4, extp->VppOptimal & 0xf); in cfi_tell_features()
176 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in fixup_convert_atmel_pri() local
181 extp->FeatureSupport = cpu_to_le32(extp->FeatureSupport); in fixup_convert_atmel_pri()
182 extp->BlkStatusRegMask = cpu_to_le16(extp->BlkStatusRegMask); in fixup_convert_atmel_pri()
183 extp->ProtRegAddr = cpu_to_le16(extp->ProtRegAddr); in fixup_convert_atmel_pri()
185 memcpy(&atmel_pri, extp, sizeof(atmel_pri)); in fixup_convert_atmel_pri()
186 memset((char *)extp + 5, 0, sizeof(*extp) - 5); in fixup_convert_atmel_pri()
205 extp->FeatureSupport = features; in fixup_convert_atmel_pri()
228 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in fixup_intel_strataflash() local
232 extp->SuspendCmdSupport &= ~1; in fixup_intel_strataflash()
283 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in fixup_LH28F640BF() local
295 extp->FeatureSupport &= ~512; in fixup_LH28F640BF()
374 struct cfi_pri_intelext *extp) in cfi_fixup_major_minor() argument
377 cfi->id == PF38F4476 && extp->MinorVersion == '3') in cfi_fixup_major_minor()
378 extp->MinorVersion = '1'; in cfi_fixup_major_minor()
396 struct cfi_pri_intelext *extp; in read_pri_intelext() local
398 unsigned int extp_size = sizeof(*extp); in read_pri_intelext()
401 extp = (struct cfi_pri_intelext *)cfi_read_pri(map, adr, extp_size, "Intel/Sharp"); in read_pri_intelext()
402 if (!extp) in read_pri_intelext()
405 cfi_fixup_major_minor(cfi, extp); in read_pri_intelext()
407 if (extp->MajorVersion != '1' || in read_pri_intelext()
408 (extp->MinorVersion < '0' || extp->MinorVersion > '5')) { in read_pri_intelext()
410 "version %c.%c.\n", extp->MajorVersion, in read_pri_intelext()
411 extp->MinorVersion); in read_pri_intelext()
412 kfree(extp); in read_pri_intelext()
417 extp->FeatureSupport = le32_to_cpu(extp->FeatureSupport); in read_pri_intelext()
418 extp->BlkStatusRegMask = le16_to_cpu(extp->BlkStatusRegMask); in read_pri_intelext()
419 extp->ProtRegAddr = le16_to_cpu(extp->ProtRegAddr); in read_pri_intelext()
421 if (extp->MinorVersion >= '0') { in read_pri_intelext()
425 if (extp->NumProtectionFields) { in read_pri_intelext()
427 (struct cfi_intelext_otpinfo *)&extp->extra[0]; in read_pri_intelext()
429 extra_size += (extp->NumProtectionFields - 1) * in read_pri_intelext()
432 if (extp_size >= sizeof(*extp) + extra_size) { in read_pri_intelext()
436 for (i = 0; i < extp->NumProtectionFields - 1; i++) { in read_pri_intelext()
446 if (extp->MinorVersion >= '1') { in read_pri_intelext()
449 if (extp_size < sizeof(*extp) + extra_size) in read_pri_intelext()
451 extra_size += extp->extra[extra_size - 1]; in read_pri_intelext()
454 if (extp->MinorVersion >= '3') { in read_pri_intelext()
459 if (extp_size < sizeof(*extp) + extra_size) in read_pri_intelext()
461 nb_parts = extp->extra[extra_size - 1]; in read_pri_intelext()
464 if (extp->MinorVersion >= '4') in read_pri_intelext()
469 rinfo = (struct cfi_intelext_regioninfo *)&extp->extra[extra_size]; in read_pri_intelext()
471 if (extp_size < sizeof(*extp) + extra_size) in read_pri_intelext()
478 if (extp->MinorVersion >= '4') in read_pri_intelext()
481 if (extp_size < sizeof(*extp) + extra_size) { in read_pri_intelext()
483 extp_size = sizeof(*extp) + extra_size; in read_pri_intelext()
484 kfree(extp); in read_pri_intelext()
495 return extp; in read_pri_intelext()
534 struct cfi_pri_intelext *extp; in cfi_cmdset_0001() local
536 extp = read_pri_intelext(map, adr); in cfi_cmdset_0001()
537 if (!extp) { in cfi_cmdset_0001()
543 cfi->cmdset_priv = extp; in cfi_cmdset_0001()
549 cfi_tell_features(extp); in cfi_cmdset_0001()
552 if(extp->SuspendCmdSupport & 1) { in cfi_cmdset_0001()
702 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_partition_fixup() local
715 if (extp && extp->MajorVersion == '1' && extp->MinorVersion >= '3' in cfi_intelext_partition_fixup()
716 && extp->FeatureSupport & (1 << 9)) { in cfi_intelext_partition_fixup()
724 if (extp->NumProtectionFields) in cfi_intelext_partition_fixup()
725 offs = (extp->NumProtectionFields - 1) * in cfi_intelext_partition_fixup()
729 offs += extp->extra[offs+1]+2; in cfi_intelext_partition_fixup()
732 numregions = extp->extra[offs]; in cfi_intelext_partition_fixup()
736 if (extp->MinorVersion >= '4') in cfi_intelext_partition_fixup()
743 rinfo = (struct cfi_intelext_regioninfo *)&extp->extra[offs]; in cfi_intelext_partition_fixup()
754 if (extp->MinorVersion >= '4') { in cfi_intelext_partition_fixup()
756 prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs]; in cfi_intelext_partition_fixup()
2125 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in do_xxlock_oneblock() local
2163 mdelay = (!extp || !(extp->FeatureSupport & (1 << 5))) ? 1500 : 0; in do_xxlock_oneblock()
2322 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_otp_walk() local
2333 if (!extp || !(extp->FeatureSupport & 64) || !extp->NumProtectionFields) in cfi_intelext_otp_walk()
2354 otp = (struct cfi_intelext_otpinfo *)&extp->extra[0]; in cfi_intelext_otp_walk()
2358 reg_prot_offset = extp->ProtRegAddr; in cfi_intelext_otp_walk()
2360 reg_fact_size = 1 << extp->FactProtRegSize; in cfi_intelext_otp_walk()
2362 reg_user_size = 1 << extp->UserProtRegSize; in cfi_intelext_otp_walk()
2436 if (++field == extp->NumProtectionFields) in cfi_intelext_otp_walk()
2529 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_suspend() local
2535 && extp && (extp->FeatureSupport & (1 << 5))) in cfi_intelext_suspend()
2624 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_resume() local
2647 && extp && (extp->FeatureSupport & (1 << 5))) in cfi_intelext_resume()