summaryrefslogtreecommitdiff
path: root/util/flashrom/flash.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2008-05-13 23:03:12 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2008-05-13 23:03:12 +0000
commitb77fb6bd5276f566c02b10a3019f051f37834fc4 (patch)
treef9c798a5bfc40a15ed506cf3388df54dde946eca /util/flashrom/flash.h
parent03646bebbea8f2f4cace53be797dc727413ae69d (diff)
flashrom: Move all IT87xx specific SPI routines from spi.c to a separate
file it87spi.c. No behavioural changes, but greatly improved SPI abstraction. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3305 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flash.h')
-rw-r--r--util/flashrom/flash.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/flashrom/flash.h b/util/flashrom/flash.h
index 6a1475e47b..b4ad94b7ee 100644
--- a/util/flashrom/flash.h
+++ b/util/flashrom/flash.h
@@ -360,6 +360,11 @@ void spi_write_disable();
int spi_chip_erase_c7(struct flashchip *flash);
int spi_chip_write(struct flashchip *flash, uint8_t *buf);
int spi_chip_read(struct flashchip *flash, uint8_t *buf);
+uint8_t spi_read_status_register();
+void spi_disable_blockprotect(void);
+void spi_byte_program(int address, uint8_t byte);
+void spi_page_program(int block, uint8_t *buf, uint8_t *bios);
+void spi_nbyte_read(int address, uint8_t *bytes, int len);
/* 82802ab.c */
int probe_82802ab(struct flashchip *flash);
@@ -371,6 +376,13 @@ int probe_29f040b(struct flashchip *flash);
int erase_29f040b(struct flashchip *flash);
int write_29f040b(struct flashchip *flash, uint8_t *buf);
+/* it87spi.c */
+extern uint16_t it8716f_flashport;
+int it8716f_spi_command(unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr);
+int it8716f_spi_chip_read(struct flashchip *flash, uint8_t *buf);
+int it8716f_spi_chip_write(struct flashchip *flash, uint8_t *buf);
+void it8716f_spi_page_program(int block, uint8_t *buf, uint8_t *bios);
+
/* jedec.c */
void toggle_ready_jedec(volatile uint8_t *dst);
void data_polling_jedec(volatile uint8_t *dst, uint8_t data);