Skip to contentSkip to conversation

DataFlash AT45DB021 support

PATCH New Sergey Lapin 3 participants 6 messages Jun 5, 2008 – Jul 10, 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 |   14 ++++++++++++++-
 include/dataflash.h     |    1 +
 2 files changed, 16 insertions(+), 2 deletions(-)
drivers/mtd/dataflash.c +14 -0
index 8247aa0..92accc0 100644
@@ -52,8 +52,19 @@ 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

Quoted 6 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.

Scott will you handle this patch or I will do?

Best Regards,
J.

#2 lore raw

PATCH 1/1 DataFlash AT45DB021 support

Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 6 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.

Scott will you handle this patch or I will do?

Best Regards,
J.

It's not NAND; go ahead and take it.

-Scott

#3 lore raw

PATCH 1/1 DataFlash AT45DB021 support

Hi, all!

Quoted 7 lines
Quoted 7 lines · Sergey Lapin
Quoted 6 lines

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.

Quoted 8 lines
Quoted 4 lines

Scott will you handle this patch or I will do?

Best Regards,
J.

It's not NAND; go ahead and take it.

-Scott

Any updates about this?

Thanks a lot,
S.

#4 lore raw

PATCH 1/1 DataFlash AT45DB021 support

Quoted 14 lines · Sergey Lapin

Hi, all!

Quoted 12 lines
Quoted 11 lines · Sergey Lapin
Quoted 6 lines

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.

Scott will you handle this patch or I will do?

Best Regards,
J.

Quoted 9 lines
Quoted 3 lines

It's not NAND; go ahead and take it.

-Scott

Any updates about this?

Thanks a lot,
S.

I'll take care of this patch during the next week, sorry for the delay.

Best Regards,
J.

#5 lore raw

PATCH 1/1 DataFlash AT45DB021 support

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 |   14 ++++++++++++++-
 include/dataflash.h     |    1 +
 2 files changed, 16 insertions(+), 2 deletions(-)

Applied in u-boot-at91

Best Regards,
J.