diff options
author | Nico Huber <nico.h@gmx.de> | 2017-11-10 20:18:23 +0100 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2018-01-02 20:14:34 +0000 |
commit | 1cf407b4f8d56035816efaf936a40553441eca46 (patch) | |
tree | c8e41e1172aaeb567af161a9763521c53073bdc4 /ch341a_spi.c | |
parent | ed098d62d66d91cf7330a37f9b83e303eb7f56d8 (diff) | |
download | flashrom-1cf407b4f8d56035816efaf936a40553441eca46.tar.gz flashrom-1cf407b4f8d56035816efaf936a40553441eca46.tar.bz2 flashrom-1cf407b4f8d56035816efaf936a40553441eca46.zip |
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>
Diffstat (limited to 'ch341a_spi.c')
-rw-r--r-- | ch341a_spi.c | 1 |
1 files changed, 1 insertions, 0 deletions
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. */ |