Mike Banon has uploaded this change for review. ( https://review.coreboot.org/23261
Change subject: [v4,4/6] ENE EDI - print debug info like others while probing for ENE chips ......................................................................
[v4,4/6] ENE EDI - print debug info like others while probing for ENE chips
Instead of just "Probing for ENE KB9012 (EDI), 128 kB:", lets print some debug info - like it is currently being printed for other chips:
Probing for ENE KB9012 (EDI), 128 kB: edi_chip_probe: rc1 0x0, rc2 0x0; (no newline here) hwversion 0xc3, ediid 0x04
Change-Id: Id8e62bc9f6785b4bf0be0aaf0f74c8120d77c0d4 Signed-off-by: Mike Banon mikebdp2@gmail.com --- M edi.c 1 file changed, 16 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/61/23261/1
diff --git a/edi.c b/edi.c index fde5ff1..4fce98b 100644 --- a/edi.c +++ b/edi.c @@ -147,18 +147,28 @@ { unsigned char hwversion; unsigned char ediid; - int rc; + int rc1, rc2;
- rc = edi_read(flash, ENE_EC_HWVERSION, &hwversion); - if (rc < 0) + rc1 = edi_read(flash, ENE_EC_HWVERSION, &hwversion); + if (rc1 < 0) { + msg_cdbg("%s: rc1 0x%x < 0\n", __func__, rc1); return 0; + }
- rc = edi_read(flash, ENE_EC_EDIID, &ediid); - if (rc < 0) + rc2 = edi_read(flash, ENE_EC_EDIID, &ediid); + if (rc2 < 0) { + msg_cdbg("%s: rc1 0x%x, rc2 0x%x < 0\n", __func__, rc1, rc2); return 0; + }
- if (chip->hwversion == hwversion && chip->ediid == ediid) + msg_cdbg("%s: rc1 0x%x, rc2 0x%x; ", __func__, rc1, rc2); + + if (chip->hwversion == hwversion && chip->ediid == ediid) { + msg_cdbg("hwversion 0x%02x, ediid 0x%02x\n", hwversion, ediid); return 1; + } else + msg_cdbg("hwversion 0x%02x != 0x%02x || ediid 0x%02x != 0x%02x\n", + hwversion, chip->hwversion, ediid, chip->ediid);
return 0; }