Skip to content

Commit 694eaf4

Browse files
etienne-lmskartben
authored andcommitted
drivers: flash: restore stm32 xspi mutex on memory mapping
Fix stm32 XSPI driver to restore the bus command concurrent access protection that was mistakenly removed on memory mapping operation by commit e5620e0 ("drivers: flash: stm32 xspi flash read with memcopy when executing"). Signed-off-by: Etienne Carriere <[email protected]>
1 parent 6780ddd commit 694eaf4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/flash/flash_stm32_xspi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,10 @@ static int flash_stm32_xspi_read(const struct device *dev, off_t addr,
12061206

12071207
/* Do reads through memory-mapping instead of indirect */
12081208
if (!stm32_xspi_is_memorymap(dev)) {
1209+
xspi_lock_thread(dev);
12091210
ret = stm32_xspi_set_memorymap(dev);
1211+
xspi_unlock_thread(dev);
1212+
12101213
if (ret != 0) {
12111214
LOG_ERR("READ: failed to set memory mapped");
12121215
return ret;

0 commit comments

Comments
 (0)