summaryrefslogtreecommitdiffstats
path: root/spi.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-10-13 22:26:56 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-10-13 22:26:56 +0000
commit75a58f94cc641e8051169ec6bb9894a390a8e2bf (patch)
treeeb3c0573cecfe70ded0b96003dc6f4d5e55975d4 /spi.c
parent79e6757d269b91ee759bd569df7093225f4f3715 (diff)
downloadflashrom-75a58f94cc641e8051169ec6bb9894a390a8e2bf.tar.gz
flashrom-75a58f94cc641e8051169ec6bb9894a390a8e2bf.tar.bz2
flashrom-75a58f94cc641e8051169ec6bb9894a390a8e2bf.zip
Switch all flash chips to partial write
The inner write functions which handle partial write are renamed to the original name of their wrappers. The write wrappers are removed. Corresponding to flashrom svn r1211. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com> Tested-by: Andrew Morgan <ziltro@ziltro.com> Tested-by: Idwer Vollering <vidwer@gmail.com> Acked-by: Idwer Vollering <vidwer@gmail.com> Tested-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Sean Nelson <audiohacked@gmail.com>
Diffstat (limited to 'spi.c')
-rw-r--r--spi.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/spi.c b/spi.c
index 85607e790..1fc72d44a 100644
--- a/spi.c
+++ b/spi.c
@@ -80,7 +80,7 @@ const struct spi_programmer spi_programmer[] = {
.command = wbsio_spi_send_command,
.multicommand = default_spi_send_multicommand,
.read = wbsio_spi_read,
- .write_256 = spi_chip_write_1_new,
+ .write_256 = spi_chip_write_1,
},
{ /* SPI_CONTROLLER_MCP6X_BITBANG */
@@ -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_new,
+ .write_256 = spi_chip_write_1,
},
#endif
@@ -245,7 +245,7 @@ int spi_chip_read(struct flashchip *flash, uint8_t *buf, int start, int len)
* .write_256 = spi_chip_write_1
*/
/* real chunksize is up to 256, logical chunksize is 256 */
-int spi_chip_write_256_new(struct flashchip *flash, uint8_t *buf, int start, int len)
+int spi_chip_write_256(struct flashchip *flash, uint8_t *buf, int start, int len)
{
if (!spi_programmer[spi_controller].write_256) {
msg_perr("%s called, but SPI page write is unsupported on this "
@@ -257,20 +257,6 @@ int spi_chip_write_256_new(struct flashchip *flash, uint8_t *buf, int start, int
return spi_programmer[spi_controller].write_256(flash, buf, start, len);
}
-/* Wrapper function until the generic code is converted to partial writes. */
-int spi_chip_write_256(struct flashchip *flash, uint8_t *buf)
-{
- int ret;
-
- msg_pinfo("Programming flash... ");
- ret = spi_chip_write_256_new(flash, buf, 0, flash->total_size * 1024);
- if (!ret)
- msg_pinfo("done.\n");
- else
- msg_pinfo("\n");
- return ret;
-}
-
/*
* Get the lowest allowed address for read accesses. This often happens to
* be the lowest allowed address for all commands which take an address.