[U-Boot-Users] support for AT49BV642DT flash
vibi
vibi_sreenivasan at cms.com
Sun Jan 27 19:02:25 CET 2008
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) */
More information about the U-Boot
mailing list