flash/nor/xmc4xxx: Loosen checks for XMC4500 51/2751/6
authorAndreas Färber <afaerber@suse.de>
Sun, 19 Apr 2015 19:25:12 +0000 (21:25 +0200)
committerFreddie Chopin <freddie.chopin@gmail.com>
Wed, 11 Nov 2015 12:10:48 +0000 (12:10 +0000)
According to Infineon, XMC4500 EES AA13 with date codes before GE212 -
as seen on an XMC4500 General App Kit - had a zero SCU_IDCHIP register.

Handle this by extending our checks to not error out on zero SCU_IDCHIP
and by printing a useful info string in that case.

Change-Id: Ic2d641a314627dd5a1ff775a0113999191b95e3d
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2751
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Jeff Ciesielski <jeffciesielski@gmail.com>
src/flash/nor/xmc4xxx.c

index df288ffd007646a00b4e84e586d2b05ae0e4d0b2..f47995079923b2b4d58c8fc4e15dba402ff34b5c 100644 (file)
@@ -341,7 +341,7 @@ static int xmc4xxx_probe(struct flash_bank *bank)
        }
 
        /* Make sure this is a XMC4000 family device */
-       if ((devid & 0xF0000) != 0x40000) {
+       if ((devid & 0xF0000) != 0x40000 && devid != 0) {
                LOG_ERROR("Platform ID doesn't match XMC4xxx: 0x%08" PRIx32, devid);
                return ERROR_FAIL;
        }
@@ -949,6 +949,13 @@ static int xmc4xxx_get_info_command(struct flash_bank *bank, char *buf, int buf_
                        break;
                }
                break;
+       case 0:
+               /* XMC4500 EES AA13 with date codes before GE212
+                * had zero SCU_IDCHIP
+                */
+               dev_str = "XMC4500 EES";
+               rev_str = "AA13";
+               break;
        case 0x500:
                dev_str = "XMC4500";
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)