spi: Move SPI related things into new chipdrivers/spi.h
A few things that rely heavily on `flash.h` are moved there instead:
* function signatures containing `erasefunc_t`,
* the inline default_wrsr_target() that needs to know struct flashctx.
This allows to keep the new header file free of a transitive `flash.h`
include.
Change-Id: Ib215821feeb822ea3fc11bf9f48c0328f9a394d4
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/416
diff --git a/writeprotect_ranges.c b/writeprotect_ranges.c
index d15ba5d..49b931e 100644
--- a/writeprotect_ranges.c
+++ b/writeprotect_ranges.c
@@ -14,8 +14,9 @@
* GNU General Public License for more details.
*/
+#include "flash.h"
#include "writeprotect.h"
-#include "chipdrivers.h"
+#include "chipdrivers/spi.h"
static void decode_range_generic(size_t *start, size_t *len, const struct wp_bits *bits, size_t chip_len,
bool fixed_block_len, bool apply_cmp_to_bp, int coeff_offset)