aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index dc257eb6932f..b99400f6e484 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * (C) 2000 Red Hat. GPL'd 5 * (C) 2000 Red Hat. GPL'd
6 * 6 *
7 * $Id: cfi_cmdset_0001.c,v 1.174 2005/04/01 01:59:52 nico Exp $ 7 * $Id: cfi_cmdset_0001.c,v 1.175 2005/04/01 16:36:25 nico Exp $
8 * 8 *
9 * 9 *
10 * 10/10/2000 Nicolas Pitre <nico@cam.org> 10 * 10/10/2000 Nicolas Pitre <nico@cam.org>
@@ -2062,8 +2062,20 @@ static int cfi_intelext_otp_walk(struct mtd_info *mtd, loff_t from, size_t len,
2062 /* we need real chips here not virtual ones */ 2062 /* we need real chips here not virtual ones */
2063 devsize = (1 << cfi->cfiq->DevSize) * cfi->interleave; 2063 devsize = (1 << cfi->cfiq->DevSize) * cfi->interleave;
2064 chip_step = devsize >> cfi->chipshift; 2064 chip_step = devsize >> cfi->chipshift;
2065 chip_num = 0;
2066
2067 /* Some chips have OTP located in the _top_ partition only.
2068 For example: Intel 28F256L18T (T means top-parameter device) */
2069 if (cfi->mfr == MANUFACTURER_INTEL) {
2070 switch (cfi->id) {
2071 case 0x880b:
2072 case 0x880c:
2073 case 0x880d:
2074 chip_num = chip_step - 1;
2075 }
2076 }
2065 2077
2066 for (chip_num = 0; chip_num < cfi->numchips; chip_num += chip_step) { 2078 for ( ; chip_num < cfi->numchips; chip_num += chip_step) {
2067 chip = &cfi->chips[chip_num]; 2079 chip = &cfi->chips[chip_num];
2068 otp = (struct cfi_intelext_otpinfo *)&extp->extra[0]; 2080 otp = (struct cfi_intelext_otpinfo *)&extp->extra[0];
2069 2081