From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Sat, 28 Aug 2010 19:17:39 -0400 Subject: [U-Boot] [PATCH] MTD/SPI/FLASH: add support for Ramtron FRAMs using SPI In-Reply-To: <201008281748.40158.vapier@gentoo.org> References: <1282740439-7910-1-git-send-email-u-boot@emk-elektronik.de> <4C76C7F2.3020005@emk-elektronik.de> <201008281748.40158.vapier@gentoo.org> Message-ID: <201008281917.40512.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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