walnux/drivers/mtd
jingfei c3e87dd3d1 drivers/fs: Control the behavior of FTL by passing oflags during the open process.
To save more space (equivalent to the size of one erase sector of
MTD device) and to achieve faster read and write speeds, a method
for direct writing was introduced at the FTL layer.
This can be accomplished simply by using the following oflags during
the open operation:

1. O_DIRECT. when this flag is passed in, ftl internally uses
   the direct write strategy and no read cache is used in ftl;
   otherwise, each write will be executed with the minimum
   granularity of flash erase sector size which means a
   "sector read back - erase sector - write sector" operation
   is performed by using a read cache buffer in heap.

2. O_SYNC. When this flag is passed in, we assume that the
   flash has been erased in advance and no erasure operation
   will be performed internally within ftl. O_SYNC will take
   effect only when both O_DIRECT and O_SYNC are passed in
   simultaneously.

3. For uniformity, we remapped the mount flag in mount.h and
   unified it with the open flag in fcntl.h. The repetitive
   parts of their definitions were reused, and the remaining
   part of the mount flag redefine to the unused bit of open
   flags.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2025-07-16 14:11:41 +08:00
..
.gitignore dirvers/mtd/dhara: add dhara folder in gitignore 2023-09-07 23:05:11 +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 mtd/mtd_cfi: cfi flash bind to mtd interface 2025-02-11 17:23:44 +08:00
m25px.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Make.defs mtd/mtd_cfi: cfi flash bind to mtd interface 2025-02-11 17:23:44 +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
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