1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

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: hwversion 0xc3, ediid 0x04
Found ENE flash chip "KB9012 (EDI)" (128 kB, SPI) on ch341a_spi.

Change-Id: Id8e62bc9f6785b4bf0be0aaf0f74c8120d77c0d4
Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/23261
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Mike Banon 2018-01-15 01:09:16 +03:00 committed by Nico Huber
parent a590f4840b
commit 3a826043db

10
edi.c
View File

@ -150,12 +150,18 @@ static int edi_chip_probe(struct flashctx *flash, const struct ene_chip *chip)
int rc; int rc;
rc = edi_read(flash, ENE_EC_HWVERSION, &hwversion); rc = edi_read(flash, ENE_EC_HWVERSION, &hwversion);
if (rc < 0) if (rc < 0) {
msg_cdbg("%s: reading hwversion failed\n", __func__);
return 0; return 0;
}
rc = edi_read(flash, ENE_EC_EDIID, &ediid); rc = edi_read(flash, ENE_EC_EDIID, &ediid);
if (rc < 0) if (rc < 0) {
msg_cdbg("%s: reading ediid failed\n", __func__);
return 0; return 0;
}
msg_cdbg("%s: hwversion 0x%02x, ediid 0x%02x\n", __func__, hwversion, ediid);
if (chip->hwversion == hwversion && chip->ediid == ediid) if (chip->hwversion == hwversion && chip->ediid == ediid)
return 1; return 1;