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> 
diff --git a/jedec.c b/jedec.c
index 259f883..4f042f2 100644
--- a/jedec.c
+++ b/jedec.c
@@ -336,7 +336,8 @@
 	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 @@
 	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 @@
 	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)