<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I designed my own board based on AT91RM9200DK but
used different flash - AT49BV322D atmel flash.</FONT></DIV>
<DIV><FONT face=Arial size=2>I've downloaded uboot-1.1.5 with atmel patch
already apllied and have there something in flash.c concernig this flash
memory.</FONT></DIV>
<DIV><FONT face=Arial size=2>I chose target board and compilled uboot properly,
it works fine but still doesn't detect my flash and I'm unable to do anything
with it.</FONT></DIV>
<DIV><FONT face=Arial size=2>Maybe there is something missing in the flash.c
source code. If someone is experienced in this will apreciate any
help.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>best regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Cyrul</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>here's flash.c:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>#include <common.h></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>ulong myflush(void);</FONT></DIV>
<DIV><FONT face=Arial size=2><BR>typedef struct OrgDef<BR>{<BR> unsigned
int sector_number;<BR> unsigned int sector_size;<BR>} OrgDef;</DIV>
<DIV><BR>OrgDef OrgAT49BV16x4[] =<BR>{<BR> { 8, 8*1024
}, /* 8 * 8 kBytes sectors */<BR> { 2, 32*1024
}, /* 2 * 32 kBytes sectors */<BR> { 30, 64*1024
}, /* 30 * 64 kBytes sectors */<BR>};</DIV>
<DIV> </DIV>
<DIV>OrgDef OrgAT49BV16x4A[] =<BR>{<BR> { 8, 8*1024
}, /* 8 * 8 kBytes sectors */<BR> { 31, 64*1024
}, /* 31 * 64 kBytes sectors */<BR>};</DIV>
<DIV> </DIV>
<DIV>OrgDef OrgAT49BV322D[] =<BR>{<BR> { 8, 8*1024
}, /* 8 * 8 kBytes sectors */<BR> { 63,
64*1024 }, /* 127 * 64 kBytes sectors */<BR>};</DIV>
<DIV> </DIV>
<DIV>OrgDef OrgAT49BV6416[] =<BR>{<BR> { 8, 8*1024
}, /* 8 * 8 kBytes sectors */<BR> { 127, 64*1024
}, /* 127 * 64 kBytes sectors */<BR>};</DIV>
<DIV> </DIV>
<DIV>flash_info_t flash_info[CFG_MAX_FLASH_BANKS];</DIV>
<DIV><BR>/* AT49BV1614A Codes */<BR>#define
FLASH_CODE1 0xAA<BR>#define FLASH_CODE2 0x55<BR>#define
ID_IN_CODE 0x90<BR>#define ID_OUT_CODE 0xF0</DIV>
<DIV> </DIV>
<DIV><BR>#define CMD_READ_ARRAY 0x00F0<BR>#define
CMD_UNLOCK1 0x00AA<BR>#define
CMD_UNLOCK2 0x0055<BR>#define
CMD_ERASE_SETUP 0x0080<BR>#define
CMD_ERASE_CONFIRM 0x0030<BR>#define
CMD_PROGRAM 0x00A0<BR>#define
CMD_UNLOCK_BYPASS 0x0020<BR>#define CMD_SECTOR_UNLOCK 0x0070</DIV>
<DIV> </DIV>
<DIV>#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE +
(0x00005555<<1)))<BR>#define MEM_FLASH_ADDR2 (*(volatile u16
*)(CFG_FLASH_BASE + (0x00002AAA<<1)))</DIV>
<DIV> </DIV>
<DIV>#define BIT_ERASE_DONE 0x0080<BR>#define
BIT_RDY_MASK 0x0080<BR>#define
BIT_PROGRAM_ERROR 0x0020<BR>#define BIT_TIMEOUT 0x80000000 /*
our flag */</DIV>
<DIV> </DIV>
<DIV>#define READY 1<BR>#define ERR 2<BR>#define TMO
4</DIV>
<DIV><BR>void flash_identification (flash_info_t * info)<BR>{<BR> volatile
u16 manuf_code, device_code, add_device_code;</DIV>
<DIV> </DIV>
<DIV> MEM_FLASH_ADDR1 = FLASH_CODE1;<BR> MEM_FLASH_ADDR2 =
FLASH_CODE2;<BR> MEM_FLASH_ADDR1 = ID_IN_CODE;</DIV>
<DIV> </DIV>
<DIV> manuf_code = *(volatile u16 *) CFG_FLASH_BASE;<BR> device_code =
*(volatile u16 *) (CFG_FLASH_BASE + 2);<BR> add_device_code = *(volatile
u16 *) (CFG_FLASH_BASE + (3 << 1));</DIV>
<DIV> </DIV>
<DIV> MEM_FLASH_ADDR1 = FLASH_CODE1;<BR> MEM_FLASH_ADDR2 =
FLASH_CODE2;<BR> MEM_FLASH_ADDR1 = ID_OUT_CODE;</DIV>
<DIV> </DIV>
<DIV>#ifdef CFG_IGNORE_PARFLASH<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("Parallel flash
ignored\n");<BR>#else<BR> if(manuf_code == (ATM_MANUFACT &
FLASH_VENDMASK)) {<BR> /* Vendor type
*/<BR> info->flash_id = ATM_MANUFACT &
FLASH_VENDMASK;<BR> printf ("Atmel: ");<BR> } else
{<BR> /* Make illegal device doe*/<BR> printf ("Unknown
Vendor: ");<BR> device_code = 0;<BR> }</DIV>
<DIV> </DIV>
<DIV> /* 16 Mbit Devices (Not recommended for new design)
*/ <BR> if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV1614 &
FLASH_TYPEMASK)) {</DIV>
<DIV> </DIV>
<DIV> if ((add_device_code & FLASH_TYPEMASK)
==<BR> (ATM_ID_BV1614A & FLASH_TYPEMASK))
{<BR> info->flash_id |= ATM_ID_BV1614A &
FLASH_TYPEMASK;<BR> printf ("AT49BV1614A
(16Mbit)\n");<BR> } else { /* AT49BV1614 Flash
*/<BR> info->flash_id |= ATM_ID_BV1614 &
FLASH_TYPEMASK;<BR> printf ("AT49BV1614
(16Mbit)\n");<BR> }</DIV>
<DIV> </DIV>
<DIV> /* 16 Mbit Devices (Recommended for new design) */ <BR> }
else if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV160D &
FLASH_TYPEMASK)) {<BR> info->flash_id |= ATM_ID_BV160D &
FLASH_TYPEMASK;<BR> printf ("AT49BV160D (16Mbit)\n");<BR> } else
if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV160DT & FLASH_TYPEMASK))
{<BR> info->flash_id =
FLASH_UNKNOWN;<BR> // info->flash_id |= ATM_ID_BV160DT &
FLASH_TYPEMASK;<BR> printf ("AT49BV160DT (16Mbit) - Not Yet Supported
\n");<BR> } else if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV163D
& FLASH_TYPEMASK)) {<BR> info->flash_id |= ATM_ID_BV163D &
FLASH_TYPEMASK;<BR> printf ("AT49BV163D (16Mbit)\n");<BR> } else
if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV163DT & FLASH_TYPEMASK))
{<BR> info->flash_id |= ATM_ID_BV163DT &
FLASH_TYPEMASK;<BR> printf ("AT49BV163DT (16Mbit) - Not Yet
Supported\n");</DIV>
<DIV> </DIV>
<DIV> /* 32 Mbit Devices (Not recommended for new design)
*/ <BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV322A & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV322A & FLASH_TYPEMASK;<BR> printf ("AT49BV322A
(64Mbit)\n");</DIV>
<DIV> </DIV>
<DIV> /* 32 Mbit Devices (Recommended for new design) */<BR> } else if
((device_code & FLASH_TYPEMASK) == (ATM_ID_BV320D & FLASH_TYPEMASK))
{<BR> info->flash_id |= ATM_ID_BV320D &
FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV320D (64Mbit) - Not Yet
Supported\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV320DT & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV320DT & FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV320DT (64Mbit) - Not Yet
Supported\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV322D & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV322D & FLASH_TYPEMASK;<BR> printf ("AT49BV322D
(64Mbit)\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV322DT & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV322DT & FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV322DT (64Mbit) - Not Yet
Supported\n");</DIV>
<DIV> </DIV>
<DIV> /* 64 Mbit Devices (Not recommended for new design)
*/ <BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV6416 & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV6416 & FLASH_TYPEMASK;<BR> printf ("AT49BV6416
(64Mbit)\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV6416T & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV6416T & FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV6416 (64Mbit) - Top Boot Not Yet
Supported\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV6416C & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV6416C & FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV6416C (64Mbit) - Not Yet
Supported\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV6416CT & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV6416CT & FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV6416CT (64Mbit) - Top Boot Not Yet
Supported\n");</DIV>
<DIV> </DIV>
<DIV> /* 64 Mbit Devices (Recommended for new design) */ <BR> }
else if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV640D &
FLASH_TYPEMASK)) {<BR> info->flash_id |= ATM_ID_BV640D &
FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV640D (64Mbit) - Not Yet
Supported\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV640DT & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV640DT & FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV640DT (64Mbit) - Top Boot Not Yet
Supported\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV642D & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV642D & FLASH_TYPEMASK;<BR> printf ("AT49BV642D
(64Mbit)\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV642DT & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV642DT & FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV642DT (64Mbit) - Top Boot Not Yet
Supported\n");<BR> } else if ((device_code & FLASH_TYPEMASK) ==
(ATM_ID_BV6404 & FLASH_TYPEMASK)) {<BR> info->flash_id |=
ATM_ID_BV6404 & FLASH_TYPEMASK;<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("AT49BV6404 (64Mbit - Not Yet
Supported)\n");<BR> } else {<BR> info->flash_id =
FLASH_UNKNOWN;<BR> printf ("UNKNOWN device or not
present\n");<BR> }<BR>#endif<BR>}</DIV>
<DIV> </DIV>
<DIV>ushort flash_number_sector(OrgDef *pOrgDef, unsigned int
nb_blocks)<BR>{<BR> int i, nb_sectors = 0;</DIV>
<DIV> </DIV>
<DIV> for (i=0; i<nb_blocks; i++){<BR> nb_sectors +=
pOrgDef[i].sector_number;<BR> }</DIV>
<DIV> </DIV>
<DIV> return nb_sectors;<BR>}</DIV>
<DIV> </DIV>
<DIV>void flash_unlock_sector(flash_info_t * info, unsigned int
sector)<BR>{<BR> volatile u16 *addr = (volatile u16 *)
(info->start[sector]);</DIV>
<DIV> </DIV>
<DIV> MEM_FLASH_ADDR1 = CMD_UNLOCK1;<BR> *addr =
CMD_SECTOR_UNLOCK;<BR>}</DIV>
<DIV><BR>ulong flash_init (void)<BR>{<BR> int i, j, k;<BR> unsigned
int flash_nb_blocks, sector;<BR> unsigned int
start_address;<BR> unsigned int unlock;<BR> OrgDef *pOrgDef;</DIV>
<DIV> </DIV>
<DIV> ulong size = 0;</DIV>
<DIV><BR> for (i = 0; i < CFG_MAX_FLASH_BANKS; i++)
{<BR> ulong flashbase = 0;<BR> unlock = 0;</DIV>
<DIV> </DIV>
<DIV> flash_identification (&flash_info[i]);</DIV>
<DIV> </DIV>
<DIV> if ((flash_info[i].flash_id & FLASH_TYPEMASK)
==<BR> (ATM_ID_BV1614 & FLASH_TYPEMASK)) { /*
AT49BV1614 Flash */</DIV>
<DIV> </DIV>
<DIV> pOrgDef =
OrgAT49BV16x4;<BR> flash_nb_blocks = sizeof (OrgAT49BV16x4) /
sizeof (OrgDef);<BR> } else if ((flash_info[i].flash_id &
FLASH_TYPEMASK) ==<BR> (ATM_ID_BV1614A &
FLASH_TYPEMASK)){ /* AT49BV1614A Flash */</DIV>
<DIV> </DIV>
<DIV> pOrgDef =
OrgAT49BV16x4A;<BR> flash_nb_blocks = sizeof (OrgAT49BV16x4A) /
sizeof (OrgDef);<BR> } else if ((flash_info[i].flash_id &
FLASH_TYPEMASK) ==<BR> (ATM_ID_BV163D &
FLASH_TYPEMASK)){ /* AT49BV163D Flash */</DIV>
<DIV> </DIV>
<DIV> pOrgDef =
OrgAT49BV16x4A;<BR> flash_nb_blocks = sizeof (OrgAT49BV16x4A) /
sizeof (OrgDef);<BR> } else if ((flash_info[i].flash_id &
FLASH_TYPEMASK) ==<BR> (ATM_ID_BV322A &
FLASH_TYPEMASK)){ /* AT49BV322D Flash */</DIV>
<DIV> </DIV>
<DIV> pOrgDef =
OrgAT49BV322D;<BR> flash_nb_blocks = sizeof (OrgAT49BV16x4A) /
sizeof (OrgDef);<BR> } else if ((flash_info[i].flash_id &
FLASH_TYPEMASK) ==<BR> (ATM_ID_BV322D &
FLASH_TYPEMASK)){ /* AT49BV322D Flash */<BR> unlock =
1;<BR> pOrgDef =
OrgAT49BV322D;<BR> flash_nb_blocks = sizeof (OrgAT49BV16x4A) /
sizeof (OrgDef);<BR> } else if ((flash_info[i].flash_id &
FLASH_TYPEMASK) ==<BR> (ATM_ID_BV6416 &
FLASH_TYPEMASK)){ /* AT49BV6416 Flash */<BR> unlock =
1;<BR> pOrgDef =
OrgAT49BV6416;<BR> flash_nb_blocks = sizeof (OrgAT49BV6416) /
sizeof (OrgDef);<BR> } else if ((flash_info[i].flash_id &
FLASH_TYPEMASK) ==<BR> (ATM_ID_BV642D &
FLASH_TYPEMASK)){ /* AT49BV642D Flash */<BR> unlock =
1;<BR> pOrgDef =
OrgAT49BV6416;<BR> flash_nb_blocks = sizeof (OrgAT49BV6416) /
sizeof (OrgDef);<BR> } else {<BR> flash_nb_blocks =
0;<BR> pOrgDef = OrgAT49BV16x4;<BR> }</DIV>
<DIV> </DIV>
<DIV> flash_info[i].sector_count = flash_number_sector(pOrgDef,
flash_nb_blocks);<BR> memset (flash_info[i].protect, 0,
flash_info[i].sector_count);</DIV>
<DIV> </DIV>
<DIV> if (i == 0)<BR> flashbase =
PHYS_FLASH_1;<BR> else<BR> panic ("configured too
many flash banks!\n");</DIV>
<DIV> </DIV>
<DIV> sector = 0;<BR> start_address =
flashbase;<BR> flash_info[i].size = 0;</DIV>
<DIV> </DIV>
<DIV> for (j = 0; j < flash_nb_blocks; j++)
{<BR> for (k = 0; k < pOrgDef[j].sector_number; k++)
{<BR> flash_info[i].start[sector++] =
start_address;<BR> start_address +=
pOrgDef[j].sector_size;<BR> flash_info[i].size +=
pOrgDef[j].sector_size;<BR> }<BR> }</DIV>
<DIV> </DIV>
<DIV> size += flash_info[i].size;</DIV>
<DIV> </DIV>
<DIV> if (unlock){<BR> /* Unlock all sectors at
reset */<BR> for (j=0; j<flash_info[i].sector_count;
j++){<BR> flash_unlock_sector(&flash_info[i],
j);<BR> }<BR> }<BR> }</DIV>
<DIV> </DIV>
<DIV> /* Protect binary boot image */<BR> flash_protect
(FLAG_PROTECT_SET,<BR>
CFG_FLASH_BASE,<BR>
CFG_FLASH_BASE + CFG_BOOT_SIZE - 1, &flash_info[0]);</DIV>
<DIV> </DIV>
<DIV> /* Protect environment variables */<BR> flash_protect
(FLAG_PROTECT_SET,<BR>
CFG_ENV_ADDR,<BR> CFG_ENV_ADDR +
CFG_ENV_SIZE - 1, &flash_info[0]);</DIV>
<DIV> </DIV>
<DIV> /* Protect U-Boot gzipped image */<BR> flash_protect
(FLAG_PROTECT_SET,<BR>
CFG_U_BOOT_BASE,<BR>
CFG_U_BOOT_BASE + CFG_U_BOOT_SIZE - 1, &flash_info[0]);</DIV>
<DIV> </DIV>
<DIV> return size;<BR>}</DIV>
<DIV><BR>void flash_print_info (flash_info_t * info)<BR>{<BR> int i;</DIV>
<DIV> </DIV>
<DIV> switch (info->flash_id & FLASH_VENDMASK) {<BR> case
(ATM_MANUFACT & FLASH_VENDMASK):<BR> printf ("Atmel:
");<BR> break;<BR> default:<BR> printf ("Unknown
Vendor ");<BR> break;<BR> }</DIV>
<DIV> </DIV>
<DIV> switch (info->flash_id & FLASH_TYPEMASK) {<BR> case
(ATM_ID_BV1614 & FLASH_TYPEMASK):<BR> printf ("AT49BV1614
(16Mbit)\n");<BR> break;<BR> case (ATM_ID_BV1614A &
FLASH_TYPEMASK):<BR> printf ("AT49BV1614A
(16Mbit)\n");<BR> break;<BR> case (ATM_ID_BV160D &
FLASH_TYPEMASK):<BR> printf ("AT49BV160D
(16Mbit)\n");<BR> break;<BR> case (ATM_ID_BV160DT &
FLASH_TYPEMASK):<BR> printf ("AT49BV160DT
(16Mbit)\n");<BR> break;<BR> case (ATM_ID_BV163D &
FLASH_TYPEMASK):<BR> printf ("AT49BV163D
(16Mbit)\n");<BR> break;<BR> case (ATM_ID_BV163DT &
FLASH_TYPEMASK):<BR> printf ("AT49BV163DT
(16Mbit)\n");<BR> break;<BR>#if 0 /* Duplicate with
ATM_ID_BV1614A */<BR> case (ATM_ID_BV322A &
FLASH_TYPEMASK):<BR> printf ("AT49BV322A
(32Mbit)\n");<BR> break;<BR>#endif<BR> case (ATM_ID_BV322AT
& FLASH_TYPEMASK):<BR> printf ("AT49BV322AT
(32Mbit)\n");<BR> break;<BR> case (ATM_ID_BV320D &
FLASH_TYPEMASK):<BR> printf ("AT49BV320D
(32Mbit)\n");<BR> break;<BR> case (ATM_ID_BV320DT &
FLASH_TYPEMASK):<BR> printf ("AT49BV320DT
(32Mbit)\n");<BR> break;<BR> case (ATM_ID_BV322D &
FLASH_TYPEMASK):<BR> printf ("AT49BV322D
(32Mbit)\n");<BR> break;<BR> case (ATM_ID_BV322DT &
FLASH_TYPEMASK):<BR> printf ("AT49BV322DT
(32Mbit)\n");<BR> break;<BR> case (ATM_ID_BV6416 &
FLASH_TYPEMASK):<BR> printf ("AT49BV6416
(64Mbit)\n");<BR> break;<BR> case (ATM_ID_BV6416T &
FLASH_TYPEMASK):<BR> printf ("AT49BV6416T
(64Mbit)\n");<BR> break;<BR> case (ATM_ID_BV6416C &
FLASH_TYPEMASK):<BR> printf ("AT49BV6416C
(64Mbit)\n");<BR> break;<BR> case (ATM_ID_BV6416CT &
FLASH_TYPEMASK):<BR> printf ("AT49BV6416CT
(64Mbit)\n");<BR> break;<BR> case (ATM_ID_BV640D &
FLASH_TYPEMASK):<BR> printf ("AT49BV640D
(64Mbit)\n");<BR> break;<BR> case (ATM_ID_BV640DT &
FLASH_TYPEMASK):<BR> printf ("AT49BV640DT
(64Mbit)\n");<BR> break;<BR> case (ATM_ID_BV642D &
FLASH_TYPEMASK):<BR> printf ("AT49BV642C
(64Mbit)\n");<BR> break;<BR> case (ATM_ID_BV642DT &
FLASH_TYPEMASK):<BR> printf ("AT49BV642DT
(64Mbit)\n");<BR> break;<BR> default:<BR> printf
("Unknown Chip Type\n");<BR> return;<BR> }</DIV>
<DIV> </DIV>
<DIV> printf (" Size: %ld MB in %d
Sectors\n",<BR> info->size >> 20,
info->sector_count);</DIV>
<DIV> </DIV>
<DIV> printf (" Sector Start Addresses:");<BR> for (i = 0; i
< info->sector_count; i++) {<BR> if ((i % 5) == 0)
{<BR> printf ("\n
");<BR> }<BR> <BR> if(info->protect[i] !=
FLAG_PROTECT_INVALID) {<BR> printf (" %08lX%s",
info->start[i],<BR> info->protect[i] ? " (RO)" :
" ");<BR> }<BR> }<BR> printf
("\n");<BR>} </FONT></DIV><FONT face=Arial size=2>
<DIV> </DIV>
<DIV>erase, write_buff, write_word functions are the same - like in other
uboot versions without atmel patch applied</FONT></DIV></DIV><br/>
----------------------<br/>
Panorama Internetu - prognoza pogody, poczta e-mail z największym załącznikiem, SMS, wyszukiwarki: Gooru, Anonser, serwisy: randki, ogłoszenia, wakacje, program TV, Kina, muzyka, DVD, newsy, inne.<br/>
<a href="http://www.panoramainternetu.pl/">www.panoramainternetu.pl (www.epf.pl)</a><br/>
</BODY></HTML>