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/flash.h b/include/flash.h
index b89df03..0f14037 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -108,6 +108,8 @@
#define MAX_CHIP_RESTORE_FUNCTIONS 4
+typedef uint32_t feature_bits_t;
+
/* Feature bits used for non-SPI only */
#define FEATURE_LONG_RESET (1 << 0)
#define FEATURE_SHORT_RESET (1 << 1)
@@ -255,7 +257,7 @@
unsigned int total_size;
/* Chip page size in bytes */
unsigned int page_size;
- int feature_bits;
+ feature_bits_t feature_bits;
/* Indicate how well flashprog supports different operations of this flash chip. */
struct tested {