All of lore.kernel.org
 help / color / mirror / Atom feed
From: vibi <vibi_sreenivasan@cms.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] support for AT49BV642DT flash
Date: Sun, 27 Jan 2008 18:02:25 +0000	[thread overview]
Message-ID: <1201456945.3053.8.camel@root> (raw)

dear  all,
	this diff has been taken after applying atmel's patch
"u-boot-1.1.5_atmel_1.4.diff"

thanks & regards
vibi sreenivasan

diff -Nurp u-boot-1.1.5/board/at91rm9200dk/flash.c
u-boot-1.1.5-changed/board/at91rm9200dk/flash.c
--- u-boot-1.1.5/board/at91rm9200dk/flash.c	2006-10-20
15:54:33.000000000 +0000
+++ u-boot-1.1.5-changed/board/at91rm9200dk/flash.c	2008-01-27
17:39:30.000000000 +0000
@@ -59,6 +59,12 @@ OrgDef OrgAT49BV6416[] =
 	{ 127, 64*1024 },	/* 127 * 64 kBytes sectors */
 };
 
+OrgDef OrgAT49BV642DT[] =
+{
+	{ 127, 64*1024 },	/* 127 * 64 kBytes sectors */	
+	{   8,  8*1024 },	/*   8 *  8 kBytes sectors */	
+};
+
 flash_info_t    flash_info[CFG_MAX_FLASH_BANKS];
 
 /* AT49BV1614A Codes */
@@ -125,7 +131,11 @@ void flash_identification (flash_info_t 
 	} else if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV6416 &
FLASH_TYPEMASK)) {
 		info->flash_id |= ATM_ID_BV6416 & FLASH_TYPEMASK;
 		printf ("AT49BV6416 (64Mbit)\n");
-	}
+
+	} else if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV642DT &
FLASH_TYPEMASK)) {	
+		info->flash_id |= ATM_ID_BV6416 & FLASH_TYPEMASK;
+		printf ("AT49BV642DT (64Mbit)\n");
+	}	
 }
 
 ushort flash_number_sector(OrgDef *pOrgDef, unsigned int nb_blocks)
@@ -177,6 +187,11 @@ ulong flash_init (void)
 
 			pOrgDef = OrgAT49BV6416;
 			flash_nb_blocks = sizeof (OrgAT49BV6416) / sizeof (OrgDef);
+		} else if ((flash_info[i].flash_id & FLASH_TYPEMASK) ==		
+			(ATM_ID_BV642DT & FLASH_TYPEMASK)){	/* AT49BV642DT Flash */	
+			
+			pOrgDef = OrgAT49BV642DT;
+			flash_nb_blocks = sizeof (OrgAT49BV642DT) / sizeof (OrgDef);
 		} else {
 			flash_nb_blocks = 0;
 			pOrgDef = OrgAT49BV16x4;
@@ -254,6 +269,9 @@ void flash_print_info (flash_info_t * in
 	case (ATM_ID_BV1614A & FLASH_TYPEMASK):
 		printf ("AT49BV1614A (16Mbit)\n");
 		break;
+	case (ATM_ID_BV642DT & FLASH_TYPEMASK):		
+		printf ("AT49BV642DT (64Mbit)\n");
+		break;				
 	case (ATM_ID_BV6416 & FLASH_TYPEMASK):
 		printf ("AT49BV6416 (64Mbit)\n");
 		break;
diff -Nurp u-boot-1.1.5/examples/Makefile
u-boot-1.1.5-changed/examples/Makefile
--- u-boot-1.1.5/examples/Makefile	2006-10-20 15:54:33.000000000 +0000
+++ u-boot-1.1.5-changed/examples/Makefile	2008-01-27 17:38:17.000000000
+0000
@@ -144,10 +144,10 @@ $(obj)%:	$(obj)%.o $(LIB)
 		$(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \
 			-o $@ -e $(notdir $(<:.o=)) $< $(LIB) \
 			-L$(gcclibdir) -lgcc
-$(obj)%.srec:	$(obj)%
+$(obj)%.srec:	$(obj)%.o
 		$(OBJCOPY) -O srec $< $@ 2>/dev/null
 
-$(obj)%.bin:	$(obj)%
+$(obj)%.bin:	$(obj)%.o
 		$(OBJCOPY) -O binary $< $@ 2>/dev/null
 

#########################################################################
diff -Nurp u-boot-1.1.5/include/flash.h
u-boot-1.1.5-changed/include/flash.h
--- u-boot-1.1.5/include/flash.h	2008-01-27 17:53:06.000000000 +0000
+++ u-boot-1.1.5-changed/include/flash.h	2008-01-27 17:36:11.000000000
+0000
@@ -223,6 +223,7 @@ extern void flash_read_factory_serial(fl
 #define ATM_ID_BV1614A	0x000000C8	/* 49BV1614A ID */
 #define ATM_ID_BV6416	0x000000D6	/* 49BV6416  ID */
 #define ATM_ID_BV322A   0x000000C8      /* 49BV322A  ID */
+#define ATM_ID_BV642DT	0x000001D2	/* 49BV642D(T) */
 
 #define FUJI_ID_29F800BA  0x22582258	/* MBM29F800BA ID  (8M) */
 #define FUJI_ID_29F800TA  0x22D622D6	/* MBM29F800TA ID  (8M) */

             reply	other threads:[~2008-01-27 18:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27 18:02 vibi [this message]
2008-01-27 13:19 ` [U-Boot-Users] support for AT49BV642DT flash Haavard Skinnemoen
2008-01-27 16:39 ` Wolfgang Denk
2008-01-28 13:37   ` vibi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1201456945.3053.8.camel@root \
    --to=vibi_sreenivasan@cms.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.