nuttx/drivers/mtd
Michal Lenc 08bffe1c0b drivers/mtd/w25.c: ensure the device is not in power down mode
If power down mode is set, trying to read ID ends in an infinite loop
because w25_waitwritecomplete never returns as status register never
signalizes write complete. Therefore ensure the device is not in a
power down mode before trying to read from it.

This can be an issue if the board is trying to check for more NOR
memories on one SPI bus and one chip select. For example GD25 driver
returns the memory to power down state after read id is finished,
therefore board initialization is stuck in an infinite loop if it first
checks for GD25 and then fallbacks to W25.

The commit fixes the possible issue by ensuring W25 is brought back
to normal operation mode before trying to obtain the manufacturer ID.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-03-27 17:05:17 +08:00
..
.gitignore drivers/mtd: introduce nvblk 2025-08-06 01:53:56 +08:00
at24xx.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
at25.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
at25ee.c mtd/at25ee: Use eeprom/spi_xx25xx internally 2025-12-17 19:03:54 +01:00
at45db.c driver/mtd/at45db.c: write to page without built-in erase 2025-03-26 10:29:12 +08:00
cfi.c driver/cfi-flash: Add a config option for the page size of CFI flash. 2026-01-16 20:38:26 +08:00
cfi.h drivers/mtd: cfi-flash driver 2025-02-11 17:23:44 +08:00
CMakeLists.txt mtdconfig: modify mtdconfig kconfig 2026-01-26 10:52:51 +08:00
dhara.c Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
filemtd.c mtdconfig: lomtdconfig device change to depends on !MTD_CONFIG_NONE 2026-01-26 10:52:51 +08:00
ftl.c ftl:optimize ftl's MTD_ERASE return value check 2026-01-14 09:56:04 +08:00
gd5f.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
gd25.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
gd55.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
hamming.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
is25xp.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
Kconfig mtdconfig/nvs: use a fixed size buffer instead of vla 2026-01-29 14:56:19 +08:00
m25px.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
Make.defs mtdconfig: modify mtdconfig kconfig 2026-01-26 10:52:51 +08:00
mtd_cfi.c drivers/mtd/mtd_cfi: Add MTDIOC_ERASESTATE 2025-03-28 19:19:35 +08:00
mtd_config.c mtd/mtd_config: add mtdconfig_register_by_path/mtdconfig_unregister_by_path api 2026-01-26 10:52:51 +08:00
mtd_config_nvs.c mtdconfig/nvs: clean up block without valid data during GC 2026-01-29 14:56:19 +08:00
mtd_modeltab.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd_nand.c drivers/mtd: add MTDIOC_ISBAD ioctl 2025-12-23 09:26:34 -03:00
mtd_nandecc.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd_nandmodel.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd_nandram.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd_nandscheme.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd_nandwrapper.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd_onfi.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
mtd_partition.c mtd/parition:MTD partiton check whether the erase interface exist 2026-01-14 09:56:04 +08:00
mtd_progmem.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd_rwbuffer.c drivers/mtd: fix compile warning 2025-06-03 17:33:14 +08:00
mx25lx.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
mx25rxx.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
mx35.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
n25qxxx.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
nullmtd.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
nvblk.c drivers/mtd: introduce nvblk 2025-08-06 01:53:56 +08:00
rammtd.c rammtd:add rammtd_uninitialize 2024-11-12 14:58:01 +08:00
ramtron.c driver/mtd: ramtron multi-device spi bus support 2025-03-26 19:26:01 +08:00
rpmsgmtd.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
rpmsgmtd.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgmtd_server.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
s25fl1.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
sector512.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
skeleton.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
smart.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
sst25.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
sst25xx.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
sst26.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
sst39vf.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
w25.c drivers/mtd/w25.c: ensure the device is not in power down mode 2026-03-27 17:05:17 +08:00
w25n.c drivers/mtd: Add W25N SPI NAND flash driver 2025-12-19 10:00:33 +08:00
w25qxxxjv.c sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00