aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini2016-01-07 12:41:57 -0500
committerTom Rini2016-01-07 12:41:57 -0500
commit67ecb84ccbfd609170978833fd09b0b87fc4b630 (patch)
tree812911dcff07cad5da276c14d9a2eeba35c977f8
parent3861d784b1a470570a0098ac5c25d79e3073c0d9 (diff)
parent8770413f380d07439bc9ad60c6b4d108d5a9adf0 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-spi
-rw-r--r--drivers/mtd/spi/spi_flash.c4
-rw-r--r--drivers/spi/fsl_qspi.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 7ffa136f5a4..b7b7f0044e7 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -767,8 +767,8 @@ int stm_unlock(struct spi_flash *flash, u32 ofs, size_t len)
return ret;
/* Cannot unlock; would unlock larger region than requested */
- if (stm_is_locked_sr(flash, status_old, ofs - flash->erase_size,
- flash->erase_size))
+ if (stm_is_locked_sr(flash, ofs - flash->erase_size, flash->erase_size,
+ status_old))
return -EINVAL;
/*
* Need largest pow such that:
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index feec3e80b6a..542b6cfe355 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define TX_BUFFER_SIZE 0x40
#endif
-#define OFFSET_BITS_MASK GENMASK(24, 0)
+#define OFFSET_BITS_MASK GENMASK(23, 0)
#define FLASH_STATUS_WEL 0x02