From e8c818e1cd78e69a3cb2ad9785a48a858f34415c Mon Sep 17 00:00:00 2001 From: hailfinger Date: Sun, 18 Dec 2011 15:01:24 +0000 Subject: Add struct flashctx * parameter to all functions accessing flash chips. All programmer access function prototypes except init have been made static and moved to the respective file. A few internal functions in flash chip drivers had chipaddr parameters which are no longer needed. The lines touched by flashctx changes have been adjusted to 80 columns except in header files. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Michael Karcher git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1474 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- ft2232_spi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ft2232_spi.c') diff --git a/ft2232_spi.c b/ft2232_spi.c index 8d89ea1..ce7d899 100644 --- a/ft2232_spi.c +++ b/ft2232_spi.c @@ -144,8 +144,10 @@ static int get_buf(struct ftdi_context *ftdic, const unsigned char *buf, return 0; } -static int ft2232_spi_send_command(unsigned int writecnt, unsigned int readcnt, - const unsigned char *writearr, unsigned char *readarr); +static int ft2232_spi_send_command(struct flashctx *flash, + unsigned int writecnt, unsigned int readcnt, + const unsigned char *writearr, + unsigned char *readarr); static const struct spi_programmer spi_programmer_ft2232 = { .type = SPI_CONTROLLER_FT2232, @@ -342,8 +344,10 @@ ftdi_err: } /* Returns 0 upon success, a negative number upon errors. */ -static int ft2232_spi_send_command(unsigned int writecnt, unsigned int readcnt, - const unsigned char *writearr, unsigned char *readarr) +static int ft2232_spi_send_command(struct flashctx *flash, + unsigned int writecnt, unsigned int readcnt, + const unsigned char *writearr, + unsigned char *readarr) { struct ftdi_context *ftdic = &ftdic_context; static unsigned char *buf = NULL; -- cgit v1.2.1