diff mbox

[U-Boot,v4,02/21] sf: Return bank_sel, if flash->bank_curr == bank_sel

Message ID 1444662074-2424-3-git-send-email-jteki@openedev.com
State Accepted
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Jagan Teki Oct. 12, 2015, 3 p.m. UTC
If computed bank_sel is same as flash->bank_curr which is
computed at probe time, then return the bank_sel instead of zero.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
---
Changes for v4, v3, v2:
	- none

 drivers/mtd/spi/sf_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jagan Teki Oct. 25, 2015, 7:33 a.m. UTC | #1
On 12 October 2015 at 20:30, Jagan Teki <jteki@openedev.com> wrote:
> If computed bank_sel is same as flash->bank_curr which is
> computed at probe time, then return the bank_sel instead of zero.
>
> Signed-off-by: Jagan Teki <jteki@openedev.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>

Applied to u-boot-spi/master
diff mbox

Patch

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;