[U-Boot-Users] [PATCH] 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.
Signed-off-by: Sergey Lapin slapin@ossfans.org --- drivers/mtd/dataflash.c | 15 ++++++++++++++- include/dataflash.h | 1 + 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c index 8247aa0..92accc0 100644 --- a/drivers/mtd/dataflash.c +++ b/drivers/mtd/dataflash.c @@ -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; diff --git a/include/dataflash.h b/include/dataflash.h index f20c738..11e5188 100644 --- a/include/dataflash.h +++ b/include/dataflash.h @@ -137,6 +137,7 @@ struct dataflash_addr { /*-------------------------------------------------------------------------------------------------*/
#define AT45DB161 0x2c +#define AT45DB021 0x14 #define AT45DB321 0x34 #define AT45DB642 0x3c #define AT45DB128 0x10

Hi, all! On Tue, May 20, 2008 at 10:51 PM, Sergey Lapin slapin@ossfans.org wrote:
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.
Signed-off-by: Sergey Lapin slapin@ossfans.org
drivers/mtd/dataflash.c | 15 ++++++++++++++- include/dataflash.h | 1 + 2 files changed, 16 insertions(+), 2 deletions(-)
What about this patch?

On Tue, May 20, 2008 at 10:51:59PM +0400, Sergey Lapin wrote:
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.
Signed-off-by: Sergey Lapin slapin@ossfans.org
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.

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
On Mon, May 26, 2008 at 10:46 AM, Sergey Lapin slapin@ossfans.org wrote:
On Tue, May 20, 2008 at 10:51:59PM +0400, Sergey Lapin wrote:
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.
Signed-off-by: Sergey Lapin slapin@ossfans.org
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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

On Mon, May 26, 2008 at 02:03:42PM -0400, Matt Gessner wrote: Hi, all!
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.

Dear Sergei,
in message 20080529060833.GA17528@fan.ossfans.org you wrote:
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

In message 85a5c2010805261103q76d25903q3bfac3bc3ad0a4b4@mail.gmail.com you wrote:
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.
If someone wants it, I can post it.
Please do.
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

On Sat, Jul 5, 2008 at 6:32 PM, Wolfgang Denk wd@denx.de wrote:
In message 85a5c2010805261103q76d25903q3bfac3bc3ad0a4b4@mail.gmail.com you wrote:
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.
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
participants (4)
-
Matt Gessner
-
Sergey Lapin
-
Sergey Lapin
-
Wolfgang Denk