opaque: Use bus probing
Change-Id: I94f6f99144f28259efa358ed4d9fe82bd51c30b7
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/450
diff --git a/include/chipdrivers/opaque.h b/include/chipdrivers/opaque.h
index d172861..d6d3eba 100644
--- a/include/chipdrivers/opaque.h
+++ b/include/chipdrivers/opaque.h
@@ -19,11 +19,15 @@
#include <stdint.h>
struct flashprog_flashctx;
+struct master_common;
+struct bus_probe;
+struct flashchip;
+
+struct found_id *probe_opaque(const struct bus_probe *, const struct master_common *, const struct flashchip *);
enum preparation_steps;
int prepare_opaque(struct flashprog_flashctx *, enum preparation_steps);
-int probe_opaque(struct flashprog_flashctx *);
int read_opaque(struct flashprog_flashctx *, uint8_t *buf, unsigned int start, unsigned int len);
int write_opaque(struct flashprog_flashctx *, const uint8_t *buf, unsigned int start, unsigned int len);
int erase_opaque(struct flashprog_flashctx *, unsigned int blockaddr, unsigned int blocklen);