From 5445f5ca0824fa01d20032081fcca266cbefdc72 Mon Sep 17 00:00:00 2001 From: John Linn Date: Fri, 9 Jul 2010 10:45:31 -0600 Subject: [PATCH] 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 --- drivers/mtd/cfi_flash.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- 2.47.3