[U-Boot] Question about M29W128G CFI QRY bug

Stefan Roese sr at denx.de
Tue Apr 14 11:43:18 CEST 2009


Hi Richard,

On Monday 13 April 2009, Richard Retanubun wrote:
> As a follow up, This hack seems to fix the issue.
>
> diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
> index 631b969..d386143 100644
> --- a/drivers/mtd/cfi_flash.c
> +++ b/drivers/mtd/cfi_flash.c
> @@ -1691,7 +1691,7 @@ static int __flash_detect_cfi (flash_info_t * info,
> struct cfi_qry *qry) the reset command in both Intel and AMD variants, in
> the hope that AMD flash roms ignore the Intel command. */
>          flash_write_cmd (info, 0, 0, AMD_CMD_RESET);
> -       flash_write_cmd (info, 0, 0, FLASH_CMD_RESET);
> +       //flash_write_cmd (info, 0, 0, FLASH_CMD_RESET);
>
>          for (cfi_offset=0;
>               cfi_offset < sizeof(flash_offset_cfi) / sizeof(uint);
>
>
> I don't like it because removes support for the Intel command set, no?
> Looks like "the hope" is now dashed by the M29W128G.

Let's quote the comment from the code above again for all users:

	/* We do not yet know what kind of commandset to use, so we issue
	   the reset command in both Intel and AMD variants, in the hope
	   that AMD flash roms ignore the Intel command. */
	flash_write_cmd (info, 0, 0, AMD_CMD_RESET);
	flash_write_cmd (info, 0, 0, FLASH_CMD_RESET);

Yes, you could be correct here. This 2nd RESET command seems to break M29W128G 
support.

> Any recommendation on how to proceed?

How is this problem solved in the Linux MTD driver (referring to your first 
email and the link you posted there)? 

Did you take a look at the CONFIG_SYS_FLASH_CFI_AMD_RESET define? I suggest 
you give it a try and let me know if this helps.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list