mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 06:01:16 +02:00
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>
This commit is contained in:

committed by
Nico Huber

parent
5a97be363a
commit
0a7f036610
@ -410,16 +410,6 @@ static int realtek_mst_i2c_spi_write_aai(struct flashctx *flash, const uint8_t *
|
||||
return SPI_GENERIC_ERROR;
|
||||
}
|
||||
|
||||
static const struct spi_master spi_master_i2c_realtek_mst = {
|
||||
.max_data_read = 16,
|
||||
.max_data_write = 8,
|
||||
.command = realtek_mst_i2c_spi_send_command,
|
||||
.multicommand = default_spi_send_multicommand,
|
||||
.read = realtek_mst_i2c_spi_read,
|
||||
.write_256 = realtek_mst_i2c_spi_write_256,
|
||||
.write_aai = realtek_mst_i2c_spi_write_aai,
|
||||
};
|
||||
|
||||
static int realtek_mst_i2c_spi_shutdown(void *data)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -442,6 +432,16 @@ static int realtek_mst_i2c_spi_shutdown(void *data)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct spi_master spi_master_i2c_realtek_mst = {
|
||||
.max_data_read = 16,
|
||||
.max_data_write = 8,
|
||||
.command = realtek_mst_i2c_spi_send_command,
|
||||
.multicommand = default_spi_send_multicommand,
|
||||
.read = realtek_mst_i2c_spi_read,
|
||||
.write_256 = realtek_mst_i2c_spi_write_256,
|
||||
.write_aai = realtek_mst_i2c_spi_write_aai,
|
||||
};
|
||||
|
||||
static int get_params(int *reset, int *enter_isp)
|
||||
{
|
||||
char *reset_str = NULL, *isp_str = NULL;
|
||||
|
Reference in New Issue
Block a user