summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-08-25 08:21:11 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-08-25 08:21:11 +0000
commit8e1d516927506fb803f34aa16a6e69059f8d78cd (patch)
treed9cc8a5091cabccb3469c3589b55e78e01585052 /src/flash
parent696ed5fdc40a5a02ffe3aeda37a6aa9563089784 (diff)
downloadopenocd+libswd-8e1d516927506fb803f34aa16a6e69059f8d78cd.tar.gz
openocd+libswd-8e1d516927506fb803f34aa16a6e69059f8d78cd.tar.bz2
openocd+libswd-8e1d516927506fb803f34aa16a6e69059f8d78cd.tar.xz
openocd+libswd-8e1d516927506fb803f34aa16a6e69059f8d78cd.zip
Michael Schwingen <rincewind@discworld.dascon.de> a small CFI cleanup
git-svn-id: svn://svn.berlios.de/openocd/trunk@2617 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/cfi.c8
-rw-r--r--src/flash/non_cfi.c2
-rw-r--r--src/flash/non_cfi.h1
3 files changed, 5 insertions, 6 deletions
diff --git a/src/flash/cfi.c b/src/flash/cfi.c
index 4afc58be..46e5528d 100644
--- a/src/flash/cfi.c
+++ b/src/flash/cfi.c
@@ -74,7 +74,7 @@ static void cfi_fixup_0002_unlock_addresses(flash_bank_t *flash, void *param);
static void cfi_fixup_atmel_reversed_erase_regions(flash_bank_t *flash, void *param);
/* fixup after reading cmdset 0002 primary query table */
-static cfi_fixup_t cfi_0002_fixups[] = {
+static const cfi_fixup_t cfi_0002_fixups[] = {
{CFI_MFR_SST, 0x00D4, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]},
{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]},
@@ -90,14 +90,14 @@ static cfi_fixup_t cfi_0002_fixups[] = {
};
/* fixup after reading cmdset 0001 primary query table */
-static cfi_fixup_t cfi_0001_fixups[] = {
+static const cfi_fixup_t cfi_0001_fixups[] = {
{0, 0, NULL, NULL}
};
-static void cfi_fixup(flash_bank_t *bank, cfi_fixup_t *fixups)
+static void cfi_fixup(flash_bank_t *bank, const cfi_fixup_t *fixups)
{
cfi_flash_bank_t *cfi_info = bank->driver_priv;
- cfi_fixup_t *f;
+ const cfi_fixup_t *f;
for (f = fixups; f->fixup; f++)
{
diff --git a/src/flash/non_cfi.c b/src/flash/non_cfi.c
index 86248ec8..90de7879 100644
--- a/src/flash/non_cfi.c
+++ b/src/flash/non_cfi.c
@@ -32,7 +32,7 @@
#define ERASE_REGION(num, size) (((size/256) << 16) | (num-1))
/* non-CFI compatible flashes */
-non_cfi_t non_cfi_flashes[] = {
+static non_cfi_t non_cfi_flashes[] = {
{
.mfr = CFI_MFR_SST,
.id = 0xd4,
diff --git a/src/flash/non_cfi.h b/src/flash/non_cfi.h
index f6915605..48cee925 100644
--- a/src/flash/non_cfi.h
+++ b/src/flash/non_cfi.h
@@ -35,7 +35,6 @@ typedef struct non_cfi_s
uint8_t status_poll_mask;
} non_cfi_t;
-extern non_cfi_t non_cfi_flashes[];
extern void cfi_fixup_non_cfi(flash_bank_t *bank);
#endif /* NON_CFI_H */