summaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>2010-07-22 18:04:15 +0000
committerMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>2010-07-22 18:04:15 +0000
commita4448d9aec2c2f6122f3a2141d8ed81032fbb2e6 (patch)
tree9a784e968db73ec1e95bd27efe7aa3d7c7ca9a8e /flash.h
parentd97c0e02d610485357e569b2e1662d6bc6763d9e (diff)
downloadflashrom-a4448d9aec2c2f6122f3a2141d8ed81032fbb2e6.tar.gz
flashrom-a4448d9aec2c2f6122f3a2141d8ed81032fbb2e6.tar.bz2
flashrom-a4448d9aec2c2f6122f3a2141d8ed81032fbb2e6.zip
Move Intel SPI initialisation to ichspi.c
Smarter version could decide whether SPI is vital or not depending on straps. Straps are currently implemented for ICH7. EP80579 is in the comment, PCH of 5 Series/3400 Series has "LPC, reserved, PCI, SPI". Corresponding to flashrom svn r1098. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/flash.h b/flash.h
index ca3f6f547..1cf333aca 100644
--- a/flash.h
+++ b/flash.h
@@ -607,6 +607,9 @@ int doit(struct flashchip *flash, int force, char *filename, int read_it, int wr
#define OK 0
#define NT 1 /* Not tested */
+/* Something happened that shouldn't happen, but we can go on */
+#define ERROR_NONFATAL 0x100
+
/* cli_output.c */
/* Let gcc and clang check for correct printf-style format strings. */
int print(int type, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
@@ -694,10 +697,10 @@ int default_spi_send_multicommand(struct spi_command *cmds);
uint32_t spi_get_valid_read_addr(void);
/* ichspi.c */
-extern int ichspi_lock;
extern uint32_t ichspi_bbar;
-extern void *ich_spibar;
-int ich_init_opcodes(void);
+int ich_init_spi(struct pci_dev *dev, uint32_t base, void *rcrb,
+ int ich_generation);
+int via_init_spi(struct pci_dev *dev);
int ich_spi_send_command(unsigned int writecnt, unsigned int readcnt,
const unsigned char *writearr, unsigned char *readarr);
int ich_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len);