spi_master: Introduce SPI_MASTER_4BA feature flag
Add a feature flag SPI_MASTER_4BA to `struct spi_master` that advertises
programmer-side support for 4-byte addresses in generic commands (and
read/write commands if the master uses the default implementations). Set
it for all masters that handle commands address-agnostic.
Don't prefer native 4BA instructions if the master doesn't support them.
Change-Id: Ife66e3fc49b9716f9c99cad957095b528135ec2c
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22421
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
diff --git a/dummyflasher.c b/dummyflasher.c
index f171128..1c0c85b 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -111,6 +111,7 @@
static const struct spi_master spi_master_dummyflasher = {
.type = SPI_CONTROLLER_DUMMY,
+ .features = SPI_MASTER_4BA,
.max_data_read = MAX_DATA_READ_UNLIMITED,
.max_data_write = MAX_DATA_UNSPECIFIED,
.command = dummy_spi_send_command,