Patchwork AT49F020 support

login
register
about
Submitter Andrew Morgan
Date 2010-06-06 23:57:07
Message ID <4C0C35D3.8070209@ziltro.com>
Download mbox | patch
Permalink /patch/1474/
State Accepted
Commit r1036
Headers show

Comments

Andrew Morgan - 2010-06-06 23:57:07
Hi,

Patch and test results for AT49F020 256KB parallel flash chip as found 
in a 56K modem. Read after erase was all 0xFF. Write and verify a random 
file worked. The datasheet says it is whole-chip-erase only. I haven't 
verified everything against the datasheet, but as my tests found that it 
works here's the patch.

Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Carl-Daniel Hailfinger - 2010-06-07 14:11:41
Hi,

On 07.06.2010 01:57, Andrew Morgan wrote:
> Patch and test results for AT49F020 256KB parallel flash chip as found
> in a 56K modem. Read after erase was all 0xFF. Write and verify a
> random file worked. The datasheet says it is whole-chip-erase only. I
> haven't verified everything against the datasheet, but as my tests
> found that it works here's the patch.

Thanks for your patch.

> Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

and committed in r1036.

Regards,
Carl-Daniel

Patch

Index: flashchips.c
===================================================================
--- flashchips.c	(revision 1033)
+++ flashchips.c	(working copy)
@@ -1072,6 +1072,29 @@ 
 
 	{
 		.vendor		= "Atmel",
+		.name		= "AT49F020",
+		.bustype	= CHIP_BUSTYPE_PARALLEL,
+		.manufacture_id	= ATMEL_ID,
+		.model_id	= AT_49F020,
+		.total_size	= 256,
+		.page_size	= 256,
+		.feature_bits	= FEATURE_EITHER_RESET,
+		.tested		= TEST_OK_PREW,
+		.probe		= probe_jedec,
+		.probe_timing	= TIMING_ZERO,	/* Datasheet has no timing info specified */
+		.block_erasers	=
+		{
+			{
+				.eraseblocks = { {256 * 1024, 1} },
+				.block_erase = erase_chip_block_jedec,
+			}
+		},
+		.write		= write_jedec_1,
+		.read		= read_memmapped,
+	},
+
+	{
+		.vendor		= "Atmel",
 		.name		= "AT49F002(N)",
 		.bustype	= CHIP_BUSTYPE_PARALLEL,
 		.manufacture_id	= ATMEL_ID,
Index: flashchips.h
===================================================================
--- flashchips.h	(revision 1033)
+++ flashchips.h	(working copy)
@@ -144,6 +144,7 @@ 
 #define AT_45DB642		/* No ID available */
 #define AT_45DB642D		0x2800
 #define AT_49BV512		0x03
+#define AT_49F020		0x0B
 #define AT_49F002N		0x07	/* for AT49F002(N)  */
 #define AT_49F002NT		0x08	/* for AT49F002(N)T */