[coreboot] [PATCH] flashrom: Kill dead code

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Jun 18 15:19:26 CEST 2009


Kill dead code which has been disabled since the very first commit of
flashrom.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: flashrom-mx29f002_kill_dead_code/mx29f002.c
===================================================================
--- flashrom-mx29f002_kill_dead_code/mx29f002.c	(Revision 603)
+++ flashrom-mx29f002_kill_dead_code/mx29f002.c	(Arbeitskopie)
@@ -58,19 +58,6 @@
 	programmer_delay(100);
 	toggle_ready_jedec(bios);
 
-	//   while ((*bios & 0x40) != 0x40)
-	//;
-
-#if 0
-	toggle_ready_jedec(bios);
-	chip_writeb(0x30, bios + 0x0ffff);
-	chip_writeb(0x30, bios + 0x1ffff);
-	chip_writeb(0x30, bios + 0x2ffff);
-	chip_writeb(0x30, bios + 0x37fff);
-	chip_writeb(0x30, bios + 0x39fff);
-	chip_writeb(0x30, bios + 0x3bfff);
-#endif
-
 	if (check_erased_range(flash, 0, flash->total_size * 1024)) {
 		fprintf(stderr, "ERASE FAILED!\n");
 		return -1;
@@ -91,8 +78,6 @@
 		fprintf(stderr, "ERASE FAILED!\n");
 		return -1;
 	}
-	//*bios = 0xF0;
-#if 1
 	printf("Programming page: ");
 	for (i = 0; i < total_size; i++) {
 		/* write to the sector */
@@ -109,7 +94,6 @@
 		if ((i & 0xfff) == 0)
 			printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
-#endif
 	printf("\n");
 
 	return 0;


-- 
http://www.hailfinger.org/

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: flashrom_mx29f002_kill_dead_code.diff
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090618/c59e96c9/attachment.ksh>


More information about the coreboot mailing list