/*******************************************************************************<br>* flashDataExt - Extend Data. <br>* DESCRIPTION:<br>* Should be used only for FLASH CFI command sequence.<br>*<br>* Prepare the Data according to the Flash Width and Bus Width. <br>* If flash width = 2 and bus width = 1 data = 0x55 -> data = 0x55 <br>* If flash width = 2 and bus width = 4 data = 0x55 -> data = 0x550055 <br>* If flash width = 1 and bus width = 4 data = 0x55 -> data = 0x55555555 <br>*<br>* INPUT:<br>* data - Data to be expended.<br>* pFlash - flash information.<br>*<br>* OUTPUT:<br>* None<br>*<br>* RETURN:<br>*
MV_U32 - Data after extension.<br>* OxFFFFFFFF if pFlash is Null<br>*<br>*******************************************************************************/<br>MV_U32 flashDataExt( MV_FLASH_INFO *pFlash, MV_U32 data)<br>{<br> MV_U32 i;<br> if(NULL == pFlash)<br> return 0xFFFFFFFF;<br><br> for(i = 0; i < pFlash->busWidth ; i+= pFlash->devWidth)<br> {<br> data |= data << 8*i; <br> }<br> 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> 
<hr size=1><a href="http://cn.mail.yahoo.com" target=blank>ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä3.5GÈÝÁ¿£¬20M¸½¼þ£¡</a>