jedec: Correct probing for x16 parts w/ continued IDs

For x16 parts, we have to shift all addresses used during the probing.
This doesn't affect current chip entries as we only expect a single ID
byte for all chips with FEATURE_ADDR_SHIFTED set.

Change-Id: I79958a04260cf33b443fc3f05fce12962d18b9ca
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/445
diff --git a/jedec.c b/jedec.c
index 3fbfd2b..0c3ed0a 100644
--- a/jedec.c
+++ b/jedec.c
@@ -281,11 +281,11 @@
 	/* Check if it is a continuation ID, this should be a while loop. */
 	if (largeid1 == 0x7F) {
 		largeid1 <<= 8;
-		largeid1 |= raw[idx++] = par->chip_readb(par, bios + 0x100);
+		largeid1 |= raw[idx++] = par->chip_readb(par, bios + (0x100 << shifted));
 	}
 	if (largeid2 == 0x7F) {
 		largeid2 <<= 8;
-		largeid2 |= raw[idx++] = par->chip_readb(par, bios + 0x101);
+		largeid2 |= raw[idx++] = par->chip_readb(par, bios + (0x101 << shifted));
 	}
 
 	/* Issue JEDEC Product ID Exit command */
@@ -309,11 +309,11 @@
 	/* Check if it is a continuation ID, this should be a while loop. */
 	if (flashcontent1 == 0x7F) {
 		flashcontent1 <<= 8;
-		flashcontent1 |= par->chip_readb(par, bios + 0x100);
+		flashcontent1 |= par->chip_readb(par, bios + (0x100 << shifted));
 	}
 	if (flashcontent2 == 0x7F) {
 		flashcontent2 <<= 8;
-		flashcontent2 |= par->chip_readb(par, bios + 0x101);
+		flashcontent2 |= par->chip_readb(par, bios + (0x101 << shifted));
 	}
 
 	programmer_unmap_flash_region(par, (void *)bios, chip_size);