edi: Turn edi_chip_probe() into a bus probing function
Let our common bus-probing infrastructure handle the ID comparison.
This also makes the `flashchips' entry (KB9012) an actual chip entry
that carries its identification.
Change-Id: I9533ece2b1337281ea70cb2e3be7a74353a4a758
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/424
diff --git a/flashchips.c b/flashchips.c
index 02aaf88..bd07239 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -18,6 +18,7 @@
* GNU General Public License for more details.
*/
+#include "ene.h"
#include "flash.h"
#include "flashchips.h"
#include "chipdrivers.h"
@@ -4187,12 +4188,14 @@
.name = "KB9012 (EDI)",
.bustype = BUS_SPI,
.id.type = ID_EDI,
+ .id.hwversion = ENE_KB9012_HWVERSION,
+ .id.model = ENE_KB9012_EDIID,
.total_size = 128,
.page_size = 128,
.feature_bits = FEATURE_ERASED_ZERO,
.tested = TEST_OK_PREW,
.spi_cmd_set = SPI_EDI,
- .probe = edi_probe_kb9012,
+ .probe = probe_buses,
.probe_timing = TIMING_ZERO,
.block_erasers =
{