diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2011-12-18 15:01:24 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2011-12-18 15:01:24 +0000 |
commit | 8a3c60cdd0e5632173567923ae1927763e31e857 (patch) | |
tree | 3a5514d022392cf4d8fa368f9f02653da21a93ca /buspirate_spi.c | |
parent | 63fd9026f1e82b67a65072fda862ba7af35839e1 (diff) | |
download | ast2050-flashrom-8a3c60cdd0e5632173567923ae1927763e31e857.zip ast2050-flashrom-8a3c60cdd0e5632173567923ae1927763e31e857.tar.gz |
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.
Corresponding to flashrom svn r1474.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Diffstat (limited to 'buspirate_spi.c')
-rw-r--r-- | buspirate_spi.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/buspirate_spi.c b/buspirate_spi.c index fd06b59..f816afd 100644 --- a/buspirate_spi.c +++ b/buspirate_spi.c @@ -86,8 +86,11 @@ static int buspirate_sendrecv(unsigned char *buf, unsigned int writecnt, return 0; } -static int buspirate_spi_send_command(unsigned int writecnt, unsigned int readcnt, - const unsigned char *writearr, unsigned char *readarr); +static int buspirate_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_buspirate = { .type = SPI_CONTROLLER_BUSPIRATE, @@ -291,8 +294,11 @@ int buspirate_spi_init(void) return 0; } -static int buspirate_spi_send_command(unsigned int writecnt, unsigned int readcnt, - const unsigned char *writearr, unsigned char *readarr) +static int buspirate_spi_send_command(struct flashctx *flash, + unsigned int writecnt, + unsigned int readcnt, + const unsigned char *writearr, + unsigned char *readarr) { static unsigned char *buf = NULL; unsigned int i = 0; |