diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2021-07-06 16:03:11 +1000 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-08-17 09:39:18 +0000 |
commit | 0a7f036610673f6664c9d1492912abfdfbdf9f20 (patch) | |
tree | ca67f6d90b777debae831039267adfcab01c18d9 /pickit2_spi.c | |
parent | 5a97be363a269b364569be8223369d9a5bf92292 (diff) | |
download | flashrom-0a7f036610673f6664c9d1492912abfdfbdf9f20.tar.gz flashrom-0a7f036610673f6664c9d1492912abfdfbdf9f20.tar.bz2 flashrom-0a7f036610673f6664c9d1492912abfdfbdf9f20.zip |
spi_master: Move shutdown function above spi_master struct
This patch prepares spi masters to use new API which allows to
register shutdown function in spi_master struct. See also later
patch in this chain, where spi masters are converted to new API.
BUG=b:185191942
TEST=builds and ninja test
Comparing flashrom binary before and after the patch,
make clean && make CONFIG_EVERYTHING=yes VERSION=none
binary is the same
Change-Id: I50716686552b4ddcc6089d5afadb19ef59d9f9b4
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/56101
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'pickit2_spi.c')
-rw-r--r-- | pickit2_spi.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pickit2_spi.c b/pickit2_spi.c index bec94574..73ace4be 100644 --- a/pickit2_spi.c +++ b/pickit2_spi.c @@ -340,16 +340,6 @@ static int parse_voltage(char *voltage) return millivolt; } -static const struct spi_master spi_master_pickit2 = { - .max_data_read = 40, - .max_data_write = 40, - .command = pickit2_spi_send_command, - .multicommand = default_spi_send_multicommand, - .read = default_spi_read, - .write_256 = default_spi_write_256, - .write_aai = default_spi_write_aai, -}; - static int pickit2_shutdown(void *data) { struct pickit2_spi_data *pickit2_data = data; @@ -388,6 +378,16 @@ static int pickit2_shutdown(void *data) return ret; } +static const struct spi_master spi_master_pickit2 = { + .max_data_read = 40, + .max_data_write = 40, + .command = pickit2_spi_send_command, + .multicommand = default_spi_send_multicommand, + .read = default_spi_read, + .write_256 = default_spi_write_256, + .write_aai = default_spi_write_aai, +}; + static int pickit2_spi_init(void) { uint8_t buf[CMD_LENGTH] = { |