Index: flashchips.c
===================================================================
--- flashchips.c	(revision 3654)
+++ flashchips.c	(working copy)
@@ -46,11 +46,12 @@
 	{"AMIC",	"A25L40P",		AMIC_ID,	AMIC_A25L40P,		512,	256,		TEST_OK_PREW,	probe_spi_rdid4,	spi_chip_erase_c7,	spi_chip_write, spi_chip_read},
 	{"AMIC",	"A29002B",		AMIC_ID_NOPREFIX, AMIC_A29002B,		256,	64 * 1024,	TEST_UNTESTED,	probe_29f002,		erase_29f002,			write_29f002},
 	{"AMIC",	"A29002T",		AMIC_ID_NOPREFIX, AMIC_A29002T,		256,	64 * 1024,	TEST_OK_PREW,	probe_29f002,		erase_29f002,			write_29f002},
-	{"AMIC",	"A29040B",		AMIC_ID_NOPREFIX, AMIC_A29040B,		512,	64 * 1024,	TEST_OK_PR,	probe_29f040b,		erase_29f040b,			write_29f040b},
+	{"AMIC",	"A29040B",		AMIC_ID_NOPREFIX, AMIC_A29040B,		512,	64 * 1024,	TEST_OK_PREW,	probe_29f040b,		erase_29f040b,			write_29f040b},
 	{"AMIC",	"A49LF040A",		AMIC_ID_NOPREFIX, AMIC_A49LF040A,	512,	64 * 1024,	TEST_OK_PREW,	probe_49fl00x,		erase_49fl00x,			write_49fl00x},
 	{"EMST",	"F49B002UA",		EMST_ID,	EMST_F49B002UA,		256,	4096,		TEST_UNTESTED,	probe_jedec,		erase_chip_jedec,		write_49f002},
 	{"EON",		"EN29F002(A)(N)B",	EON_ID,		EN_29F002B,		256,	256,		TEST_UNTESTED,	probe_jedec,		erase_chip_jedec,		write_en29f002a},
 	{"EON",		"EN29F002(A)(N)T",	EON_ID,		EN_29F002T,		256,	256,		TEST_OK_PREW,	probe_jedec,		erase_chip_jedec,		write_en29f002a},
+	{"EON",		"EN29F040A",	EON_ID,		EN_29F040A,			512,	64 * 1024,	TEST_OK_PREW,	probe_jedec,		erase_chip_jedec,		write_en29f002a},
 	{"Fujitsu",	"MBM29F400TC",		FUJITSU_ID,	MBM29F400TC_STRANGE,	512,	64 * 1024,	TEST_UNTESTED,	probe_m29f400bt,	erase_m29f400bt,		write_coreboot_m29f400bt},
 	{"Intel",	"82802AB",		INTEL_ID,	173,			512,	64 * 1024,	TEST_OK_PREW,	probe_82802ab,		erase_82802ab,			write_82802ab},
 	{"Intel",	"82802AC",		INTEL_ID,	172,			1024,	64 * 1024,	TEST_OK_PREW,	probe_82802ab,		erase_82802ab,			write_82802ab},
Index: board_enable.c
===================================================================
--- board_enable.c	(revision 3654)
+++ board_enable.c	(working copy)
@@ -152,6 +152,33 @@
 	return w83627thf_gpio4_4_raise(0x4e, name);
 }
 
+static int w83697hg_memw_enable(uint16_t index, const char *name)
+{
+	w836xx_ext_enter(index);
+
+	/* Is this the W83697HG? */
+	if (wbsio_read(index, 0x20) != 0x60) {	/* Super I/O device ID reg. */
+		fprintf(stderr, "\nERROR: %s: W83627THF: Wrong ID: 0x%02X.\n",
+			name, wbsio_read(index, 0x20));
+		w836xx_ext_leave(index);
+		return -1;
+	}
+	/* Raise ROM MEMW# line on Winbond W83697 Super I/O. */
+	if (!(wbsio_read(0x2e, 0x24) & 0x02)) {	/* Flash ROM enabled? */
+		/* Enable MEMW# and set ROM size select to max. (4M).  */
+		wbsio_mask(0x2e, 0x24, 0x28, 0x28);
+	}
+
+	w836xx_ext_leave(index);
+
+	return 0;
+}
+
+static int w83697hg_memw_enable_2e(const char *name)
+{
+	return w83697hg_memw_enable(0x2e, name);
+}
+
 /**
  * Suited for VIAs EPIA M and MII, and maybe other CLE266 based EPIAs.
  *
@@ -208,14 +235,7 @@
 	val &= 0x7F;
 	pci_write_byte(dev, 0x59, val);
 
-	/* Raise ROM MEMW# line on Winbond W83697 Super I/O. */
-	w836xx_ext_enter(0x2E);
-
-	if (!(wbsio_read(0x2E, 0x24) & 0x02))	/* Flash ROM enabled? */
-		wbsio_mask(0x2E, 0x24, 0x08, 0x08);	/* Enable MEMW#. */
-
-	w836xx_ext_leave(0x2E);
-
+	w83697hg_memw_enable_2e(name);
 	return 0;
 }
 
@@ -581,14 +601,7 @@
 	val2 |= 0x10;
 	OUTB(val2, port + 0x4d);
 
-	/* Raise ROM MEMW# line on Winbond W83697 Super I/O. */
-	w836xx_ext_enter(0x2e);
-	if (!(wbsio_read(0x2e, 0x24) & 0x02)) {	/* Flash ROM enabled? */
-		/* Enable MEMW# and set ROM size select to max. (4M). */
-		wbsio_mask(0x2e, 0x24, 0x28, 0x28);
-	}
-	w836xx_ext_leave(0x2e);
-
+	w83697hg_memw_enable_2e(name);
 	return 0;
 }
 
@@ -650,6 +663,8 @@
 	 NULL, NULL, "VIA EPIA SP", board_via_epia_sp},
 	{0x1106, 0x0314, 0x1106, 0xaa08, 0x1106, 0x3227, 0x1106, 0xAA08,
 	 NULL, NULL, "VIA EPIA-CN", board_via_epia_sp},
+	{0x1106, 0x3059, 0x1106, 0x4161, 0x1106, 0x3065, 0x1106, 0x0102,
+	 NULL, NULL, "Bcom WinNET P680", w83697hg_memw_enable_2e},
 	{0x8086, 0x1076, 0x8086, 0x1176, 0x1106, 0x3059, 0x10f1, 0x2498,
 	 NULL, NULL, "Tyan Tomcat K7M", board_asus_a7v8x_mx},
 	{0x10B9, 0x1541, 0x0000, 0x0000, 0x10B9, 0x1533, 0x0000, 0x0000,
