From: Greg Davill Date: Sun, 30 Aug 2020 02:01:55 +0000 (+0930) Subject: remove reading extended device ID X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4cd5b1e4c5b5ed96900c6033211bd4e4345c17b;p=ecpprog.git remove reading extended device ID --- diff --git a/ecpprog/ecpprog.c b/ecpprog/ecpprog.c index 3c38d0f..4e69d1b 100644 --- a/ecpprog/ecpprog.c +++ b/ecpprog/ecpprog.c @@ -182,7 +182,7 @@ static void flash_read_id() */ uint8_t data[260] = { FC_JEDECID }; - int len = 5; // command + 4 response bytes + int len = 4; // command + 4 response bytes if (verbose) fprintf(stderr, "read flash ID..\n"); @@ -190,18 +190,6 @@ static void flash_read_id() // Write command and read first 4 bytes xfer_spi(data, len); - if (data[4] == 0xFF) - fprintf(stderr, "Extended Device String Length is 0xFF, " - "this is likely a read error. Ignorig...\n"); - else { - // Read extended JEDEC ID bytes - if (data[4] != 0) { - len += data[4]; - data[0] = FC_JEDECID; - xfer_spi(data, len); - } - } - fprintf(stderr, "flash ID:"); for (int i = 1; i < len; i++) fprintf(stderr, " 0x%02X", data[i]);