summaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-07-17 12:54:09 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-07-17 12:54:09 +0000
commit0d974e7a9263696fe3bfc7293bb0e632594e0925 (patch)
treeac83a822a78d0e27c96c9278943b8051107ec722 /flash.h
parent1a854fc98ca68dae574a836ead8a6d3e6321fb18 (diff)
downloadflashrom-0d974e7a9263696fe3bfc7293bb0e632594e0925.tar.gz
flashrom-0d974e7a9263696fe3bfc7293bb0e632594e0925.tar.bz2
flashrom-0d974e7a9263696fe3bfc7293bb0e632594e0925.zip
Refine SPI bitbanging
Change the SPI bitbanging core to fix a subtle bug (which had no effect so far) and to make integration of the RayeR SPIPGM and Nvidia MCP6x/MCP7x SPI patches easier. Kill a few global variables and require explicit initialization of bitbanging delay. A big to Johannes Sjölund for testing an earlier version of the code as part of the Nvidia MCP6x/MCP7x SPI bitbanging patch. Corresponding to flashrom svn r1085. 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 'flash.h')
-rw-r--r--flash.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/flash.h b/flash.h
index 206510968..c858eba16 100644
--- a/flash.h
+++ b/flash.h
@@ -133,8 +133,6 @@ enum bitbang_spi_master {
extern const int bitbang_spi_master_count;
-extern enum bitbang_spi_master bitbang_spi_master;
-
struct bitbang_spi_master_entry {
void (*set_cs) (int val);
void (*set_sck) (int val);
@@ -533,9 +531,7 @@ int ft2232_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len);
int ft2232_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len);
/* bitbang_spi.c */
-extern int bitbang_spi_half_period;
-extern const struct bitbang_spi_master_entry bitbang_spi_master_table[];
-int bitbang_spi_init(void);
+int bitbang_spi_init(enum bitbang_spi_master master, int halfperiod);
int bitbang_spi_send_command(unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr);
int bitbang_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len);
int bitbang_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len);