Commit Graph

493 Commits

Author SHA1 Message Date
zouboan
6166dd5833 drivers/mtd/mtd_config.c: enlarge the limits of blocksize in struct mtdconfig_struct_s 2022-02-09 01:39:55 +08:00
Petro Karashchenko
a743fed63d file_operations: get back C89 compatible initializer
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-11 02:14:00 +08:00
Petro Karashchenko
3ccb657dc2 nuttx: remove space befone newline in logs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-27 21:01:19 -06:00
Petro Karashchenko
3b3cebdd3e typo: fix type for word "instance"
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-14 06:39:34 -06:00
Petro Karashchenko
e71b66c792 drivers/mtd: add MTD null driver support
- fix memory leak during RAM MTD initialization
- fix calculations for FILE MTD device with customized
  block and erase sizes

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-05 03:11:02 -06:00
Sebastien Lorquet
437424d234 Support multiple SST26 devices on the same spi bus 2021-11-30 18:45:27 +01:00
Sebastien Lorquet
7f11255662 fix overflow checks in mtdpart 2021-11-30 10:43:27 -06:00
David Sidrane
08007dca8a ramtron:Remove errant code and definitions
After reviewing the data sheet for MB85RS256B, CY15B104Q, and
  FM25V0x the status register definitions in the driver were
  wrong as was the use.
2021-11-25 20:52:10 -06:00
Andres Sanchez
064f6c8c55 add MTDIOCTL_PROGMEM_ERASESTATE support
Signed-off-by: Andres Sanchez <tito97_sp@hotmail.com>

solve style check errors.
2021-11-16 14:45:03 -03:00
Jani Paalijarvi
2e94631da4 drivers/mtd/m25px.c: add support for MT25Q256 SPI NOR 2021-10-04 01:18:53 -07:00
Jani Paalijarvi
b7a5b248e0 Add support for MT25Q1G SPI NOR 2021-09-24 01:09:51 -07:00
Alin Jerpelea
9acf4d6f2e drivers: mtd: add BSD barrier for nand driver
add BSD barrier for nand driver

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
Alin Jerpelea
110632293c LICENSE: revert to the original license from Atmel Corporation
revert to the original license from Atmel Corporation and add the files to
the LICENSE file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
Alin Jerpelea
48c858c89c drivers: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-01 11:56:31 +08:00
Gustavo Henrique Nihei
84e9ff085f drivers/mtd: Fix code alignment for compliance to coding standard
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-28 02:28:03 +08:00
Gustavo Henrique Nihei
f153e42fcb drivers/mtd: Fix /proc/partitions column alignment on NSH
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-28 02:28:03 +08:00
Xiang Xiao
af72376773 fs: Remove magic field from partition_info_s
since it is wrong and impossible to return file
system magic number from the block or mtd layer.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-20 09:19:52 -03:00
liuhaitao
0c0a43c47b mtd: include nuttx/fs/fs.h explicitly
To fix struct partition_info_s undefined type issue.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I7c67d0e2f84f4251574a13c22f3bd917742975ea
2021-08-17 00:10:14 -07:00
Xiang Xiao
71269811ca mtd: Implement BIOC_PARTINFO for all drivers
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-16 10:08:26 -03:00
Xiang Xiao
6b6c11f0ad mtd: Replace MTDIOC_XIPBASE with BIOC_XIPBASE
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 08:01:29 -03:00
Xiang Xiao
177e1ced3f Revert "mtd: Add MTDIOC_FLUSH IOCTL like MTDIOC_XIPBASE"
to simplify flt and partion layer implementation

This reverts commit 2e49e1bc5c.
2021-08-12 08:01:29 -03:00
Xiang Xiao
f4addbd640 mtd: Replace MTDIOC_PARTINFO with BIOC_PARTINFO
to simplify flt and partion layer implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 08:01:29 -03:00
Xiang Xiao
d1687418db mtd: Remove the empty MTDIOC_XIPBASE implmentation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 09:50:51 -03:00
Xiang Xiao
76904371a1 fs: Remove endsector from partition_info_s
since it can be computed from startsector and numsectors simply

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 09:26:43 -03:00
Gustavo Henrique Nihei
62fa4b0018 mtd: Translate BIOC_PARTINFO into MTDIOC_PARTINFO on FTL driver
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-10 19:45:14 -07:00
Gustavo Henrique Nihei
cddd9c9c38 mtd: Enable retrieval of MTD partition information
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-10 19:45:14 -07:00
Alan C. Assis
e809c80f07 mtd/smartfs: Fix implicit conversion from 'int' to 'short' 2021-08-10 09:08:25 -07:00
Alan C. Assis
c4742c2197 mtd/smartfs: Fix compilation warning 2021-08-09 20:33:05 -03:00
Xiang Xiao
6a396eb224 Fix the printf warning after off_t change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id46daa2ee690a73d3187b479f0e7ab0e2e361764
2021-08-04 06:48:30 -07:00
Kenneth Thompson
5588bc4ef6 mtd/ramtron.c: Reassert CS between commands 2021-08-03 10:11:53 -07:00
Gustavo Henrique Nihei
882a0964b3 drivers/mtd: Implement MTDIOC_ERASESTATE for MTD drivers
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-07-17 09:00:41 -07:00
Xiang Xiao
2e49e1bc5c mtd: Add MTDIOC_FLUSH IOCTL like MTDIOC_XIPBASE
since the old design reuse BIOC_FLUSH for
MTD device which make some confusion

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-15 13:26:45 -03:00
Xiang Xiao
2e54df0f35 Don't include assert.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Alin Jerpelea
13e4f9b6b2 drivers: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-31 02:58:08 -05:00
SPRESENSE
4b1fddec8a drivers/mtd/smart.c: Recover the missing link of directory entry
When creating the next chain of directory entries, (1) add the position
of next entry to the current sector, and then (2) update the sector of
next entry. If the power is turned off between (1) and (2), the next
entry will not be found, and the chain of directory entries will break.
It causes the SmartFS file system corruption, and we will not be able
to add files.

To avoid this issue, in checking the filesystem by smart_fsck_directory,
if the sector of next entry does not exist, update the sector of
directory entry to invalidate the field of next entry.
2021-05-19 11:02:50 +02:00
David Sidrane
8f8befaa25 mtd:ramtron Use inttypes in printing macros 2021-05-03 16:58:47 -04:00
jturnsek
f57ff30545 Removing FLexSPI NOR driver 2021-04-12 17:22:14 -03:00
jturnsek
7453e76d98 FlexSPI NOR driver 2021-04-12 11:35:44 -03:00
Alin Jerpelea
231b8518b7 NuttX: Ken Pettit: update licenses to Apache
Ken Pettit has submitted the ICLA and we can migrate the licenses
 to Apache.

Sebastien Lorquet has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-10 06:42:19 -05:00
Xiang Xiao
f1e821833b mtd/ftl: Don't call ferr if return value equals -ENOTTY
MIRTOS4BES-22

since -ENOTTY is an expected code to indicate IOCTL isn't supported

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62cf58c514be696327ad769ab2f35099154bcb42
2021-04-06 22:36:09 +01:00
Alin Jerpelea
b4a33b5ec0 NuttX: Uros Platise: update licenses to Apache
Uros Platise has submitted the ICLA and we can migrate the licenses
 to Apache.

David Sidrane has submitted the ICLA and we can migrate the licenses
 to Apache.

Bob Feretich has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Alin Jerpelea
da7dfd06b3 drivers: Author David Sidrane: update licenses to Apache
David Sidrane has submitted the ICL and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-22 19:28:38 -07:00
Gustavo Henrique Nihei
330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Alin Jerpelea
e5b6305f4a drivers: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-04 18:32:27 -08:00
Xiang Xiao
c8d4a4c76a mtd/progmem: Add up_progmem_read callback guarded by ARCH_HAVE_PROGMEM_READ
since sometime platform code need do some special action during memcpy

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id108ef4232376feab3e37e9b3aee9a7927a03bd4
2021-03-03 13:47:59 -08:00
Xiang Xiao
0aa78ccc81 mtd/progmem: Let MTD_PROGMEM depend on ARCH_HAVE_PROGMEM
and remove the reference of CONFIG_ARCH_HAVE_PROGMEM from code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I89a73f138d54718ee8bc9345958675d7a2a34ba8
2021-03-03 13:47:59 -08:00
Gustavo Henrique Nihei
55d66f60a3 drivers: Fix typos reported by codespell 2021-02-25 18:57:18 -08:00
Byron Ellacott
9a1b726bae fs: change geometry types from size_t to blkcnt_t and blksize_t
This change reflects that the geometry isn't related to the largest
allocatable unit on the platform.

Calls to read and write block devices are also affected and have
been updated.
2021-02-18 20:38:22 -08:00
Alexander Vasiljev
dbec1cf694 drivers:mtd:smart.c: entryname is declared and should be under ifdef 2021-02-04 10:05:59 -08:00
Alexander Vasiljev
9146878dad drivers:mtd:w25qxxxjv.c: use different protect bits and address lengths for different chips 2021-02-04 10:05:59 -08:00