From 1cf407b4f8d56035816efaf936a40553441eca46 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Fri, 10 Nov 2017 20:18:23 +0100 Subject: 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 Reviewed-on: https://review.coreboot.org/22421 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks --- ch341a_spi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ch341a_spi.c') diff --git a/ch341a_spi.c b/ch341a_spi.c index 6eb28048b..2253e43c5 100644 --- a/ch341a_spi.c +++ b/ch341a_spi.c @@ -399,6 +399,7 @@ static int ch341a_spi_spi_send_command(struct flashctx *flash, unsigned int writ static const struct spi_master spi_master_ch341a_spi = { .type = SPI_CONTROLLER_CH341A_SPI, + .features = SPI_MASTER_4BA, /* flashrom's current maximum is 256 B. CH341A was tested on Linux and Windows to accept atleast * 128 kB. Basically there should be no hard limit because transfers are broken up into USB packets * sent to the device and most of their payload streamed via SPI. */ -- cgit v1.2.3