/*******************************************************************************<br>* flashDataExt - Extend Data. <br>* DESCRIPTION:<br>*&nbsp;&nbsp; &nbsp;Should be used only for FLASH CFI command sequence.<br>*<br>* &nbsp;&nbsp; &nbsp;Prepare the Data according to the Flash Width and Bus Width.&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>* &nbsp;&nbsp; &nbsp;If flash width = 2 and bus width = 1 data = 0x55 -&gt; data = 0x55&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>* &nbsp;&nbsp; &nbsp;If flash width = 2 and bus width = 4 data = 0x55 -&gt; data = 0x550055&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>* &nbsp;&nbsp; &nbsp;If flash width = 1 and bus width = 4 data = 0x55 -&gt; data = 0x55555555&nbsp;&nbsp; &nbsp;<br>*<br>* INPUT:<br>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data&nbsp;&nbsp;&nbsp; - Data to be expended.<br>*&nbsp;&nbsp; &nbsp;pFlash&nbsp;&nbsp; &nbsp;- flash information.<br>*<br>* OUTPUT:<br>*&nbsp;&nbsp; &nbsp;None<br>*<br>* RETURN:<br>*&nbsp;&nbsp;
 &nbsp;MV_U32 &nbsp;&nbsp; &nbsp;- Data after extension.<br>*&nbsp;&nbsp; &nbsp;OxFFFFFFFF if pFlash is Null<br>*<br>*******************************************************************************/<br>MV_U32 flashDataExt( MV_FLASH_INFO *pFlash, MV_U32 data)<br>{<br>&nbsp;&nbsp; &nbsp;MV_U32&nbsp;&nbsp; &nbsp;i;<br>&nbsp;&nbsp; &nbsp;if(NULL == pFlash)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return 0xFFFFFFFF;<br><br>&nbsp;&nbsp; &nbsp;for(i = 0; i &lt; pFlash-&gt;busWidth ; i+= pFlash-&gt;devWidth)<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;data |= data &lt;&lt; 8*i; <br>&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;return data;<br>}<br><br><br>This is the code of flash initialization in u-boot,i am not sure what's use of the extend data.<br><br>regards <br>sun<br><p>&#32;



      <hr size=1><a href="http://cn.mail.yahoo.com" target=blank>ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä3.5GÈÝÁ¿£¬20M¸½¼þ£¡</a>