aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2015-04-19 21:25:12 +0200
committerFreddie Chopin <freddie.chopin@gmail.com>2015-11-11 12:10:48 +0000
commited54838ea61afa647a2b6ce2121b4a5bc11995ce (patch)
tree19868a13201076527b1871fac2313b1347cea2f3 /src
parent33b048d456e24b9944ff2261cf26b05d630bdd41 (diff)
downloadriscv-openocd-ed54838ea61afa647a2b6ce2121b4a5bc11995ce.zip
riscv-openocd-ed54838ea61afa647a2b6ce2121b4a5bc11995ce.tar.gz
riscv-openocd-ed54838ea61afa647a2b6ce2121b4a5bc11995ce.tar.bz2
flash/nor/xmc4xxx: Loosen checks for XMC4500
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>
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/xmc4xxx.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/flash/nor/xmc4xxx.c b/src/flash/nor/xmc4xxx.c
index df288ff..f479950 100644
--- a/src/flash/nor/xmc4xxx.c
+++ b/src/flash/nor/xmc4xxx.c
@@ -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";