mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
Add chunked write ability to the Dediprog SF100 driver
Please note that the write speedup only applies to chips which have SPI page write (i.e. chips using spi_chip_write_256). This is a quick fix for write speed until I get around to implementing full bulk SPI write support. Corresponding to flashrom svn r1235. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Richard A. Smith <richard@laptop.org> Acked-by: Mathias Krause <mathias.krause@secunet.com>
This commit is contained in:
parent
482e97443d
commit
306b81875d
@ -238,6 +238,12 @@ int dediprog_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dediprog_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len)
|
||||
{
|
||||
/* No idea about the real limit. Maybe 12, maybe more, maybe less. */
|
||||
return spi_write_chunked(flash, buf, start, len, 12);
|
||||
}
|
||||
|
||||
int dediprog_spi_send_command(unsigned int writecnt, unsigned int readcnt,
|
||||
const unsigned char *writearr, unsigned char *readarr)
|
||||
{
|
||||
@ -245,7 +251,7 @@ int dediprog_spi_send_command(unsigned int writecnt, unsigned int readcnt,
|
||||
|
||||
msg_pspew("%s, writecnt=%i, readcnt=%i\n", __func__, writecnt, readcnt);
|
||||
/* Paranoid, but I don't want to be blamed if anything explodes. */
|
||||
if (writecnt > 5) {
|
||||
if (writecnt > 16) {
|
||||
msg_perr("Untested writecnt=%i, aborting.\n", writecnt);
|
||||
return 1;
|
||||
}
|
||||
|
@ -472,6 +472,7 @@ int dediprog_init(void);
|
||||
int dediprog_shutdown(void);
|
||||
int dediprog_spi_send_command(unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr);
|
||||
int dediprog_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len);
|
||||
int dediprog_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len);
|
||||
|
||||
/* flashrom.c */
|
||||
struct decode_sizes {
|
||||
|
Loading…
x
Reference in New Issue
Block a user