Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4533
b: refs/heads/master
c: dce2b4d
h: refs/heads/master
i:
  4531: c8be4b2
v: v3
  • Loading branch information
Nicolas Pitre authored and Thomas Gleixner committed May 23, 2005
1 parent 2918873 commit b9f5658
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 81dba488792b29cc8cb2b3d49407be05303dde16
refs/heads/master: dce2b4da69a83635150a6535ebc23f680e200a8d
16 changes: 14 additions & 2 deletions trunk/drivers/mtd/chips/cfi_cmdset_0001.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* (C) 2000 Red Hat. GPL'd
*
* $Id: cfi_cmdset_0001.c,v 1.174 2005/04/01 01:59:52 nico Exp $
* $Id: cfi_cmdset_0001.c,v 1.175 2005/04/01 16:36:25 nico Exp $
*
*
* 10/10/2000 Nicolas Pitre <nico@cam.org>
Expand Down Expand Up @@ -2062,8 +2062,20 @@ static int cfi_intelext_otp_walk(struct mtd_info *mtd, loff_t from, size_t len,
/* we need real chips here not virtual ones */
devsize = (1 << cfi->cfiq->DevSize) * cfi->interleave;
chip_step = devsize >> cfi->chipshift;
chip_num = 0;

/* Some chips have OTP located in the _top_ partition only.
For example: Intel 28F256L18T (T means top-parameter device) */
if (cfi->mfr == MANUFACTURER_INTEL) {
switch (cfi->id) {
case 0x880b:
case 0x880c:
case 0x880d:
chip_num = chip_step - 1;
}
}

for (chip_num = 0; chip_num < cfi->numchips; chip_num += chip_step) {
for ( ; chip_num < cfi->numchips; chip_num += chip_step) {
chip = &cfi->chips[chip_num];
otp = (struct cfi_intelext_otpinfo *)&extp->extra[0];

Expand Down

0 comments on commit b9f5658

Please sign in to comment.