spi: Prepare for multi i/o and dummy bytes
Multi-i/o commands split SPI transactions into multiple phases that
can be transferred over 1, 2 or 4 wires. For this, we adapt `struct
spi_command` with a new enum, specifying the transfer mode, and ad-
ditional size fields. While we are at it, move everything related
into a new header file `spi_command.h` so we won't further clutter
`flash.h`.
On the master side, we add respective feature flags for the multi-
i/o modes.
See also the comment in `spi_command.h` about multi-i/o commands.
Change-Id: I79debb845f1c8fec77e0556853ffb01735e73ab8
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/44
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/sfdp.c b/sfdp.c
index e33f7fe..ca64b74 100644
--- a/sfdp.c
+++ b/sfdp.c
@@ -17,6 +17,7 @@
#include <stdlib.h>
#include <string.h>
#include "flash.h"
+#include "spi_command.h"
#include "spi.h"
#include "chipdrivers.h"