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/spi.c b/spi.c
index 7cacca3..15809c6 100644
--- a/spi.c
+++ b/spi.c
@@ -22,6 +22,7 @@
#include <string.h>
#include "flash.h"
#include "flashchips.h"
+#include "chipdrivers/edi.h"
#include "chipdrivers/spi.h"
#include "chipdrivers/probing.h"
#include "programmer.h"
@@ -173,6 +174,7 @@
{ 0, ID_SPI_SFDP, probe_spi_sfdp, NULL },
{ 1, ID_SPI_ST95, probe_spi_st95, (void *)(uintptr_t)3 },
{ 1, ID_SPI_ST95, probe_spi_st95, (void *)(uintptr_t)2 },
+ { 2, ID_EDI, probe_edi, NULL },
};
static bool spi_probe_match(const struct flashchip *chip, const struct id_info_ext *found)