summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorJagan Teki <jteki@openedev.com>2015-09-02 11:39:46 +0530
committerJagan Teki <jteki@openedev.com>2015-10-25 20:17:03 +0530
commit3c75ade2b38ea987b79b7ef74d64301b49aa306d (patch)
tree52aedca503703fa9c4bcc9a8c44a1314bcdb825a /drivers/mtd
parent86e99b98614258de2b46bc6d58fbbf8c64a0900f (diff)
downloadu-boot-imx-3c75ade2b38ea987b79b7ef74d64301b49aa306d.zip
u-boot-imx-3c75ade2b38ea987b79b7ef74d64301b49aa306d.tar.gz
u-boot-imx-3c75ade2b38ea987b79b7ef74d64301b49aa306d.tar.bz2
sf: Return bank_sel, if flash->bank_curr == bank_sel
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi/sf_ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c
index 900ec1f..b33fe5a 100644
--- a/drivers/mtd/spi/sf_ops.c
+++ b/drivers/mtd/spi/sf_ops.c
@@ -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;