Lines Matching refs:extp

119 static void cfi_tell_features(struct cfi_pri_intelext *extp)  in cfi_tell_features()  argument
122 printk(" Extended Query version %c.%c\n", extp->MajorVersion, extp->MinorVersion); in cfi_tell_features()
123 printk(" Feature/Command Support: %4.4X\n", extp->FeatureSupport); in cfi_tell_features()
124 printk(" - Chip Erase: %s\n", extp->FeatureSupport&1?"supported":"unsupported"); in cfi_tell_features()
125 printk(" - Suspend Erase: %s\n", extp->FeatureSupport&2?"supported":"unsupported"); in cfi_tell_features()
126 printk(" - Suspend Program: %s\n", extp->FeatureSupport&4?"supported":"unsupported"); in cfi_tell_features()
127 printk(" - Legacy Lock/Unlock: %s\n", extp->FeatureSupport&8?"supported":"unsupported"); in cfi_tell_features()
128 printk(" - Queued Erase: %s\n", extp->FeatureSupport&16?"supported":"unsupported"); in cfi_tell_features()
129 printk(" - Instant block lock: %s\n", extp->FeatureSupport&32?"supported":"unsupported"); in cfi_tell_features()
130 printk(" - Protection Bits: %s\n", extp->FeatureSupport&64?"supported":"unsupported"); in cfi_tell_features()
131 printk(" - Page-mode read: %s\n", extp->FeatureSupport&128?"supported":"unsupported"); in cfi_tell_features()
132 printk(" - Synchronous read: %s\n", extp->FeatureSupport&256?"supported":"unsupported"); in cfi_tell_features()
133 printk(" - Simultaneous operations: %s\n", extp->FeatureSupport&512?"supported":"unsupported"); in cfi_tell_features()
134 …printk(" - Extended Flash Array: %s\n", extp->FeatureSupport&1024?"supported":"unsupported"… in cfi_tell_features()
136 if (extp->FeatureSupport & (1<<i)) in cfi_tell_features()
140 printk(" Supported functions after Suspend: %2.2X\n", extp->SuspendCmdSupport); in cfi_tell_features()
141 …printk(" - Program after Erase Suspend: %s\n", extp->SuspendCmdSupport&1?"supported":"unsuppor… in cfi_tell_features()
143 if (extp->SuspendCmdSupport & (1<<i)) in cfi_tell_features()
147 printk(" Block Status Register Mask: %4.4X\n", extp->BlkStatusRegMask); in cfi_tell_features()
148 printk(" - Lock Bit Active: %s\n", extp->BlkStatusRegMask&1?"yes":"no"); in cfi_tell_features()
149 printk(" - Lock-Down Bit Active: %s\n", extp->BlkStatusRegMask&2?"yes":"no"); in cfi_tell_features()
151 if (extp->BlkStatusRegMask & (1<<i)) in cfi_tell_features()
154 printk(" - EFA Lock Bit: %s\n", extp->BlkStatusRegMask&16?"yes":"no"); in cfi_tell_features()
155 printk(" - EFA Lock-Down Bit: %s\n", extp->BlkStatusRegMask&32?"yes":"no"); in cfi_tell_features()
157 if (extp->BlkStatusRegMask & (1<<i)) in cfi_tell_features()
162 extp->VccOptimal >> 4, extp->VccOptimal & 0xf); in cfi_tell_features()
163 if (extp->VppOptimal) in cfi_tell_features()
165 extp->VppOptimal >> 4, extp->VppOptimal & 0xf); in cfi_tell_features()
174 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in fixup_convert_atmel_pri() local
179 extp->FeatureSupport = cpu_to_le32(extp->FeatureSupport); in fixup_convert_atmel_pri()
180 extp->BlkStatusRegMask = cpu_to_le16(extp->BlkStatusRegMask); in fixup_convert_atmel_pri()
181 extp->ProtRegAddr = cpu_to_le16(extp->ProtRegAddr); in fixup_convert_atmel_pri()
183 memcpy(&atmel_pri, extp, sizeof(atmel_pri)); in fixup_convert_atmel_pri()
184 memset((char *)extp + 5, 0, sizeof(*extp) - 5); in fixup_convert_atmel_pri()
203 extp->FeatureSupport = features; in fixup_convert_atmel_pri()
226 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in fixup_intel_strataflash() local
230 extp->SuspendCmdSupport &= ~1; in fixup_intel_strataflash()
281 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in fixup_LH28F640BF() local
293 extp->FeatureSupport &= ~512; in fixup_LH28F640BF()
372 struct cfi_pri_intelext *extp) in cfi_fixup_major_minor() argument
375 cfi->id == PF38F4476 && extp->MinorVersion == '3') in cfi_fixup_major_minor()
376 extp->MinorVersion = '1'; in cfi_fixup_major_minor()
394 struct cfi_pri_intelext *extp; in read_pri_intelext() local
396 unsigned int extp_size = sizeof(*extp); in read_pri_intelext()
399 extp = (struct cfi_pri_intelext *)cfi_read_pri(map, adr, extp_size, "Intel/Sharp"); in read_pri_intelext()
400 if (!extp) in read_pri_intelext()
403 cfi_fixup_major_minor(cfi, extp); in read_pri_intelext()
405 if (extp->MajorVersion != '1' || in read_pri_intelext()
406 (extp->MinorVersion < '0' || extp->MinorVersion > '5')) { in read_pri_intelext()
408 "version %c.%c.\n", extp->MajorVersion, in read_pri_intelext()
409 extp->MinorVersion); in read_pri_intelext()
410 kfree(extp); in read_pri_intelext()
415 extp->FeatureSupport = le32_to_cpu(extp->FeatureSupport); in read_pri_intelext()
416 extp->BlkStatusRegMask = le16_to_cpu(extp->BlkStatusRegMask); in read_pri_intelext()
417 extp->ProtRegAddr = le16_to_cpu(extp->ProtRegAddr); in read_pri_intelext()
419 if (extp->MinorVersion >= '0') { in read_pri_intelext()
423 if (extp->NumProtectionFields) in read_pri_intelext()
424 extra_size += (extp->NumProtectionFields - 1) * in read_pri_intelext()
428 if (extp->MinorVersion >= '1') { in read_pri_intelext()
431 if (extp_size < sizeof(*extp) + extra_size) in read_pri_intelext()
433 extra_size += extp->extra[extra_size - 1]; in read_pri_intelext()
436 if (extp->MinorVersion >= '3') { in read_pri_intelext()
441 if (extp_size < sizeof(*extp) + extra_size) in read_pri_intelext()
443 nb_parts = extp->extra[extra_size - 1]; in read_pri_intelext()
446 if (extp->MinorVersion >= '4') in read_pri_intelext()
451 rinfo = (struct cfi_intelext_regioninfo *)&extp->extra[extra_size]; in read_pri_intelext()
453 if (extp_size < sizeof(*extp) + extra_size) in read_pri_intelext()
460 if (extp->MinorVersion >= '4') in read_pri_intelext()
463 if (extp_size < sizeof(*extp) + extra_size) { in read_pri_intelext()
465 extp_size = sizeof(*extp) + extra_size; in read_pri_intelext()
466 kfree(extp); in read_pri_intelext()
477 return extp; in read_pri_intelext()
516 struct cfi_pri_intelext *extp; in cfi_cmdset_0001() local
518 extp = read_pri_intelext(map, adr); in cfi_cmdset_0001()
519 if (!extp) { in cfi_cmdset_0001()
525 cfi->cmdset_priv = extp; in cfi_cmdset_0001()
531 cfi_tell_features(extp); in cfi_cmdset_0001()
534 if(extp->SuspendCmdSupport & 1) { in cfi_cmdset_0001()
684 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_partition_fixup() local
697 if (extp && extp->MajorVersion == '1' && extp->MinorVersion >= '3' in cfi_intelext_partition_fixup()
698 && extp->FeatureSupport & (1 << 9)) { in cfi_intelext_partition_fixup()
706 if (extp->NumProtectionFields) in cfi_intelext_partition_fixup()
707 offs = (extp->NumProtectionFields - 1) * in cfi_intelext_partition_fixup()
711 offs += extp->extra[offs+1]+2; in cfi_intelext_partition_fixup()
714 numregions = extp->extra[offs]; in cfi_intelext_partition_fixup()
718 if (extp->MinorVersion >= '4') in cfi_intelext_partition_fixup()
725 rinfo = (struct cfi_intelext_regioninfo *)&extp->extra[offs]; in cfi_intelext_partition_fixup()
736 if (extp->MinorVersion >= '4') { in cfi_intelext_partition_fixup()
738 prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs]; in cfi_intelext_partition_fixup()
2107 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in do_xxlock_oneblock() local
2145 mdelay = (!extp || !(extp->FeatureSupport & (1 << 5))) ? 1500 : 0; in do_xxlock_oneblock()
2304 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_otp_walk() local
2315 if (!extp || !(extp->FeatureSupport & 64) || !extp->NumProtectionFields) in cfi_intelext_otp_walk()
2336 otp = (struct cfi_intelext_otpinfo *)&extp->extra[0]; in cfi_intelext_otp_walk()
2340 reg_prot_offset = extp->ProtRegAddr; in cfi_intelext_otp_walk()
2342 reg_fact_size = 1 << extp->FactProtRegSize; in cfi_intelext_otp_walk()
2344 reg_user_size = 1 << extp->UserProtRegSize; in cfi_intelext_otp_walk()
2418 if (++field == extp->NumProtectionFields) in cfi_intelext_otp_walk()
2511 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_suspend() local
2517 && extp && (extp->FeatureSupport & (1 << 5))) in cfi_intelext_suspend()
2605 struct cfi_pri_intelext *extp = cfi->cmdset_priv; in cfi_intelext_resume() local
2628 && extp && (extp->FeatureSupport & (1 << 5))) in cfi_intelext_resume()