Thank you so much Angelo,
I am not using board_flash_get_legacy in my board.
In then function flash_erase() there is one function for flash_write_cfiword()
in that there is one check for if flash is erased or not. In that code there is
one reading of byte and it returns 0x00. so that is problem. Following is the
line here, in that flag gets 0 and this function returns ERR_NOT_ERASED.
case FLASH_CFI_8BIT:
flag = ((flash_read8(dstaddr) & cword.c) == cword.c);
break;
static int flash_write_cfiword (flash_info_t * info, ulong dest,
cfiword_t cword)
{
void *dstaddr = (void *)dest;
int flag;
flash_sect_t sect = 0;
char sect_found = 0;
/* Check if Flash is (sufficiently) erased */
switch (info->portwidth) {
case FLASH_CFI_8BIT:
flag = ((flash_read8(dstaddr) & cword.c) == cword.c);
break;
case FLASH_CFI_16BIT:
flag = ((flash_read16(dstaddr) & cword.w) == cword.w);
break;
case FLASH_CFI_32BIT:
flag = ((flash_read32(dstaddr) & cword.l) == cword.l);
break;
case FLASH_CFI_64BIT:
flag = ((flash_read64(dstaddr) & cword.ll) == cword.ll);
break;
default:
flag = 0;
break;
}
if (!flag)
return ERR_NOT_ERASED;
Thanks & Warm Regards,
Ramesh
-----Original Message-----
From: Angelo Dureghello [mailto:[email protected]]
Sent: Wednesday, January 16, 2013 5:09 AM
To: [email protected]
Cc: Ramesh K Khokhani
Subject: Re: [U-Boot] Flash Not Erased Problem with M29W128GL
Dear Ramesh,
this issue could be connected to a patch i recently posted to the
list, where the erase command is now allowed to be customizable for
CFI AMD compatible chips only.
Are you using board_flash_get_legacy in your board files ?
If yes, could you just add after line 1834 in cfi_flash.c
info->cmd_reset = AMD_CMD_RESET;
+ info->cmd_erase_sector = AMD_CMD_ERASE_SECTOR;
And report back if erasing now works ?
Many Thanks,
Angelo Dureghello
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Disclaimer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Information contained and transmitted by this e-mail is confidential and
proprietary to iGATE and its affiliates and is intended for use only by the
recipient. If you are not the intended recipient, you are hereby notified that
any dissemination, distribution, copying or use of this e-mail is strictly
prohibited and you are requested to delete this e-mail immediately and notify
the originator or [email protected] <mailto:[email protected]>. iGATE does
not enter into any agreement with any party by e-mail. Any views expressed by
an individual do not necessarily reflect the view of iGATE. iGATE is not
responsible for the consequences of any actions taken on the basis of
information provided, through this email. The contents of an attachment to this
e-mail may contain software viruses, which could damage your own computer
system. While iGATE has taken every reasonable precaution to minimise this
risk, we cannot accept liability for any damage which you sustain as a result of
software viruses. You should carry out your own virus checks before opening
an attachment. To know more about iGATE please visit www.igate.com
<http://www.igate.com>.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot