Skip to contentSkip to conversation

DataFlash AT45DB021 support

PATCH In review Sergey Lapin 4 participants 8 messages May 20, 2008 – Jul 6, 2008 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DataFlash AT45DB021 support

Some boards based on AT91SAM926X-EK use smaller DF chips to keep bootstrap, u-boot and its environment, using NAND or other external storage for kernel and rootfs. This patch adds support for small 1024x263 chip.

---
 drivers/mtd/dataflash.c |   15 ++++++++++++++-
 include/dataflash.h     |    1 +
 2 files changed, 16 insertions(+), 2 deletions(-)
drivers/mtd/dataflash.c +14 -1
index 8247aa0..92accc0 100644
@@ -52,8 +52,18 @@ int AT91F_DataflashInit (void)
 		dataflash_info[i].Device.pages_number = 0;
 		dfcode = AT91F_DataflashProbe (cs[i].cs,
 				&dataflash_info[i].Desc);
-
 		switch (dfcode) {
+		case AT45DB021:
+			dataflash_info[i].Device.pages_number = 1024;
+			dataflash_info[i].Device.pages_size = 263;
+			dataflash_info[i].Device.page_offset = 9;
+			dataflash_info[i].Device.byte_mask = 0x300;
+			dataflash_info[i].Device.cs = cs[i].cs;
+			dataflash_info[i].Desc.DataFlash_state = IDLE;
+			dataflash_info[i].logical_address = cs[i].addr;
+			dataflash_info[i].id = dfcode;
+			found[i] += dfcode;;
+			break;
 		case AT45DB161:
 			dataflash_info[i].Device.pages_number = 4096;
 			dataflash_info[i].Device.pages_size = 528;
@@ -178,6 +188,9 @@ void dataflash_print_info (void)
 		if (dataflash_info[i].id != 0) {
 			printf("DataFlash:");
 			switch (dataflash_info[i].id) {
+			case AT45DB021:
+				printf("AT45DB021\n");
+				break;
 			case AT45DB161:
 				printf("AT45DB161\n");
 				break;
include/dataflash.h +1 -0
index f20c738..11e5188 100644
@@ -137,6 +137,7 @@ struct dataflash_addr {
 /*-------------------------------------------------------------------------------------------------*/
 
 #define AT45DB161	0x2c
+#define AT45DB021	0x14
 #define AT45DB321	0x34
 #define AT45DB642	0x3c
 #define AT45DB128	0x10
Signature · 1 line
1.5.4.1
#1 lore raw

PATCH 1/1 DataFlash AT45DB021 support

Hi, all!

Quoted 11 lines · Sergey Lapin

Some boards based on AT91SAM926X-EK use smaller DF chips to keep bootstrap, u-boot and its environment, using NAND or other external storage for kernel and rootfs. This patch adds support for small 1024x263 chip.

---
 drivers/mtd/dataflash.c |   15 ++++++++++++++-
 include/dataflash.h     |    1 +
 2 files changed, 16 insertions(+), 2 deletions(-)

What about this patch?

#2 lore raw
In reply to Sergey Lapin
Quoted 11 lines · Sergey Lapin

Some boards based on AT91SAM926X-EK use smaller DF chips to keep bootstrap, u-boot and its environment, using NAND or other external storage for kernel and rootfs. This patch adds support for small 1024x263 chip.

---
 drivers/mtd/dataflash.c |   15 ++++++++++++++-
 include/dataflash.h     |    1 +
 2 files changed, 16 insertions(+), 2 deletions(-)

Is there any interest in this patch? I use it just fine with my AT91SAM9260 custom boards.

#3 lore raw

I added code to handle the 011 chip, but I really didn't think anyone would be interested in it.
If someone wants it, I can post it.

Wolfgang, are these simple patches of any interest to the general community, when they're so trivial to add?

Regards,

Matt

Quoted 26 lines · Sergey Lapin
Quoted 11 lines · Sergey Lapin

Some boards based on AT91SAM926X-EK use smaller DF chips to keep bootstrap, u-boot and its environment, using NAND or other external storage for kernel and rootfs. This patch adds support for small 1024x263 chip.

---
 drivers/mtd/dataflash.c |   15 ++++++++++++++-
 include/dataflash.h     |    1 +
 2 files changed, 16 insertions(+), 2 deletions(-)

Is there any interest in this patch? I use it just fine with my AT91SAM9260 custom boards.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

#4 lore raw

On Mon, May 26, 2008 at 02:03:42PM -0400, Matt Gessner wrote:
Hi, all!

Quoted 7 lines

I added code to handle the 011 chip, but I really didn't think anyone would be interested in it.
If someone wants it, I can post it.

Wolfgang, are these simple patches of any interest to the general community, when they're so trivial to add?

Wolfgang, could you please answer this?

Thanks a lot,
S.

#6 lore raw
In reply to Matt Gessner
Quoted 2 lines · In message <[email protected]> you…

I added code to handle the 011 chip, but I really didn't think anyone would be interested in it.

I think all such changes should get added to the public repository.

Quoted 1 line

If someone wants it, I can post it.

Please do.

Quoted 2 lines

Wolfgang, are these simple patches of any interest to the general community, when they're so trivial to add?

Sorry, I really have no idea why these patches have not been picked up yet by the AT91 custodian...

I think they should go in, but I don't have any such hardware so I cannot test anything.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It is better to have tried and failed than to have  failed  to  try,
but the result's the same."                           - Mike Dennison
#5 lore raw
In reply to Sergey Lapin

Dear Sergei,

Quoted 5 lines · in message <[email protected]> you wrote:
Quoted 4 lines

Wolfgang, are these simple patches of any interest to the general community, when they're so trivial to add?

Wolfgang, could you please answer this?

Sorry, I really don't know. Please see my previous message - this should be handled by the AT91 custodian. Please ping him directly.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Artificial Intelligence is no match for natural stupidity.
#7 lore raw
In reply to Wolfgang Denk
Quoted 10 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you…

I added code to handle the 011 chip, but I really didn't think anyone would be interested in it.

I think all such changes should get added to the public repository.

Quoted 1 line

If someone wants it, I can post it.

Please do.

When I get to work on Monday, I will have to synch to the latest u-boot, and then I'll post a patch for the 011 chip. It's really quite trivial.

Regards,

Matt Gessner