From: Quanyang Wang <[email protected]> When enabling dual mode for 2 flashes, spi_nor_sr_lock/unlock/is_locked can handle it since the variables including mtd_size/sector_size/ofs/len are both doubled and this will not affect the calculation of BP bits value.
Signed-off-by: Quanyang Wang <[email protected]> --- drivers/mtd/spi-nor/core.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 944499999ecca..61dd5785d2f55 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -2151,9 +2151,6 @@ static int spi_nor_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) if (ret) return ret; - if (nor->isparallel == 1) - ofs = ofs >> nor->shift; - if (nor->isstacked == 1) { if (ofs >= (mtd->size / 2)) { ofs = ofs - (mtd->size / 2); @@ -2194,9 +2191,6 @@ static int spi_nor_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) if (ret) return ret; - if (nor->isparallel == 1) - ofs = ofs >> nor->shift; - if (nor->isstacked == 1) { if (ofs >= (mtd->size / 2)) { ofs = ofs - (mtd->size / 2); -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10544): https://lists.yoctoproject.org/g/linux-yocto/message/10544 Mute This Topic: https://lists.yoctoproject.org/mt/86435178/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
