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>
This commit is contained in:
parent
86e99b9861
commit
3c75ade2b3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user