diff options
author | Ryan Jackson <rjackson@lnxi.com> | 2006-10-20 17:41:03 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-10-21 11:18:51 -0400 |
commit | 89072ef99367cd6fab37b85d6a59a575084c2d2c (patch) | |
tree | 2dbff694e9d27fdb2f7a8baba0d989a0682682c5 /drivers/mtd/chips | |
parent | c9073ce02adfa273a3d6d53eac8c4c035510ad9c (diff) |
[MTD] CHIPS: Support for SST 49LF040B flash chip
Add chip driver and JEDEC probe support for the SST 49LF040B flash chip.
Signed-off-by: Ryan Jackson <rjackson@lnxi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/chips')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 8 | ||||
-rw-r--r-- | drivers/mtd/chips/jedec_probe.c | 15 |
2 files changed, 21 insertions, 2 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 702ae4cd8691..ca0882b5819f 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #define MANUFACTURER_ATMEL 0x001F | 48 | #define MANUFACTURER_ATMEL 0x001F |
49 | #define MANUFACTURER_SST 0x00BF | 49 | #define MANUFACTURER_SST 0x00BF |
50 | #define SST49LF004B 0x0060 | 50 | #define SST49LF004B 0x0060 |
51 | #define SST49LF040B 0x0050 | ||
51 | #define SST49LF008A 0x005a | 52 | #define SST49LF008A 0x005a |
52 | #define AT49BV6416 0x00d6 | 53 | #define AT49BV6416 0x00d6 |
53 | 54 | ||
@@ -233,6 +234,7 @@ static struct cfi_fixup cfi_fixup_table[] = { | |||
233 | }; | 234 | }; |
234 | static struct cfi_fixup jedec_fixup_table[] = { | 235 | static struct cfi_fixup jedec_fixup_table[] = { |
235 | { MANUFACTURER_SST, SST49LF004B, fixup_use_fwh_lock, NULL, }, | 236 | { MANUFACTURER_SST, SST49LF004B, fixup_use_fwh_lock, NULL, }, |
237 | { MANUFACTURER_SST, SST49LF040B, fixup_use_fwh_lock, NULL, }, | ||
236 | { MANUFACTURER_SST, SST49LF008A, fixup_use_fwh_lock, NULL, }, | 238 | { MANUFACTURER_SST, SST49LF008A, fixup_use_fwh_lock, NULL, }, |
237 | { 0, 0, NULL, NULL } | 239 | { 0, 0, NULL, NULL } |
238 | }; | 240 | }; |
@@ -519,10 +521,12 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr | |||
519 | if (mode == FL_WRITING) /* FIXME: Erase-suspend-program appears broken. */ | 521 | if (mode == FL_WRITING) /* FIXME: Erase-suspend-program appears broken. */ |
520 | goto sleep; | 522 | goto sleep; |
521 | 523 | ||
522 | if (!(mode == FL_READY || mode == FL_POINT | 524 | if (!( mode == FL_READY |
525 | || mode == FL_POINT | ||
523 | || !cfip | 526 | || !cfip |
524 | || (mode == FL_WRITING && (cfip->EraseSuspend & 0x2)) | 527 | || (mode == FL_WRITING && (cfip->EraseSuspend & 0x2)) |
525 | || (mode == FL_WRITING && (cfip->EraseSuspend & 0x1)))) | 528 | || (mode == FL_WRITING && (cfip->EraseSuspend & 0x1) |
529 | ))) | ||
526 | goto sleep; | 530 | goto sleep; |
527 | 531 | ||
528 | /* We could check to see if we're trying to access the sector | 532 | /* We could check to see if we're trying to access the sector |
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index 1154dac715aa..63d12874590d 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c | |||
@@ -154,6 +154,7 @@ | |||
154 | #define SST39SF010A 0x00B5 | 154 | #define SST39SF010A 0x00B5 |
155 | #define SST39SF020A 0x00B6 | 155 | #define SST39SF020A 0x00B6 |
156 | #define SST49LF004B 0x0060 | 156 | #define SST49LF004B 0x0060 |
157 | #define SST49LF040B 0x0050 | ||
157 | #define SST49LF008A 0x005a | 158 | #define SST49LF008A 0x005a |
158 | #define SST49LF030A 0x001C | 159 | #define SST49LF030A 0x001C |
159 | #define SST49LF040A 0x0051 | 160 | #define SST49LF040A 0x0051 |
@@ -1401,6 +1402,20 @@ static const struct amd_flash_info jedec_table[] = { | |||
1401 | } | 1402 | } |
1402 | }, { | 1403 | }, { |
1403 | .mfr_id = MANUFACTURER_SST, | 1404 | .mfr_id = MANUFACTURER_SST, |
1405 | .dev_id = SST49LF040B, | ||
1406 | .name = "SST 49LF040B", | ||
1407 | .uaddr = { | ||
1408 | [0] = MTD_UADDR_0x5555_0x2AAA /* x8 */ | ||
1409 | }, | ||
1410 | .DevSize = SIZE_512KiB, | ||
1411 | .CmdSet = P_ID_AMD_STD, | ||
1412 | .NumEraseRegions= 1, | ||
1413 | .regions = { | ||
1414 | ERASEINFO(0x01000,128), | ||
1415 | } | ||
1416 | }, { | ||
1417 | |||
1418 | .mfr_id = MANUFACTURER_SST, | ||
1404 | .dev_id = SST49LF004B, | 1419 | .dev_id = SST49LF004B, |
1405 | .name = "SST 49LF004B", | 1420 | .name = "SST 49LF004B", |
1406 | .uaddr = { | 1421 | .uaddr = { |