summaryrefslogtreecommitdiff
path: root/wbsio_spi.c
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2011-12-18 15:01:24 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2011-12-18 15:01:24 +0000
commite8c818e1cd78e69a3cb2ad9785a48a858f34415c (patch)
tree3a5514d022392cf4d8fa368f9f02653da21a93ca /wbsio_spi.c
parentbaf84624cd340c9b8dfaa45c56060ab788f4945e (diff)
downloadflashrom-e8c818e1cd78e69a3cb2ad9785a48a858f34415c.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. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1474 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'wbsio_spi.c')
-rw-r--r--wbsio_spi.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/wbsio_spi.c b/wbsio_spi.c
index 50ea1aa..740a48c 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -60,9 +60,12 @@ done:
return flashport;
}
-static int wbsio_spi_send_command(unsigned int writecnt, unsigned int readcnt,
- const unsigned char *writearr, unsigned char *readarr);
-static int wbsio_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
+static int wbsio_spi_send_command(struct flashctx *flash, unsigned int writecnt,
+ unsigned int readcnt,
+ const unsigned char *writearr,
+ unsigned char *readarr);
+static int wbsio_spi_read(struct flashctx *flash, uint8_t *buf,
+ unsigned int start, unsigned int len);
static const struct spi_programmer spi_programmer_wbsio = {
.type = SPI_CONTROLLER_WBSIO,
@@ -110,8 +113,10 @@ int wbsio_check_for_spi(void)
* Would one more byte of RAM in the chip (to get all 24 bits) really make
* such a big difference?
*/
-static int wbsio_spi_send_command(unsigned int writecnt, unsigned int readcnt,
- const unsigned char *writearr, unsigned char *readarr)
+static int wbsio_spi_send_command(struct flashctx *flash, unsigned int writecnt,
+ unsigned int readcnt,
+ const unsigned char *writearr,
+ unsigned char *readarr)
{
int i;
uint8_t mode = 0;
@@ -194,7 +199,8 @@ static int wbsio_spi_send_command(unsigned int writecnt, unsigned int readcnt,
return 0;
}
-static int wbsio_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len)
+static int wbsio_spi_read(struct flashctx *flash, uint8_t *buf,
+ unsigned int start, unsigned int len)
{
return read_memmapped(flash, buf, start, len);
}