Unify write_39sf020() and write_49f002() functions

The write_39sf020() and write_49f002() functions are identical except
for whitespace differences, so drop one of them.

Corresponding to flashrom svn r497.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
diff --git a/Makefile b/Makefile
index 2a54af5..45b8f94 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@
 LDFLAGS += -lpci -lz
 
 OBJS = chipset_enable.o board_enable.o udelay.o jedec.o stm50flw0x0x.o \
-	sst28sf040.o am29f040b.o mx29f002.o sst39sf020.o m29f400bt.o \
+	sst28sf040.o am29f040b.o mx29f002.o m29f400bt.o \
 	w49f002u.o 82802ab.o pm49fl00x.o sst49lf040.o en29f002a.o \
 	sst49lfxxxc.o sst_fwhub.o layout.o cbtable.o flashchips.o physmap.o \
 	flashrom.o w39v080fa.o sharplhf00l04.o w29ee011.o spi.o it87spi.o \
diff --git a/flashchips.c b/flashchips.c
index e49a2b9..6910c2c 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -1322,7 +1322,7 @@
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -1336,7 +1336,7 @@
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -1350,7 +1350,7 @@
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -1364,7 +1364,7 @@
 		.tested		= TEST_UNTESTED,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -1378,7 +1378,7 @@
 		.tested		= TEST_UNTESTED,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -1392,7 +1392,7 @@
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -1406,7 +1406,7 @@
 		.tested		= TEST_OK_PROBE,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -1420,7 +1420,7 @@
 		.tested		= TEST_UNTESTED,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -2134,7 +2134,7 @@
 		.tested		= TEST_UNTESTED,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -2148,7 +2148,7 @@
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -2176,7 +2176,7 @@
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
@@ -2190,7 +2190,7 @@
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_jedec,
 		.erase		= erase_chip_jedec,
-		.write		= write_39sf020,
+		.write		= write_49f002,
 		.read		= read_memmapped,
 	},
 
diff --git a/sst39sf020.c b/sst39sf020.c
deleted file mode 100644
index f6fcc37..0000000
--- a/sst39sf020.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is part of the flashrom project.
- *
- * Copyright (C) 2000 Silicon Integrated System Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-#include <stdio.h>
-#include <stdint.h>
-#include "flash.h"
-
-int write_39sf020(struct flashchip *flash, uint8_t *buf)
-{
-	int i;
-	int total_size = flash->total_size * 1024;
-	int page_size = flash->page_size;
-	volatile uint8_t *bios = flash->virtual_memory;
-
-	erase_chip_jedec(flash);
-
-	printf("Programming page: ");
-	for (i = 0; i < total_size / page_size; i++) {
-		/* write to the sector */
-		printf("%04d at address: 0x%08x", i, i * page_size);
-		write_sector_jedec(bios, buf + i * page_size,
-				   bios + i * page_size, page_size);
-		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
-		fflush(stdout);
-	}
-	printf("\n");
-
-	return 0;
-}
diff --git a/w49f002u.c b/w49f002u.c
index b7fca6b..3144ebd 100644
--- a/w49f002u.c
+++ b/w49f002u.c
@@ -32,8 +32,8 @@
 
 	printf("Programming page: ");
 	for (i = 0; i < total_size / page_size; i++) {
-		/* write to the sector */
 		printf("%04d at address: 0x%08x ", i, i * page_size);
+		/* Byte-wise writing of 'page_size' bytes. */
 		write_sector_jedec(bios, buf + i * page_size,
 				   bios + i * page_size, page_size);
 		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");