aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-02-18 14:53:50 +0000
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-02-18 14:53:50 +0000
commita29ed2421268934bb353946972584bd746c788e1 (patch)
treef10ce4d0eda993581714b6350cccb0ef059189e4 /src
parenta92d27afb0733f6280088bd79b048cbd87a2a0c4 (diff)
downloadriscv-openocd-a29ed2421268934bb353946972584bd746c788e1.zip
riscv-openocd-a29ed2421268934bb353946972584bd746c788e1.tar.gz
riscv-openocd-a29ed2421268934bb353946972584bd746c788e1.tar.bz2
- add new non-cfi SST flash device. Thanks Øyvind Harboe
git-svn-id: svn://svn.berlios.de/openocd/trunk@303 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/flash/cfi.c5
-rw-r--r--src/flash/non_cfi.c15
2 files changed, 19 insertions, 1 deletions
diff --git a/src/flash/cfi.c b/src/flash/cfi.c
index c529338..902b712 100644
--- a/src/flash/cfi.c
+++ b/src/flash/cfi.c
@@ -89,6 +89,7 @@ cfi_fixup_t cfi_jedec_fixups[] = {
{CFI_MFR_SST, 0x00D5, cfi_fixup_non_cfi, NULL},
{CFI_MFR_SST, 0x00D6, cfi_fixup_non_cfi, NULL},
{CFI_MFR_SST, 0x00D7, cfi_fixup_non_cfi, NULL},
+ {CFI_MFR_SST, 0x2780, cfi_fixup_non_cfi, NULL},
{CFI_MFR_ST, 0x00D5, cfi_fixup_non_cfi, NULL},
{CFI_MFR_ST, 0x00D6, cfi_fixup_non_cfi, NULL},
{CFI_MFR_AMD, 0x2223, cfi_fixup_non_cfi, NULL},
@@ -102,6 +103,7 @@ cfi_fixup_t cfi_0002_fixups[] = {
{CFI_MFR_SST, 0x00D5, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]},
{CFI_MFR_SST, 0x00D6, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]},
{CFI_MFR_SST, 0x00D7, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]},
+ {CFI_MFR_SST, 0x2780, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]},
{CFI_MFR_ATMEL, 0x00C8, cfi_fixup_atmel_reversed_erase_regions, NULL},
{CFI_MFR_ANY, CFI_ID_ANY, cfi_fixup_0002_erase_regions, NULL},
{0, 0, NULL, NULL}
@@ -590,7 +592,8 @@ int cfi_intel_info(struct flash_bank_s *bank, char *buf, int buf_size)
int cfi_register_commands(struct command_context_s *cmd_ctx)
{
- /*command_t *cfi_cmd = */register_command(cmd_ctx, NULL, "cfi", NULL, COMMAND_ANY, NULL);
+ /*command_t *cfi_cmd = */
+ register_command(cmd_ctx, NULL, "cfi", NULL, COMMAND_ANY, "flash bank cfi <base> <size> <chip_width> <bus_width> <targetNum> [jedec_probe/x16_as_x8]");
/*
register_command(cmd_ctx, cfi_cmd, "part_id", cfi_handle_part_id_command, COMMAND_EXEC,
"print part id of cfi flash bank <num>");
diff --git a/src/flash/non_cfi.c b/src/flash/non_cfi.c
index d80f378..dbb02b0 100644
--- a/src/flash/non_cfi.c
+++ b/src/flash/non_cfi.c
@@ -88,6 +88,20 @@ non_cfi_t non_cfi_flashes[] = {
}
},
{
+ .mfr = CFI_MFR_SST,
+ .id = 0x2780,
+ .pri_id = 0x02,
+ .dev_size = 0x13, /* 2^19 = 512KB */
+ .interface_desc = 0x2, /* x8 or x16 device */
+ .max_buf_write_size = 0x0,
+ .num_erase_regions = 1,
+ .erase_region_info =
+ {
+ 0x0010007f,
+ 0x00000000
+ }
+ },
+ {
.mfr = CFI_MFR_ST,
.id = 0xd6, /* ST29F400BB */
.pri_id = 0x02,
@@ -241,3 +255,4 @@ void cfi_fixup_non_cfi(flash_bank_t *bank, void *param)
}
}
+