[flashrom] [PATCH 6/6] introduce a global variable to save the maximum number of bytes in an SPI transaction supported by this programmer and use that to simplify code
Stefan Reinauer
stefan.reinauer at coreboot.org
Tue Apr 5 23:46:40 CEST 2011
* Stefan Tauner <stefan.tauner at student.tuwien.ac.at> [110401 14:33]:
>
> Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
> ---
> ichspi.c | 59 +++++++++++++++++++++++------------------------------------
> 1 files changed, 23 insertions(+), 36 deletions(-)
>
> diff --git a/ichspi.c b/ichspi.c
> index 0ad4f20..b22cf4b 100644
> --- a/ichspi.c
> +++ b/ichspi.c
> @@ -124,6 +124,9 @@
> /* ICH SPI configuration lock-down. May be set during chipset enabling. */
> static int ichspi_lock = 0;
>
> +/* Indicates maximum number of data bytes for each SPI transaction. */
> +static int ichspi_maxdata = -1;
> +
> uint32_t ichspi_bbar = 0;
>
> static void *ich_spibar = NULL;
> @@ -824,57 +827,38 @@ static int ich9_run_opcode(OPCODE op, uint32_t offset,
> static int run_opcode(OPCODE op, uint32_t offset,
> uint8_t datalength, uint8_t * data)
> {
> + if (spi_controller == SPI_CONTROLLER_NONE){
curly brackets for command blocks want an additional space.
Stefan
More information about the flashrom
mailing list