memory_bus: Add infrastructure for per-bus probing

All the probing functions for the traditional memory-mapped chips,
parallel, LPC and FWH, are parameterized by additional chip proper-
ties like the chip size and feature bits like FEATURE_ADDR_SHIFTED.
Hence, we match against an extended `id_info' with chip size and
feature bits. For a match, all the feature bits assumed during
probing, need to be set for a given chip as well.

Change-Id: Id5c3d8933cd6aeaf87a090b6f0798d2a5746ee17
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/440
diff --git a/include/chipdrivers/memory_bus.h b/include/chipdrivers/memory_bus.h
index 2a5e080..75501da 100644
--- a/include/chipdrivers/memory_bus.h
+++ b/include/chipdrivers/memory_bus.h
@@ -90,6 +90,18 @@
 int write_en29lv640b(struct flashprog_flashctx *, const uint8_t *buf, unsigned int start, unsigned int len);
 
 /* memory_bus.c */
+struct memory_chip_info {
+	chipsize_t chip_size;
+	feature_bits_t chip_features;
+};
+
+struct memory_found_id {
+	struct found_id generic;
+	struct memory_chip_info memory_info;
+};
+
+struct memory_found_id *alloc_memory_found_id(void);
+
 struct par_master;
 void *programmer_map_flash_data(const struct par_master *, chipsize_t, const char *descr);
 void programmer_unmap_flash_region(const struct par_master *, void *, chipsize_t);