Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at --- we were wrong regarding the probing process... the generic probes are executed apparently. this patch degrades all failure outputs (but OOM) to dbg.
sfdp.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/sfdp.c b/sfdp.c index 6a76994..75dfb5f 100644 --- a/sfdp.c +++ b/sfdp.c @@ -123,7 +123,7 @@ static int sfdp_fill_flash(struct flashctx *flash, uint8_t *buf, uint16_t len)
msg_cdbg("Parsing JEDEC flash parameter table... "); if (len != 9 * 4 && len != 4 * 4) { - msg_cerr("%s: len out of spec\n", __func__); + msg_cdbg("%s: len out of spec\n", __func__); return 1; } msg_cdbg2("\n"); @@ -144,11 +144,11 @@ static int sfdp_fill_flash(struct flashctx *flash, uint8_t *buf, uint16_t len) msg_cdbg2(" 3-Byte (and optionally 4-Byte) addressing.\n"); break; case 0x2: - msg_cerr(" 4-Byte only addressing (not supported by " + msg_cdbg(" 4-Byte only addressing (not supported by " "flashrom).\n"); return 1; default: - msg_cerr(" Required addressing mode (0x%x) not supported.\n", + msg_cdbg(" Required addressing mode (0x%x) not supported.\n", tmp8); return 1; } @@ -192,14 +192,14 @@ static int sfdp_fill_flash(struct flashctx *flash, uint8_t *buf, uint16_t len) tmp32 |= ((unsigned int)buf[(4 * dw) + 3]) << 24;
if (tmp32 & (1 << 31)) { - msg_cerr("Flash chip size >= 4 Gb/512 MB not supported.\n"); + msg_cdbg("Flash chip size >= 4 Gb/512 MB not supported.\n"); return 1; } total_size = ((tmp32 & 0x7FFFFFFF) + 1) / 8; flash->total_size = total_size / 1024; msg_cdbg2(" Flash chip size is %d kB.\n", flash->total_size); if (total_size > (1 << 24)) { - msg_cerr("Flash chip size is bigger than what 3-Byte addressing " + msg_cdbg("Flash chip size is bigger than what 3-Byte addressing " "can access.\n"); return 1; } @@ -265,13 +265,13 @@ int probe_spi_sfdp(struct flashctx *flash) }
if (spi_sfdp_read_sfdp(flash, 0x04, buf, 3)) { - msg_cerr("Receiving SFDP revision and number of parameter " + msg_cdbg("Receiving SFDP revision and number of parameter " "headers (NPH) failed. "); return 0; } msg_cdbg2("SFDP revision = %d.%d\n", buf[1], buf[0]); if (buf[1] != 0x01) { - msg_cinfo("The chip supports an unknown version of SFDP. " + msg_cdbg("The chip supports an unknown version of SFDP. " "Aborting SFDP probe!\n"); return 0; } @@ -287,7 +287,7 @@ int probe_spi_sfdp(struct flashctx *flash) goto cleanup_hdrs; } if (spi_sfdp_read_sfdp(flash, 0x08, hbuf, (nph + 1) * 8)) { - msg_cerr("Receiving SFDP parameter table headers failed.\n"); + msg_cdbg("Receiving SFDP parameter table headers failed.\n"); goto cleanup_hdrs; }
@@ -309,7 +309,7 @@ int probe_spi_sfdp(struct flashctx *flash) len, tmp32);
if (tmp32 + len >= (1 << 24)) { - msg_cinfo("SFDP Parameter Table %d supposedly overflows " + msg_cdbg("SFDP Parameter Table %d supposedly overflows " "addressable SFDP area. This most\nprobably " "indicates a corrupt SFDP parameter table " "header. Skipping it.\n", i); @@ -322,7 +322,7 @@ int probe_spi_sfdp(struct flashctx *flash) goto cleanup_hdrs; } if (spi_sfdp_read_sfdp(flash, tmp32, tbuf, len)){ - msg_cerr("Fetching SFDP parameter table %d failed.\n", + msg_cdbg("Fetching SFDP parameter table %d failed.\n", i); free(tbuf); continue; @@ -350,7 +350,7 @@ int probe_spi_sfdp(struct flashctx *flash) "by JESD216 (warning only).\n");
if (hdrs[i].v_major != 0x01) { - msg_cinfo("The chip contains an unknown " + msg_cdbg("The chip contains an unknown " "version of the JEDEC flash " "parameters table, skipping it.\n"); } else if (len != 9 * 4 && len != 4 * 4) {