Lines Matching full:extp
120 static void cfi_tell_features(struct cfi_pri_intelext *extp) in cfi_tell_features() argument
123 printk(" Extended Query version %c.%c\n", extp->MajorVersion, extp->MinorVersion); in cfi_tell_features()
124 printk(" Feature/Command Support: %4.4X\n", extp->FeatureSupport); in cfi_tell_features()
125 printk(" - Chip Erase: %s\n", extp->FeatureSupport&1?"supported":"unsupported"); in cfi_tell_features()
126 printk(" - Suspend Erase: %s\n", extp->FeatureSupport&2?"supported":"unsupported"); in cfi_tell_features()
127 printk(" - Suspend Program: %s\n", extp->FeatureSupport&4?"supported":"unsupported"); in cfi_tell_features()
128 printk(" - Legacy Lock/Unlock: %s\n", extp->FeatureSupport&8?"supported":"unsupported"); in cfi_tell_features()
129 printk(" - Queued Erase: %s\n", extp->FeatureSupport&16?"supported":"unsupported"); in cfi_tell_features()
130 printk(" - Instant block lock: %s\n", extp->FeatureSupport&32?"supported":"unsupported"); in cfi_tell_features()
131 printk(" - Protection Bits: %s\n", extp->FeatureSupport&64?"supported":"unsupported"); in cfi_tell_features()
132 printk(" - Page-mode read: %s\n", extp->FeatureSupport&128?"supported":"unsupported"); in cfi_tell_features()
133 printk(" - Synchronous read: %s\n", extp->FeatureSupport&256?"supported":"unsupported"); in cfi_tell_features()
134 printk(" - Simultaneous operations: %s\n", extp->FeatureSupport&512?"supported":"unsupported"); in cfi_tell_features()
135 …printk(" - Extended Flash Array: %s\n", extp->FeatureSupport&1024?"supported":"unsupported"… in cfi_tell_features()
137 if (extp->FeatureSupport & (1<<i)) in cfi_tell_features()
141 printk(" Supported functions after Suspend: %2.2X\n", extp->SuspendCmdSupport); in cfi_tell_features()
142 …printk(" - Program after Erase Suspend: %s\n", extp->SuspendCmdSupport&1?"supported":"unsuppor… in cfi_tell_features()
144 if (extp->SuspendCmdSupport & (1<<i)) in cfi_tell_features()
148 printk(" Block Status Register Mask: %4.4X\n", extp->BlkStatusRegMask); in cfi_tell_features()
149 printk(" - Lock Bit Active: %s\n", extp->BlkStatusRegMask&1?"yes":"no"); in cfi_tell_features()
150 printk(" - Lock-Down Bit Active: %s\n", extp->BlkStatusRegMask&2?"yes":"no"); in cfi_tell_features()
152 if (extp->BlkStatusRegMask & (1<<i)) in cfi_tell_features()
155 printk(" - EFA Lock Bit: %s\n", extp->BlkStatusRegMask&16?"yes":"no"); in cfi_tell_features()
156 printk(" - EFA Lock-Down Bit: %s\n", extp->BlkStatusRegMask&32?"yes":"no"); in cfi_tell_features()
158 if (extp->BlkStatusRegMask & (1<<i)) in cfi_tell_features()
163 extp->VccOptimal >> 4, extp->VccOptimal & 0xf); in cfi_tell_features()
164 if (extp->VppOptimal) in cfi_tell_features()
166 extp->VppOptimal >> 4, extp->VppOptimal & 0xf); in cfi_tell_features()
175 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in fixup_convert_atmel_pri() local
180 extp->FeatureSupport = cpu_to_le32(extp->FeatureSupport); in fixup_convert_atmel_pri()
181 extp->BlkStatusRegMask = cpu_to_le16(extp->BlkStatusRegMask); in fixup_convert_atmel_pri()
182 extp->ProtRegAddr = cpu_to_le16(extp->ProtRegAddr); in fixup_convert_atmel_pri()
184 memcpy(&atmel_pri, extp, sizeof(atmel_pri)); in fixup_convert_atmel_pri()
185 memset((char *)extp + 5, 0, sizeof(*extp) - 5); in fixup_convert_atmel_pri()
204 extp->FeatureSupport = features; in fixup_convert_atmel_pri()
227 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in fixup_intel_strataflash() local
231 extp->SuspendCmdSupport &= ~1; in fixup_intel_strataflash()
282 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in fixup_LH28F640BF() local
294 extp->FeatureSupport &= ~512; in fixup_LH28F640BF()
373 struct cfi_pri_intelext *extp) in cfi_fixup_major_minor() argument
376 cfi->id == PF38F4476 && extp->MinorVersion == '3') in cfi_fixup_major_minor()
377 extp->MinorVersion = '1'; in cfi_fixup_major_minor()
395 struct cfi_pri_intelext *extp; in read_pri_intelext() local
397 unsigned int extp_size = sizeof(*extp); in read_pri_intelext()
400 extp = (struct cfi_pri_intelext *)cfi_read_pri(map, adr, extp_size, "Intel/Sharp"); in read_pri_intelext()
401 if (!extp) in read_pri_intelext()
404 cfi_fixup_major_minor(cfi, extp); in read_pri_intelext()
406 if (extp->MajorVersion != '1' || in read_pri_intelext()
407 (extp->MinorVersion < '0' || extp->MinorVersion > '5')) { in read_pri_intelext()
409 "version %c.%c.\n", extp->MajorVersion, in read_pri_intelext()
410 extp->MinorVersion); in read_pri_intelext()
411 kfree(extp); in read_pri_intelext()
416 extp->FeatureSupport = le32_to_cpu(extp->FeatureSupport); in read_pri_intelext()
417 extp->BlkStatusRegMask = le16_to_cpu(extp->BlkStatusRegMask); in read_pri_intelext()
418 extp->ProtRegAddr = le16_to_cpu(extp->ProtRegAddr); in read_pri_intelext()
420 if (extp->MinorVersion >= '0') { in read_pri_intelext()
424 if (extp->NumProtectionFields) in read_pri_intelext()
425 extra_size += (extp->NumProtectionFields - 1) * in read_pri_intelext()
429 if (extp->MinorVersion >= '1') { in read_pri_intelext()
432 if (extp_size < sizeof(*extp) + extra_size) in read_pri_intelext()
434 extra_size += extp->extra[extra_size - 1]; in read_pri_intelext()
437 if (extp->MinorVersion >= '3') { in read_pri_intelext()
442 if (extp_size < sizeof(*extp) + extra_size) in read_pri_intelext()
444 nb_parts = extp->extra[extra_size - 1]; in read_pri_intelext()
447 if (extp->MinorVersion >= '4') in read_pri_intelext()
452 rinfo = (struct cfi_intelext_regioninfo *)&extp->extra[extra_size]; in read_pri_intelext()
454 if (extp_size < sizeof(*extp) + extra_size) in read_pri_intelext()
461 if (extp->MinorVersion >= '4') in read_pri_intelext()
464 if (extp_size < sizeof(*extp) + extra_size) { in read_pri_intelext()
466 extp_size = sizeof(*extp) + extra_size; in read_pri_intelext()
467 kfree(extp); in read_pri_intelext()
478 return extp; in read_pri_intelext()
517 struct cfi_pri_intelext *extp; in cfi_cmdset_0001() local
519 extp = read_pri_intelext(map, adr); in cfi_cmdset_0001()
520 if (!extp) { in cfi_cmdset_0001()
526 cfi->cmdset_priv = extp; in cfi_cmdset_0001()
532 cfi_tell_features(extp); in cfi_cmdset_0001()
535 if(extp->SuspendCmdSupport & 1) { in cfi_cmdset_0001()
685 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_partition_fixup() local
698 if (extp && extp->MajorVersion == '1' && extp->MinorVersion >= '3' in cfi_intelext_partition_fixup()
699 && extp->FeatureSupport & (1 << 9)) { in cfi_intelext_partition_fixup()
707 if (extp->NumProtectionFields) in cfi_intelext_partition_fixup()
708 offs = (extp->NumProtectionFields - 1) * in cfi_intelext_partition_fixup()
712 offs += extp->extra[offs+1]+2; in cfi_intelext_partition_fixup()
715 numregions = extp->extra[offs]; in cfi_intelext_partition_fixup()
719 if (extp->MinorVersion >= '4') in cfi_intelext_partition_fixup()
726 rinfo = (struct cfi_intelext_regioninfo *)&extp->extra[offs]; in cfi_intelext_partition_fixup()
737 if (extp->MinorVersion >= '4') { in cfi_intelext_partition_fixup()
739 prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs]; in cfi_intelext_partition_fixup()
2108 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in do_xxlock_oneblock() local
2146 mdelay = (!extp || !(extp->FeatureSupport & (1 << 5))) ? 1500 : 0; in do_xxlock_oneblock()
2305 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_otp_walk() local
2316 if (!extp || !(extp->FeatureSupport & 64) || !extp->NumProtectionFields) in cfi_intelext_otp_walk()
2337 otp = (struct cfi_intelext_otpinfo *)&extp->extra[0]; in cfi_intelext_otp_walk()
2341 reg_prot_offset = extp->ProtRegAddr; in cfi_intelext_otp_walk()
2343 reg_fact_size = 1 << extp->FactProtRegSize; in cfi_intelext_otp_walk()
2345 reg_user_size = 1 << extp->UserProtRegSize; in cfi_intelext_otp_walk()
2419 if (++field == extp->NumProtectionFields) in cfi_intelext_otp_walk()
2512 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_suspend() local
2518 && extp && (extp->FeatureSupport & (1 << 5))) in cfi_intelext_suspend()
2607 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_resume() local
2630 && extp && (extp->FeatureSupport & (1 << 5))) in cfi_intelext_resume()