about "flash extend data"
/*******************************************************************************
* flashDataExt - Extend Data.
* DESCRIPTION:
* Should be used only for FLASH CFI command sequence.
*
* Prepare the Data according to the Flash Width and Bus Width. * If flash width = 2 and bus width = 1 data = 0x55 -> data = 0x55 * If flash width = 2 and bus width = 4 data = 0x55 -> data = 0x550055 * If flash width = 1 and bus width = 4 data = 0x55 -> data = 0x55555555
*
* INPUT:
* data - Data to be expended.
* pFlash - flash information.
*
* OUTPUT:
* None
*
* RETURN:
* MV_U32 - Data after extension.
* OxFFFFFFFF if pFlash is Null
* *******************************************************************************/ MV_U32 flashDataExt( MV_FLASH_INFO *pFlash, MV_U32 data)
{
MV_U32 i;
if(NULL == pFlash)
return 0xFFFFFFFF;
for(i = 0; i < pFlash->busWidth ; i+= pFlash->devWidth)
{
data |= data << 8*i;
}
return data;
}This is the code of flash initialization in u-boot,i am not sure what's use of the extend data.
regards
sun
---------------------------------
????????3.5G???20M???
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070515/baedd8bd/attachment.htm
Quoted 2 lines · In message <[email protected]> you wrote:
* flashDataExt - Extend Data.
What is this supposed to be? A patch submission? What would it be useful for?
Quoted 1 line
* Should be used only for FLASH CFI command sequence.
Shoulkd? Why? Where? How?
Quoted 1 line
*
MV_U32- Data after extension.
MV_U32 is not a legal data type in U-Boot.
Quoted 1 line
MV_U32flashDataExt( MV_FLASH_INFO *pFlash, MV_U32 data)
MV_U32 and MV_FLASH_INFO are not legal data types in U-Boot.
Quoted 4 lines
{
MV_U32 i;
if(NULL == pFlash)
return 0xFFFFFFFF;Bad indentation.
Quoted 6 lines
for(i = 0; i < pFlash->busWidth ; i+= pFlash->devWidth)
{
data |= data << 8*i;
}
return data;
}Bad brace style. Please check the Codung Style requirements. See
http://www.denx.de/wiki/UBoot/CodingStyle
Quoted 2 lines
This is the code of flash initialization in u-boot,i am not sure what's use of the extend data.
This is definitely NOT code anywhere in the public U-Boot source tree.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The software required `Windows 95 or better', so I installed Linux.