From: John Linn Date: Fri, 9 Jul 2010 16:45:31 +0000 (-0600) Subject: Xilinx: ARM: Hack to fix bug for Numonyx flash in 8 bit mode X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5445f5ca0824fa01d20032081fcca266cbefdc72;p=thirdparty%2Fu-boot.git Xilinx: ARM: Hack to fix bug for Numonyx flash in 8 bit mode This is a hack that should be reconsidered. In 8 bit mode, the CFI data for the part is wrong in that the buffer size is 1024 but should be 256. Signed-off-by: Jagan --- diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 0909fe715ac..6d35ba143cc 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -2025,7 +2025,14 @@ ulong flash_get_size (phys_addr_t base, int banknum) } info->sector_count = sect_cnt; - info->buffer_size = 1 << le16_to_cpu(qry.max_buf_write_size); + /* info->buffer_size = + 1 << le16_to_cpu(qry.max_buf_write_size); */ + /* + * Xilinx hack for now due to numonyx bug with 8 bit mode + * The CFI data for the buffer size is wrong in the part. + * It may be feasible to fix this better. + */ + info->buffer_size = 256; tmp = 1 << qry.block_erase_timeout_typ; info->erase_blk_tout = tmp * (1 << qry.block_erase_timeout_max);