[coreboot] Implement read support for Atmel SPI chips

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Mon Nov 17 03:45:38 CET 2008


Implement read support for the following Atmel chips:
AT25DF021
AT25DF041A
AT25DF081
AT25DF161
AT25DF321A
AT25DF641
AT25F512B
AT25FS010
AT25FS040
AT26DF041
AT26DF081A
AT26DF161
AT26DF161A
AT26DF321
AT26F004

I double-checked the data sheets and am confident this will work.

Attached for gmail users.

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

Index: flashrom-atmel_read/flashchips.c
===================================================================
--- flashrom-atmel_read/flashchips.c	(Revision 3754)
+++ flashrom-atmel_read/flashchips.c	(Arbeitskopie)
@@ -38,23 +38,23 @@
 	{"AMD",		"Am29F040B",		AMD_ID,		AM_29F040B,		512,	64 * 1024,	TEST_OK_PREW,	probe_29f040b,		erase_29f040b,			write_29f040b},
 	{"AMD",		"Am29LV040B",		AMD_ID,		AM_29LV040B,		512,	64 * 1024,	TEST_UNTESTED,	probe_29f040b,		erase_29f040b,			write_29f040b},
 	{"ASD",		"AE49F2008",		ASD_ID,		ASD_AE49F2008,		256,	128,		TEST_UNTESTED,	probe_jedec,		erase_chip_jedec,		write_jedec},
-	{"Atmel",	"AT25DF021",		ATMEL_ID,	AT_25DF021,		256,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT25DF041A",		ATMEL_ID,	AT_25DF041A,		512,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT25DF081",		ATMEL_ID,	AT_25DF081,		1024,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT25DF161",		ATMEL_ID,	AT_25DF161,		2048,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
+	{"Atmel",	"AT25DF021",		ATMEL_ID,	AT_25DF021,		256,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT25DF041A",		ATMEL_ID,	AT_25DF041A,		512,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT25DF081",		ATMEL_ID,	AT_25DF081,		1024,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT25DF161",		ATMEL_ID,	AT_25DF161,		2048,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
 	{"Atmel",	"AT25DF321",		ATMEL_ID,	AT_25DF321,		4096,	256,		TEST_OK_PREW,	probe_spi_rdid,		spi_chip_erase_c7,	spi_chip_write,	spi_chip_read},
-	{"Atmel",	"AT25DF321A",		ATMEL_ID,	AT_25DF321A,		4096,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT25DF641",		ATMEL_ID,	AT_25DF641,		8192,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT25F512B",		ATMEL_ID,	AT_25F512B,		64,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT25FS010",		ATMEL_ID,	AT_25FS010,		128,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT25FS040",		ATMEL_ID,	AT_25FS040,		512,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT26DF041",		ATMEL_ID,	AT_26DF041,		512,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL /* Incompatible Page write */,	NULL},
-	{"Atmel",	"AT26DF081A",		ATMEL_ID,	AT_26DF081A,		1024,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT26DF161",		ATMEL_ID,	AT_26DF161,		2048,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
-	{"Atmel",	"AT26DF161A",		ATMEL_ID,	AT_26DF161A,		2048,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},
+	{"Atmel",	"AT25DF321A",		ATMEL_ID,	AT_25DF321A,		4096,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT25DF641",		ATMEL_ID,	AT_25DF641,		8192,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT25F512B",		ATMEL_ID,	AT_25F512B,		64,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT25FS010",		ATMEL_ID,	AT_25FS010,		128,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT25FS040",		ATMEL_ID,	AT_25FS040,		512,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT26DF041",		ATMEL_ID,	AT_26DF041,		512,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL /* Incompatible Page write */,spi_chip_read},
+	{"Atmel",	"AT26DF081A",		ATMEL_ID,	AT_26DF081A,		1024,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT26DF161",		ATMEL_ID,	AT_26DF161,		2048,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
+	{"Atmel",	"AT26DF161A",		ATMEL_ID,	AT_26DF161A,		2048,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},
 	/*The AT26DF321 has the same ID as the AT25DF321. */
-	/*{"Atmel",	"AT26DF321",		ATMEL_ID,	AT_26DF321,		4096,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL,	NULL},*/
-	{"Atmel",	"AT26F004",		ATMEL_ID,	AT_26F004,		512,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL /* Incompatible Page write */,	NULL},
+	/*{"Atmel",	"AT26DF321",		ATMEL_ID,	AT_26DF321,		4096,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,			NULL,		spi_chip_read},*/
+	{"Atmel",	"AT26F004",		ATMEL_ID,	AT_26F004,		512,	256,		TEST_UNTESTED,	probe_spi_rdid,		NULL,	NULL /* Incompatible Page write */,spi_chip_read},
 	{"Atmel",	"AT29C020",		ATMEL_ID,	AT_29C020,		256,	256,		TEST_OK_PREW,	probe_jedec,		erase_chip_jedec,		write_jedec},
 	{"Atmel",	"AT29C040A",		ATMEL_ID,	AT_29C040A,		512,	256,		TEST_UNTESTED,	probe_jedec,		erase_chip_jedec,		write_jedec},
 	{"Atmel",	"AT45CS1282",		ATMEL_ID,	AT_45CS1282,		16896/*!*/,1056/*!*/,	TEST_BAD_READ,	probe_spi_rdid,		NULL,	NULL /* Incompatible Page write */,	NULL /* Incompatible read */}, /* No power of two sizes */


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

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


More information about the coreboot mailing list