summaryrefslogtreecommitdiff
path: root/src/flash/nor/at91sam3.c
diff options
context:
space:
mode:
authorOlivier Schonken <olivier.schonken@gmail.com>2011-03-28 19:31:17 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-03-30 16:01:00 +0200
commitac6f8f9616aada403c52254738096ec43888ca42 (patch)
tree5c02aa46bce0f2b0b6d30337b7bd53e5297d61f0 /src/flash/nor/at91sam3.c
parent3e839915609f207439fd7dfe32d95acb025770ab (diff)
downloadopenocd+libswd-ac6f8f9616aada403c52254738096ec43888ca42.tar.gz
openocd+libswd-ac6f8f9616aada403c52254738096ec43888ca42.tar.bz2
openocd+libswd-ac6f8f9616aada403c52254738096ec43888ca42.tar.xz
openocd+libswd-ac6f8f9616aada403c52254738096ec43888ca42.zip
at91sam3: Modified cidr comparisson to ignore version bits
production processor versions increment, thus the version bits should be ignored for future proofing. e.g. Engineering sample version == 0x00, production version 0x01
Diffstat (limited to 'src/flash/nor/at91sam3.c')
-rw-r--r--src/flash/nor/at91sam3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c
index 0b71e819..40ff3aa0 100644
--- a/src/flash/nor/at91sam3.c
+++ b/src/flash/nor/at91sam3.c
@@ -1999,7 +1999,8 @@ sam3_GetDetails(struct sam3_bank_private *pPrivate)
LOG_DEBUG("Begin");
pDetails = all_sam3_details;
while (pDetails->name) {
- if (pDetails->chipid_cidr == pPrivate->pChip->cfg.CHIPID_CIDR) {
+ // Compare cidr without version bits
+ if (pDetails->chipid_cidr == (pPrivate->pChip->cfg.CHIPID_CIDR & 0xFFFFFFE0)) {
break;
} else {
pDetails++;