]> git.sur5r.net Git - u-boot/commitdiff
sf: Return bank_sel, if flash->bank_curr == bank_sel
authorJagan Teki <jteki@openedev.com>
Wed, 2 Sep 2015 06:09:46 +0000 (11:39 +0530)
committerJagan Teki <jteki@openedev.com>
Sun, 25 Oct 2015 14:47:03 +0000 (20:17 +0530)
If computed bank_sel is same as flash->bank_curr which is
computed at probe time, then return the bank_sel instead of zero.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
drivers/mtd/spi/sf_ops.c

index 900ec1f2a9ce8cb95ae4f2d087db3bc440c72b69..b33fe5a1b2b3bc9337d63abb18e7d5f8951e4f16 100644 (file)
@@ -102,7 +102,7 @@ static int spi_flash_cmd_bankaddr_write(struct spi_flash *flash, u8 bank_sel)
 
        if (flash->bank_curr == bank_sel) {
                debug("SF: not require to enable bank%d\n", bank_sel);
-               return 0;
+               return bank_sel;
        }
 
        cmd = flash->bank_write_cmd;