From: Jagannadha Sutradharudu Teki Date: Wed, 12 Jun 2013 06:56:35 +0000 (+0530) Subject: cfi_flash: Add write buffer hack for M29EW flash X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ab6613f2ea73152a0580a991d9e27a7b2dac3b2;p=thirdparty%2Fu-boot.git cfi_flash: Add write buffer hack for M29EW flash Added CONFIG_ZYNQ_M29EW_WB_HACK. Signed-off-by: Jagannadha Sutradharudu Teki --- diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 22d84407dd4..55631f12d03 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -2236,6 +2236,10 @@ ulong flash_get_size (phys_addr_t base, int banknum) } info->sector_count = sect_cnt; + /* FIXME */ +#ifdef CONFIG_ZYNQ_M29EW_WB_HACK + qry.max_buf_write_size = 0x8; +#endif info->buffer_size = 1 << le16_to_cpu(qry.max_buf_write_size); tmp = 1 << qry.block_erase_timeout_typ; info->erase_blk_tout = tmp * diff --git a/include/configs/zynq_common.h b/include/configs/zynq_common.h index fe638c6594c..d80fd3a36bd 100644 --- a/include/configs/zynq_common.h +++ b/include/configs/zynq_common.h @@ -117,6 +117,7 @@ # undef CONFIG_SYS_FLASH_PROTECTION /* don't use hardware protection */ /* use buffered writes (20x faster) */ # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE +# define CONFIG_ZYNQ_M29EW_WB_HACK #endif /* QSPI */