lpc11: Only print Idcode if not zero and not yet handled.

Otherwise for all Cortex-M not yet handled this LPC messages appears.
This commit is contained in:
Uwe Bonnes 2019-11-17 12:56:09 +01:00 committed by UweBonnes
parent 9198c951bb
commit e7e34600a4
1 changed files with 6 additions and 2 deletions

View File

@ -104,9 +104,10 @@ lpc11xx_probe(target *t)
lpc11xx_add_flash(t, 0x00000000, 0x8000, 0x1000);
return true;
}
if (idcode) {
DEBUG("LPC11xx: Unknown IDCODE 0x%08" PRIx32 "\n", idcode);
}
idcode = target_mem_read32(t, LPC8XX_DEVICE_ID);
DEBUG("LPC11/84: IDCODE 0x%08" PRIx32 "\n", idcode);
switch (idcode) {
case 0x00008100: /* LPC810M021FN8 */
case 0x00008110: /* LPC811M001JDH16 */
@ -160,6 +161,9 @@ lpc11xx_probe(target *t)
lpc11xx_add_flash(t, 0x00000000, 0x20000, 0x1000);
return true;
}
if (idcode) {
DEBUG("LPC8xx: Unknown IDCODE 0x%08" PRIx32 "\n", idcode);
}
return false;
}