On 12/24/24 4:37 PM, Venkatesh Yadav Abbarapu wrote:
@@ -1593,18 +1596,22 @@ static int spi_nor_read(struct mtd_info *mtd, loff_t
from, size_t len,
}
while (len) {
- bank = (u32)from / SZ_16M;
- if (nor->flags & SNOR_F_HAS_PARALLEL)
- bank /= 2;
+ read_len = len;
+ offset = from;
- rem_bank_len = SZ_16M * (bank + 1);
- if (nor->flags & SNOR_F_HAS_PARALLEL)
- rem_bank_len *= 2;
- rem_bank_len -= from;
+ if (CONFIG_IS_ENABLED(SPI_FLASH_BAR)) {
^^^^^^^^^^^^^
+ bank = (u32)from / SZ_16M;
+ if (nor->flags & SNOR_F_HAS_PARALLEL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is this really correct ?
Should this be wrapped in if (CONFIG_IS_ENABLED(STACKED_PARALLEL)) instead ?
[...]