[coreboot] r3368 - trunk/util/flashrom

svn at coreboot.org svn at coreboot.org
Wed Jun 18 15:36:35 CEST 2008


Author: stuge
Date: 2008-06-18 15:36:34 +0200 (Wed, 18 Jun 2008)
New Revision: 3368

Modified:
   trunk/util/flashrom/flash.h
   trunk/util/flashrom/flashchips.c
   trunk/util/flashrom/w29ee011.c
Log:
flashrom: Add support for AMIC Technology A49LF040A and do not probe W29EE011 anymore

Jens sent the first patch that added A49LF040A to flash.h and flashchips.c
using _jedec and _49lf040 functions.

An issue was found with probe_w29ee011() for the Winbond W29EE011, which
caused the A49LF040A to no longer respond to any commands.

Ward made a patch to disable probing by default for the W29EE011 following
some discussion. Using -c W29EE011 will make flashrom probe for the chip.

Peter did some more datasheet diving and found that the Pm49FL00x functions
suited this chip quite well because of the block locking registers in
A49LF040A, and finally tested PROBE READ ERASE WRITE to work on ALIX.3c3.

Ward confirmed that this works on alix.2c3 too.

Signed-off-by: Jens Kuehnel <coreboot at jens.kuehnel.org>
Signed-off-by: Ward Vandewege <ward at gnu.org>
Signed-off-by: Peter Stuge <peter at stuge.se>
Acked-by: Ward Vandewege <ward at gnu.org>


Modified: trunk/util/flashrom/flash.h
===================================================================
--- trunk/util/flashrom/flash.h	2008-06-18 02:08:40 UTC (rev 3367)
+++ trunk/util/flashrom/flash.h	2008-06-18 13:36:34 UTC (rev 3368)
@@ -120,6 +120,7 @@
 #define AMIC_ID_NOPREFIX	0x37	/* AMIC */
 #define AMIC_A25L40P		0x2013
 #define AMIC_A29040B		0x86
+#define AMIC_A49LF040A		0x9d
 
 #define ASD_ID			0x25	/* ASD, not listed in JEP106W */
 #define ASD_AE49F2008		0x52

Modified: trunk/util/flashrom/flashchips.c
===================================================================
--- trunk/util/flashrom/flashchips.c	2008-06-18 02:08:40 UTC (rev 3367)
+++ trunk/util/flashrom/flashchips.c	2008-06-18 13:36:34 UTC (rev 3368)
@@ -45,6 +45,7 @@
 	{"Atmel",	"AT49F002(N)T",		ATMEL_ID,	AT_49F002NT,		256,	256,		TEST_UNTESTED,	probe_jedec,		erase_chip_jedec,		write_jedec},
 	{"Atmel",       "AT25DF321",		ATMEL_ID,	AT_25DF321,		4096,	256,		TEST_OK_PREW,	probe_spi_rdid,		spi_chip_erase_c7,	spi_chip_write,	spi_chip_read},
 	{"Amic Technology","A25L40P",		AMIC_ID,	AMIC_A25L40P,		512,	256,		TEST_UNTESTED,	probe_spi_rdid,		spi_chip_erase_c7,	spi_chip_write, spi_chip_read},
+	{"AMIC Technology","A49LF040A",		AMIC_ID_NOPREFIX, AMIC_A49LF040A,	512,	64 * 1024,	TEST_OK_PREW,	probe_49fl00x,		erase_49fl00x,			write_49fl00x},
 	{"Amic Technology","A29040B",		AMIC_ID_NOPREFIX, AMIC_A29040B,		512,	64 * 1024,	TEST_OK_PR,	probe_29f040b,		erase_29f040b,			write_29f040b},
 	{"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_jedec},

Modified: trunk/util/flashrom/w29ee011.c
===================================================================
--- trunk/util/flashrom/w29ee011.c	2008-06-18 02:08:40 UTC (rev 3367)
+++ trunk/util/flashrom/w29ee011.c	2008-06-18 13:36:34 UTC (rev 3368)
@@ -18,13 +18,24 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include <string.h>
 #include "flash.h"
 
 int probe_w29ee011(struct flashchip *flash)
 {
 	volatile uint8_t *bios = flash->virtual_memory;
 	uint8_t id1, id2;
+	extern char *chip_to_probe;
 
+	if (!chip_to_probe || strcmp(chip_to_probe,"W29EE011")) {
+		printf_debug("\n===\n");
+		printf_debug("  Probing disabled for Winbond W29EE011 because the probing sequence puts the\n");
+		printf_debug("  AMIC A49LF040A in a funky state.\n");
+		printf_debug("  Use 'flashrom -c W29EE011' if you have a board with this chip.");
+		printf_debug("\n===\n");
+		return 0;
+	}
+
 	/* Issue JEDEC Product ID Entry command */
 	*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
 	myusec_delay(10);





More information about the coreboot mailing list