diff options
author | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2008-05-13 23:03:12 +0000 |
---|---|---|
committer | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2008-05-13 23:03:12 +0000 |
commit | d07310e1c25204b1af063e3d75d10b6234a00425 (patch) | |
tree | 53600a9c1ec08e66702f08bdb95c63ad939a48a9 /flash.h | |
parent | 6b91655fced16acc789dd1aa5e8fd509c2e523c1 (diff) | |
download | flashrom-d07310e1c25204b1af063e3d75d10b6234a00425.tar.gz |
Original v2 revision: 3305
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: https://code.coreboot.org/svn/flashrom/trunk@229 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'flash.h')
-rw-r--r-- | flash.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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); |