<div>Thanks Stefan and Tolunay for the response. The U-Boot version we are using is 1.0.0, which does not have the file cfi_flash.c that you mentioned. We don't want to upgrade the version. To explain the problem in more detail:
</div>
<div> </div>
<div> </div>
<div>We have the following code segment in <em><strong>flash_get_size</strong></em> method of <strong><em>flash.c</em></strong> file.</div>
<div> </div>
<div> </div>
<div><font style="BACKGROUND-COLOR: #33ffff"><strong><em>case (FLASH_WORD_SIZE)AMD_ID_MIRROR:<br> value2 = addr2[0x0e];<br> value3 = addr2[0x0f];<br>#ifdef DEBUG<br> printf ("flash value2 = 0x%x\n",value2);
<br> printf ("flash value3 = 0x%x\n",value3);<br>#endif<br> if (value2 == (FLASH_WORD_SIZE)AMD_ID_LV128U_2 <br> && value3 == (FLASH_WORD_SIZE)AMD_ID_LV128U_3) <br> {<br> info->flash_id += FLASH_AMLV128U;
<br> info->sector_count = 256;<br> info->size = 0x01000000;<br> }<br> else {<br> info->flash_id = FLASH_UNKNOWN;<br> return (0); /* => no or unknown flash */<br> }<br> break;</em></strong></font>
</div>
<div> </div>
<div> </div>
<div> </div>
<div>This was the code segmented that got executed with our old AMD flash. The new ST flash has a different value for<font style="BACKGROUND-COLOR: #66ffff"> value3</font> parameter above. As a result I need to add another if condition something like below:
</div>
<div> </div>
<div><font style="BACKGROUND-COLOR: #33ffff"><em><strong> if (value2 == (FLASH_WORD_SIZE)AMD_ID_LV128U_2 <br> && value3 == (FLASH_WORD_SIZE)ST_ID_..........._3) <br> {<br> info->flash_id += XXXXXXXXX;<br>
info->sector_count = 256;<br> info->size = 0x01000000;<br> }</strong></em></font></div>
<div><font style="BACKGROUND-COLOR: #33ffff"></font> </div>
<div><font style="BACKGROUND-COLOR: #33ffff"></font> </div>
<div><font style="BACKGROUND-COLOR: #ffffff">I was wondering what the value of <font style="BACKGROUND-COLOR: #33ffff"><em><strong>XXXXXXXXX</strong></em></font><font style="BACKGROUND-COLOR: #ffffff"><em><strong> </strong>
</em>should be?</font></font></div>
<div> </div>
<div>Thanks,</div>
<div>Ganesh</div>
<div><font style="BACKGROUND-COLOR: #33ffff"></font> </div>
<div><font style="BACKGROUND-COLOR: #33ffff"></font> </div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 6/12/07, <b class="gmail_sendername">Tolunay Orkun</b> <<a href="mailto:listmember@orkun.us">listmember@orkun.us</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Ganesh Ragavan wrote:<br>><br>> We recently moved to STM flash memory for one of our boards. The<br>
> flash we are using is M29W128FH. I don't see any support for this<br>> flash in the ~/include/flash.h file in the U-boot source tree. Could<br>> someone please let me know how I could add support for this flash in
<br>> U-boot ?<br>><br>Please try cfi_flash.c driver. Your flash is a CFI flash (AFAIK) and<br>does not need a #define macro when using cfi_flash.c driver.<br><br>Tolunay<br><br></blockquote></div><br>