Commit Graph

604 Commits

Author SHA1 Message Date
simbit18 9967989b02 Fix Kconfig style
Remove spaces from Kconfig files
Remove TABs
Add comments
2024-04-09 10:49:23 +08:00
chenrun1 d19486e1f8 driver/filemtd:support isbad & markbad
In this change, we can mount a filesystem on filemtd that works like Yaffs and works on the Nand driver

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-04-07 18:50:00 +08:00
chenrun1 4fc111965d filemtd:fix Fixed the issue of incorrect content returned when using nandflash earse
Nand_erase return result should be the number of blocks that were successfully erased in NuttX

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-04-07 18:50:00 +08:00
xucheng5 3b79363041 mtd_config_fs : optimize nvs
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2024-03-14 00:11:41 +08:00
xucheng5 cd80900646 mtd_config_fs : support algin size
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2024-03-14 00:11:41 +08:00
Saurav Pal 1bec133385 drivers/mtd/mtd_nandram: Adds virtual NAND Flash device simulator.
Adds virtual NAND Flash device simulator, NAND flash log wrapper, and documentation for it.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-03-04 10:38:08 -03:00
Bowen Wang 169f47beec rpmsg: make all the rpmsg services deponds on RPMSG
After decoupled the rpmsg and rptun, all the rpmsg service should
depends on the RPMSG.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-18 04:09:34 -08:00
wangyongrong 5a39935d4f rpmsgmtd: use fixed length struct to transfer between two cpus
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-11 08:33:15 +01:00
TimJTi 222ca5b040 Add MTD for AT25 eeprom 2024-01-04 09:25:52 -08:00
yinshengkai 9852428953 fs: procfs add poll support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-12-26 19:23:13 -08:00
Michal Lenc 02aeb66644 mtd/w25q: add nxsig_usleep to busy waiting in w25qxxxjv_erase_sector()
Busy waiting in w25qxxxjv_erase_sector() was without nxsig_usleep and
was causing the entire system to freeze for significant amount of time
as sector erase takes some time.

This commit adds nxsig_usleep into busy waiting to prevent system lock.
Sleep is set to sector erase time based on W25Q series datasheet.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-12-11 16:00:07 -03:00
Daniel P. Carvalho ed877fd494 drivers:mtd: Adds support for W25 2Mbit memories.
Tested with W25Q20CL.
2023-11-22 19:39:40 -03:00
Michal Lenc 0554b975da s25fl1: fix compile warnings caused by incorrect variable print format
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-11-14 09:08:08 -08:00
Janne Rosberg 225062305b mtd/mx25rxx: add support for MX25L25673G chip
Add support for MX25L25673G QSPI flash.
2023-11-09 09:04:38 +08:00
raiden00pl 5b87fdfb9d Documentation: remove all migrated READMEs 2023-10-29 21:03:54 -03:00
dongjiuzhu1 ed6fb11de6 driver/mtd: get mtd_geometry_s.model for mtd partition and optimize code
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 20:02:45 +08:00
chenrun1 73ca090ab9 filemtd:Fix teardown return error number EINVAL
In previous versions, during the teardown phase, the "open_blockdriver" would call the "mtd proxy" causing the "file mtd" node to be registered in the ftl. " node is registered in ftl.
Therefore, we changed the behavior to find the corresponding inode by node name.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-10-15 01:29:12 +08:00
wanggang26 e930476b4b enable O_CLOEXEC explicit
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-22 13:51:00 +08:00
Xiang Xiao 08b151a681 Fix error: mtd/smart.c:2800:12: error: variable 'mincount' set but not used [-Werror,-Wunused-but-set-variable]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-11 17:38:45 +08:00
haopengxiang 3a0e713f2e dirvers/mtd/dhara: add dhara folder in gitignore
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-09-07 23:05:11 +08:00
chao an 664927c86e mm/alloc: remove all unnecessary cast for alloc
Fix the minor style issue and remove unnecessary cast

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-30 14:34:20 +08:00
chao an b60f01a55b inode/i_private: remove all unnecessary cast for i_private
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-29 08:58:07 +02:00
chao an 7aa45305b7 fs/inode: remove all unnecessary check for filep/inode
Since VFS layer already contains sanity checks, so remove unnecessary lower half checks

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-29 09:47:11 +08:00
guohao15 d4cebd5d77 mtd:add dhara compatiblity layer
to support dhara ftl for fatfs

Signed-off-by: guohao15 <guohao15@xiaomi.com>
2023-08-22 23:16:14 +08:00
p-zhangliming1 4b2ae15069 nuttx/mtd: Add new functions part_isbad and part_markbad in mtd partition.
Signed-off-by: p-zhangliming1 <p-zhangliming1@xiaomi.com>
2023-08-16 23:56:18 +03:00
xucheng5 23d4263207 driver/mtd_config: just query when data is null or len is zero
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-07 05:45:56 -07:00
xucheng5 da9b05cc33 driver/mtd_config_fs: just query when data is null or len is zero
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-07 05:45:56 -07:00
xucheng5 860571471d driver/mtdconfig_fs : return -ENOENT when delete non-existed key
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-07 01:15:15 -07:00
xucheng5 d0a2fa626a driver/mtd_config : add mtdconfig_register_by_path()
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-07 01:08:24 -07:00
dongjiuzhu1 917728bad9 driver/ftl: pass the number of eraseblock for ftl_get_cblock
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-31 22:22:25 -07:00
Michal Lenc 1fb65e18d2 w25.c: enable support for W25QxxxJV NOR flash memories
W25QxxxJV NOR memories are backward compatible with older Winbond´s
generations and thus can also be supported here. This essentially brings
the support for generic SPI to W25QxxxJV memories as w25qxxxjv.c file only
supports QSPI communication.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-07-31 05:46:57 -07:00
chenrun1 c267791f06 driver/mtd/ftl: Modify erasure result processing error issue
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-30 12:40:30 -07:00
dongjiuzhu1 dcf3f9de75 driver/mtd/ftl: support to skip bad block for earse/bread/bwrite
1.support to use dd commond to burn romfs image to nand flash
2.support bare-write nand flash device without file system

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-29 17:46:14 -03:00
Xiang Xiao abfe082a6f Kconfig: Simplify the conditional default statement
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-16 14:39:20 -03:00
chao an f10b54a081 cmake: fix CMake build break
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-15 23:32:36 +08:00
chao an 6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
Beat Küng cbbeec3183 ramtron.c: add FM25V02A-DGQ 2023-07-04 08:19:56 +08:00
wangbowen6 940bbfc720 rpmsg: support the fdsan feature for rpmsg dev/mtd/blk
Directly return -ENOTTY in rpmsgxxx_ioctl() when the command is
not supported to avoid fdsan command FIOC_SETTAG and FIOC_GETTAG
pass to the rpmsg dev/mtd/blk server with CONFIG_FDSAN enabled.

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-06-17 19:34:39 +08:00
Sebastien Lorquet d36e2a8394 is25xp: Enable usage of several chips on the same spi bus 2023-06-10 02:14:23 +08:00
xucheng5 f4e3f23945 driver/mtd : mtd_config name len max changed to NAME_MAX
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-06-07 09:40:02 -03:00
wanggang26 01348b70a9 mtd: fix a typo 2023-06-02 19:57:15 +03:00
xucheng5 484d349fe3 driver/mtd : check args for nvs read
mtd_config_fs: check configdata before use

Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-05-31 15:24:14 +08:00
Michal Lenc 5f5ffa9380 fix compile warnings caused by incorrect variable format in print
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-05-27 18:52:01 +08:00
TimJTi 3cb168b177 GD25 Flash memory - performance enhancements 2023-05-23 01:32:58 +08:00
Xiang Xiao 7990f90915 Indent the define statement by two spaces
follow the code style convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-21 09:52:08 -03:00
Petro Karashchenko 1e86682feb drivers/mtd: fix C89 compatibility of w25qxxxjv
Correct various style issues

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-05-19 02:40:38 +08:00
Michal Lenc cf04f2e555 w25qxxxjv: add dual die support for 1 Gbit flash
1 Gbit W25Q01JV flash uses two 512 Mbit dies. This requires specific
operations in the driver in order to support the entire 1 Gbit region.
This commit adds dual die support for W25Q01JV flash.

Generally the driver has to switch active dies when die specific read from
status register is required (therefore before read, write, erase and when
checking if write status register was successful).

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-05-18 01:10:55 +08:00
Michal Lenc 482cbc4363 w25qxxxjv: fix STATUS2_QE_ENABLED bitfield write
W25QXXXJV_WRITE_STATUS_2 register uses just first byte therefore all
operations has to be done in priv->cmdbuf[0]. Previous priv->cmdbuf[1]
caused QuadSPI mode not being enabled.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-05-15 10:43:55 +08:00
Alan Carvalho de Assis 54d92d1a0f Fix typo -EACESS -> -EACCES 2023-05-12 06:29:35 +03:00
Xiang Xiao 6f6fce95a2 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00