Use bus probing for standard JEDEC and JEDEC_29GL

To keep things close to as they were, we still run the probing many
times, with a huge amount of different chip parameters and sizes.

This brings us down to 35 probing runs for 159 chips.  And there is
still room for improvement:  It's likely that chips respond already
when longer delays are used. Also, many chips actually ignore addi-
tional address bits when decoding commands (i.e. bits above a 0x555
pattern are simply ignored and we actually don't need the masking).
Many (if not all) parallel flash chips also don't care about higher
address bits when reading the identification, so we might only have
to probe for them with a single chip size.

For now, we keep the set of probing parameters close to what we did
before. For power-of-two chip sizes from 64KiB to 1MiB, we run with
the most common parameters. 7 more parameter sets are used for more
unusual cases. And the 29GL parts are probed for the three sizes we
have in our database: 4MiB, 8MiB, 16MiB.

A note on the 29GL probing: All the chips have status UNTESTED, and
most if not all are x16 parts that need the addresses shifted (what
we don't do ATM). Overall it looks like standard jedec probing with
a short reset sequence. However, continuations of the device ID are
always 2 bytes long, at a different offset (0x0E) and prefixed with
0x7E.

Change-Id: If6ece7edc2291cae4824e5bcc2f83fd8aaef296e
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/444
diff --git a/parallel.c b/parallel.c
index e182394..699ce1a 100644
--- a/parallel.c
+++ b/parallel.c
@@ -78,6 +78,8 @@
 
 static const struct bus_probe memory_probes[] = {
     /* prio. type		function		function argument */
+	{ 0, ID_JEDEC,		probe_jedec,		NULL },
+	{ 0, ID_JEDEC_29GL,	probe_jedec_29gl,	NULL },
 	{ 0, ID_82802AB,	probe_82802ab,		NULL },
 	/* Old Winbond W29* probe method w/ low priority because the
 	   probing sequence puts the AMIC A49LF040A in a funky state. */
@@ -90,6 +92,7 @@
 
 	return	(memcmp(&found->id, &chip->id, sizeof(chip->id)) == 0) &&
 		(probe_info->chip_size == chip->total_size * KiB) &&
+		(!probe_info->probe_timing || probe_info->probe_timing == chip->probe_timing) &&
 		(probe_info->chip_features == (probe_info->chip_features & chip->feature_bits));
 }