From: Jagan Date: Thu, 28 Jun 2012 12:18:41 +0000 (+0530) Subject: Xilinx: ARM: sf: winbond: determine the address width based on flash type X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd1144691e703b9525c46a830b9ada531b03a03a;p=thirdparty%2Fu-boot.git 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 --- 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);