summaryrefslogtreecommitdiff
path: root/jedec.c
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-10-13 22:26:56 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-10-13 22:26:56 +0000
commitd2d844233f1e0c937b12d5d777b767d1be24d840 (patch)
treeeb3c0573cecfe70ded0b96003dc6f4d5e55975d4 /jedec.c
parent16cdcc5122be1bb2e334292fc4e473597877c0fa (diff)
downloadflashrom-d2d844233f1e0c937b12d5d777b767d1be24d840.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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1211 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
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)