[U-Boot] [PATCH] MTD/SPI/FLASH: add support for Ramtron FRAMs using SPI

Mike Frysinger vapier at gentoo.org
Sun Aug 29 01:17:39 CEST 2010


On Saturday, August 28, 2010 17:48:39 Mike Frysinger wrote:
> +			/* Make sure the ID was jedec extended */
> +			j = flashes[i].shift - 1;
> +			while (j >= 0 && idcode[j] == 0x7f)
> +				continue;

thinko ... this loops forever.  the tested fix:
	j = flashes[i].shift;
	while (--j >= 0)
		if (idcode[j] != 0x7f)
			break;

this whole change increases code size a bit (20 - 60 bytes on Blackfin 
depending on how many flashes are supported), but it makes management easier 
and allows for arbitrarily long manufacturers ids.  so i think it's worth it.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100828/9c15d343/attachment.pgp 


More information about the U-Boot mailing list