diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-07-15 11:09:15 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-25 10:02:47 -0400 |
commit | ca6f12c67ed19718cf37d0f531af9438de85b70c (patch) | |
tree | f0fa0847f19d93284a9d82060b60b5dd9b0f7b75 /drivers | |
parent | f636ffb420f0f9059c1d0b841afd691657246ad6 (diff) |
[MTD] jedec_probe: Fix SST 16-bit chip detection
The unlock_addr rework in kernel 2.6.25 breaks 16-bit SST chips. SST
39LF160 and SST 39VF1601 are both 16-bit only chip (do not have BYTE#
pin) and new uaddr value is not correct for them. Add
MTD_UADDR_0xAAAA_0x5555 for those chips. Tested with SST 39VF1601
chip.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/chips/jedec_probe.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index afb35e3a3cee..dbba5abf0db8 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c | |||
@@ -200,6 +200,7 @@ enum uaddr { | |||
200 | MTD_UADDR_0x0555_0x0AAA, | 200 | MTD_UADDR_0x0555_0x0AAA, |
201 | MTD_UADDR_0x5555_0x2AAA, | 201 | MTD_UADDR_0x5555_0x2AAA, |
202 | MTD_UADDR_0x0AAA_0x0555, | 202 | MTD_UADDR_0x0AAA_0x0555, |
203 | MTD_UADDR_0xAAAA_0x5555, | ||
203 | MTD_UADDR_DONT_CARE, /* Requires an arbitrary address */ | 204 | MTD_UADDR_DONT_CARE, /* Requires an arbitrary address */ |
204 | MTD_UADDR_UNNECESSARY, /* Does not require any address */ | 205 | MTD_UADDR_UNNECESSARY, /* Does not require any address */ |
205 | }; | 206 | }; |
@@ -247,6 +248,11 @@ static const struct unlock_addr unlock_addrs[] = { | |||
247 | .addr2 = 0x0555 | 248 | .addr2 = 0x0555 |
248 | }, | 249 | }, |
249 | 250 | ||
251 | [MTD_UADDR_0xAAAA_0x5555] = { | ||
252 | .addr1 = 0xaaaa, | ||
253 | .addr2 = 0x5555 | ||
254 | }, | ||
255 | |||
250 | [MTD_UADDR_DONT_CARE] = { | 256 | [MTD_UADDR_DONT_CARE] = { |
251 | .addr1 = 0x0000, /* Doesn't matter which address */ | 257 | .addr1 = 0x0000, /* Doesn't matter which address */ |
252 | .addr2 = 0x0000 /* is used - must be last entry */ | 258 | .addr2 = 0x0000 /* is used - must be last entry */ |
@@ -1461,8 +1467,8 @@ static const struct amd_flash_info jedec_table[] = { | |||
1461 | .mfr_id = MANUFACTURER_SST, /* should be CFI */ | 1467 | .mfr_id = MANUFACTURER_SST, /* should be CFI */ |
1462 | .dev_id = SST39LF160, | 1468 | .dev_id = SST39LF160, |
1463 | .name = "SST 39LF160", | 1469 | .name = "SST 39LF160", |
1464 | .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8, | 1470 | .devtypes = CFI_DEVICETYPE_X16, |
1465 | .uaddr = MTD_UADDR_0x5555_0x2AAA, /* ???? */ | 1471 | .uaddr = MTD_UADDR_0xAAAA_0x5555, |
1466 | .dev_size = SIZE_2MiB, | 1472 | .dev_size = SIZE_2MiB, |
1467 | .cmd_set = P_ID_AMD_STD, | 1473 | .cmd_set = P_ID_AMD_STD, |
1468 | .nr_regions = 2, | 1474 | .nr_regions = 2, |
@@ -1474,8 +1480,8 @@ static const struct amd_flash_info jedec_table[] = { | |||
1474 | .mfr_id = MANUFACTURER_SST, /* should be CFI */ | 1480 | .mfr_id = MANUFACTURER_SST, /* should be CFI */ |
1475 | .dev_id = SST39VF1601, | 1481 | .dev_id = SST39VF1601, |
1476 | .name = "SST 39VF1601", | 1482 | .name = "SST 39VF1601", |
1477 | .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8, | 1483 | .devtypes = CFI_DEVICETYPE_X16, |
1478 | .uaddr = MTD_UADDR_0x5555_0x2AAA, /* ???? */ | 1484 | .uaddr = MTD_UADDR_0xAAAA_0x5555, |
1479 | .dev_size = SIZE_2MiB, | 1485 | .dev_size = SIZE_2MiB, |
1480 | .cmd_set = P_ID_AMD_STD, | 1486 | .cmd_set = P_ID_AMD_STD, |
1481 | .nr_regions = 2, | 1487 | .nr_regions = 2, |