summaryrefslogtreecommitdiffstats
path: root/jedec.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 /jedec.c
parent79e6757d269b91ee759bd569df7093225f4f3715 (diff)
downloadast2050-flashrom-75a58f94cc641e8051169ec6bb9894a390a8e2bf.zip
ast2050-flashrom-75a58f94cc641e8051169ec6bb9894a390a8e2bf.tar.gz
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 'jedec.c')
-rw-r--r--jedec.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/jedec.c b/jedec.c
index 259f883..4f042f2 100644
--- a/jedec.c
+++ b/jedec.c
@@ -336,7 +336,8 @@ retry:
return failed;
}
-int write_sector_jedec_common(struct flashchip *flash, uint8_t *src, int start, int len)
+/* chunksize is 1 */
+int write_jedec_1(struct flashchip *flash, uint8_t *src, int start, int len)
{
int i, failed = 0;
chipaddr dst = flash->virtual_memory + start;
@@ -398,13 +399,14 @@ retry:
return failed;
}
+/* chunksize is page_size */
/*
* Write a part of the flash chip.
* FIXME: Use the chunk code from Michael Karcher instead.
* This function is a slightly modified copy of spi_write_chunked.
* Each page is written separately in chunks with a maximum size of chunksize.
*/
-int write_jedec_pages(struct flashchip *flash, uint8_t *buf, int start, int len)
+int write_jedec(struct flashchip *flash, uint8_t *buf, int start, int len)
{
int i, starthere, lenhere;
/* FIXME: page_size is the wrong variable. We need max_writechunk_size
@@ -437,18 +439,6 @@ int write_jedec_pages(struct flashchip *flash, uint8_t *buf, int start, int len)
return 0;
}
-/* chunksize is page_size */
-int write_jedec(struct flashchip *flash, uint8_t *buf)
-{
- return write_jedec_pages(flash, buf, 0, flash->total_size * 1024);
-}
-
-/* chunksize is 1 */
-int write_jedec_1(struct flashchip *flash, uint8_t * buf)
-{
- return write_sector_jedec_common(flash, buf, 0, flash->total_size * 1024);
-}
-
/* erase chip with block_erase() prototype */
int erase_chip_block_jedec(struct flashchip *flash, unsigned int addr,
unsigned int blocksize)
OpenPOWER on IntegriCloud