]> git.sur5r.net Git - openocd/commitdiff
at91sam3: Modified cidr comparisson to ignore version bits
authorOlivier Schonken <olivier.schonken@gmail.com>
Mon, 28 Mar 2011 17:31:17 +0000 (19:31 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 30 Mar 2011 14:01:00 +0000 (16:01 +0200)
production processor versions increment, thus the version
bits should be ignored for future proofing. e.g.
Engineering sample version == 0x00, production version 0x01

src/flash/nor/at91sam3.c

index 0b71e819d77eae5c0f0abe4937fba679d04ef810..40ff3aa0a15b8692a8b6db40c07c55e1ad9b79aa 100644 (file)
@@ -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++;