summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dediprog.c8
-rw-r--r--programmer.h1
-rw-r--r--spi.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/dediprog.c b/dediprog.c
index a6db17c..bbe7c86 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -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;
}
diff --git a/programmer.h b/programmer.h
index ed9d0b2..a447092 100644
--- a/programmer.h
+++ b/programmer.h
@@ -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 {
diff --git a/spi.c b/spi.c
index 1fc72d4..3df7458 100644
--- a/spi.c
+++ b/spi.c
@@ -124,7 +124,7 @@ const struct spi_programmer spi_programmer[] = {
.command = dediprog_spi_send_command,
.multicommand = default_spi_send_multicommand,
.read = dediprog_spi_read,
- .write_256 = spi_chip_write_1,
+ .write_256 = dediprog_spi_write_256,
},
#endif
OpenPOWER on IntegriCloud