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/sfdp.c b/sfdp.c
index bb5034b..215f24a 100644
--- a/sfdp.c
+++ b/sfdp.c
@@ -19,7 +19,7 @@
#include "flash.h"
#include "spi_command.h"
#include "spi.h"
-#include "chipdrivers.h"
+#include "chipdrivers/spi.h"
static int spi_sfdp_read_sfdp_chunk(struct flashctx *flash, uint32_t address, uint8_t *buf, int len)
{