diff options
author | Olivier 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 |
commit | ac6f8f9616aada403c52254738096ec43888ca42 (patch) | |
tree | 5c02aa46bce0f2b0b6d30337b7bd53e5297d61f0 /src | |
parent | 3e839915609f207439fd7dfe32d95acb025770ab (diff) | |
download | riscv-openocd-ac6f8f9616aada403c52254738096ec43888ca42.zip riscv-openocd-ac6f8f9616aada403c52254738096ec43888ca42.tar.gz riscv-openocd-ac6f8f9616aada403c52254738096ec43888ca42.tar.bz2 |
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')
-rw-r--r-- | src/flash/nor/at91sam3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index 0b71e81..40ff3aa 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++; |