From mboxrd@z Thu Jan 1 00:00:00 1970 From: llandre Date: Thu, 10 Nov 2005 15:18:44 +0100 Subject: [U-Boot-Users] Bug in StrataFlash drivers Message-ID: <437356C4.9090704@dave-tech.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Several platforms are equipped with StrataFlash memory. Most of the existing drivers seem to not handle correctly odd-sized buffers in writing. IIUC the bug is the function flash_write_cfibuffer - enabled when CFG_FLASH_USE_BUFFER_WRITE is defined - when working with 16-bit wide memories. The following code ... ... case FLASH_CFI_8BIT: cnt = len; break; case FLASH_CFI_16BIT: cnt = len >> 1; break; case FLASH_CFI_32BIT: ... ... must be changed like this: ... break; case FLASH_CFI_16BIT: cnt = len >> 1; if (len % 2) cnt += 1; break; case FLASH_CFI_32BIT: ... Best regards, llandre DAVE Electronics System House - R&D Department web: http://www.dave-tech.it email: r&d2 at dave-tech.it