[U-Boot] [PATCH CFI flash]: Workaround for Numonyx Axcell P33/P30 256-Mbit 65nm bug

Wolfgang Denk wd at denx.de
Wed Jun 23 14:48:38 CEST 2010


Dear Philippe De Muyter,

In message <20100623115701.GA17625 at frolo.macqel> you wrote:
> Hello Wolfgang & list,

You might want to put the CFI custodian on Cc:

> I have "ported" U-boot to a in house made board with Numonyx Axcell P33/P30
> 256-Mbit 65nm flash chips.
> 
> After some time :( searching for bugs in our board or soft, we have
> discovered that those chips have a small but annoying bug, documented in
> "Numonyx Axcell P33/P30 256-Mbit Specification Update"

Heh ;-)

> +		case CFI_CMDSET_INTEL_EXTENDED: {
> +			unsigned short cmd;
> +
>  			if (prot)
> -				flash_write_cmd (info, sector, 0,
> -					FLASH_CMD_PROTECT_SET);
> +				cmd = FLASH_CMD_PROTECT_SET;
>  			else
> +				cmd = FLASH_CMD_PROTECT_CLEAR;
> +			/* see errata
> +			   "Numonyx Axcell P33/P30 Specification Update" :) */

Incorrect multiline comment style.

> +			flash_write_cmd (info, sector, 0, FLASH_CMD_READ_ID);
> +			if (!flash_isequal (info, sector, FLASH_OFFSET_PROTECT,
> +					    prot)) {
> +				/* cmd must come before 20us after FLASH_CMD_PROTECT */
> +				/* Disable interrupts which might cause a timeout here */

Incorrect multiline comment style.

And please move the declaration above the comment.


> +				int flag = disable_interrupts ();
>  				flash_write_cmd (info, sector, 0,
> -					FLASH_CMD_PROTECT_CLEAR);
> +						  FLASH_CMD_PROTECT);
> +				flash_write_cmd (info, sector, 0, cmd);
> +				/* re-enable interrupts if necessary */
> +				if (flag)
> +					enable_interrupts ();
> +			}
> +			}

Incorrect indentation.


Best regards,

Wolfgang Denk

-- 
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
IMPORTANT NOTICE TO PURCHASERS: The Entire Physical Universe,  Inclu-
ding  This Product, May One Day Collapse Back into an Infinitesimally
Small Space. Should  Another  Universe  Subsequently  Re-emerge,  the
Existence of This Product in That Universe Cannot Be Guaranteed.


More information about the U-Boot mailing list