From cd1144691e703b9525c46a830b9ada531b03a03a Mon Sep 17 00:00:00 2001 From: Jagan Date: Thu, 28 Jun 2012 17:48:41 +0530 Subject: [PATCH] Xilinx: ARM: sf: winbond: determine the address width based on flash type Address width is computed based on the flash type, whether it is single or dual not based on the size. Signed-off-by: Jagan --- drivers/mtd/spi/winbond.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c index fcad032ea92..55f2159b7af 100755 --- a/drivers/mtd/spi/winbond.c +++ b/drivers/mtd/spi/winbond.c @@ -400,10 +400,11 @@ struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode) * params->sectors_per_block * params->nr_blocks; - if (stm->flash.size > 0x800000) - stm->addr_width = 4; - else - stm->addr_width = 3; +#ifdef CONFIG_XILINX_PSS_QSPI_USE_DUAL_FLASH + stm->addr_width = 4; +#else + stm->addr_width = 3; +#endif printf("SF: Detected %s with page size %u, total ", params->name, page_size); -- 2.47.3