diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2008-05-13 23:03:12 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2008-05-13 23:03:12 +0000 |
commit | bfe5b4ab74f2910c77ee0fe00d1586985115d6d2 (patch) | |
tree | 53600a9c1ec08e66702f08bdb95c63ad939a48a9 /flash.h | |
parent | d6cbf76ee527da983b0405ca41ccd60a14d3d7be (diff) | |
download | flashrom-bfe5b4ab74f2910c77ee0fe00d1586985115d6d2.tar.gz flashrom-bfe5b4ab74f2910c77ee0fe00d1586985115d6d2.tar.bz2 flashrom-bfe5b4ab74f2910c77ee0fe00d1586985115d6d2.zip |
Move all IT87xx specific SPI routines from spi.c to a separate file it87spi.c
No behavioural changes, but greatly improved SPI abstraction.
Corresponding to flashrom svn r229 and coreboot v2 svn r3305.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
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); |