walnux/drivers/mtd
Laczen JMS c506c25f19 drivers/mtd: introduce nvblk
NVBLK provides a block device that operates on top of a non volatile
memory (as a mtd device) that enables wear levelling for non volatile
memory. It's operation is similar to the dhara wear levelling library,
but nvblk is meant to be used on smaller (nor, mram, rram) memory.

I am also the author and maintainer of the nvblk library.

A block device can be created during startup by using:
```
nvblk_initialize(0, mtd, CONFIG_MTD_NVBLK_DEFAULT_LBS,
                         CONFIG_MTD_NVBLK_DEFAULT_IOBS,
                         CONFIG_MTD_NVBLK_DEFAULT_SPEB);
```
and a fat filesystem on top of this as:
```
nsh> mkfatfs /dev/mtdblock0
nsh> mount -t vfat /dev/mtdblock0 /mnt
```
this fat filesystem can then be used:
```
nsh> echo "test" > /mnt/test.txt
nsh> cat test.txt
test
nsh>
```

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-08-06 01:53:56 +08:00
..
.gitignore drivers/mtd: introduce nvblk 2025-08-06 01:53:56 +08:00
at24xx.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
at25.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
at25ee.c fix nxstyle 2024-11-28 20:40:13 +08:00
at45db.c driver/mtd/at45db.c: write to page without built-in erase 2025-03-26 10:29:12 +08:00
cfi.c drivers/mtd: cfi-flash driver 2025-02-11 17:23:44 +08:00
cfi.h drivers/mtd: cfi-flash driver 2025-02-11 17:23:44 +08:00
CMakeLists.txt mtd/mtd_cfi: cfi flash bind to mtd interface 2025-02-11 17:23:44 +08:00
dhara.c Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
filemtd.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
ftl.c drivers/fs: Control the behavior of FTL by passing oflags during the open process. 2025-07-16 14:11:41 +08:00
gd5f.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
gd25.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
gd55.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
hamming.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
is25xp.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Kconfig drivers/mtd: introduce nvblk 2025-08-06 01:53:56 +08:00
m25px.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Make.defs drivers/mtd: introduce nvblk 2025-08-06 01:53:56 +08:00
mtd_cfi.c drivers/mtd/mtd_cfi: Add MTDIOC_ERASESTATE 2025-03-28 19:19:35 +08:00
mtd_config.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd_config_fs.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
mtd_modeltab.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd_nand.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08: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 drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +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 drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mx25rxx.c Remove duplicate includes across multiple files 2025-01-09 23:30:23 +08:00
mx35.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
n25qxxx.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +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 drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +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 drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
sst25xx.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
sst26.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
sst39vf.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
w25.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
w25qxxxjv.c mtd/w25q: ensure the correct behavior if erase sector fails 2025-02-13 10:02:06 +08:00