]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Xilinx: ARM: sf: winbond: determine the address width based on flash type
authorJagan <jaganna@xilinx.com>
Thu, 28 Jun 2012 12:18:41 +0000 (17:48 +0530)
committerJagan <jaganna@xilinx.com>
Thu, 12 Jul 2012 10:34:28 +0000 (16:04 +0530)
Address width is computed based on the flash type, whether it is
single or dual not based on the size.

Signed-off-by: Jagan <jaganna@xilinx.com>
drivers/mtd/spi/winbond.c

index fcad032ea92674e7ea392cfb3167de110bad57d2..55f2159b7af7e8c5ee014aeb9c0a63294696e358 100755 (executable)
@@ -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);