Gregory Nutt
15a1e44586
drivers/mtd/ftl.c: Reduce size of stack buffer from 64 to a maximum size as determined from NAME_MAX
2018-08-28 08:19:15 -06:00
Xiang Xiao
8b5ac497ad
drivers/mtd/ftl.c: Support initialization of an FTL block device with a custom name
2018-08-28 07:15:57 -06:00
Xiang Xiao
41a1e76735
drivers/mtd/mtd_partition.c: Copy the partition name to internal buffer so that the caller can free the name argument
2018-08-28 07:09:59 -06:00
wangyanjiong
25f2bcea38
drivers/mtd: Add gd25 driver
2018-08-28 06:31:54 -06:00
Alan Carvalho de Assis
283b73edc5
Fix lots of typos in C comments and Kconfig help text
2018-07-08 18:24:45 -06:00
Gregory Nutt
a0e169ad7b
net/: Fix a sixlowpan typo bug recently introduced; Rename g_ipv6_allzeroaddre with the more meaning g_ipv6_unspecaddr since the all-zero address is the IPv6 unspecified address (sometime IN6_ADDR_ANY). Remove more inline tests for IPv6 multicast with tcommint net_is_addr_mcast() macro. Update some comments.
2018-06-23 12:53:27 -06:00
Gregory Nutt
01b740c66b
arch/arm/src/efm32: Support for common vector handling is forced for all EFM32 chips. Yes the architecture provides support for the old-style dedicated vector handling which can never be compiled. Furthermore, the old-style dedicated vector handling is deprecated in favor of common vector handling. The commit resolves this inconsistency be removing support for the dedicated vector handling from the EFM32 architecture support.
2018-06-19 13:37:00 -06:00
Gregory Nutt
8fdbb1e0a4
Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t
...
Squashed commit of the following:
sched: Rename all use of system_t to clock_t.
syscall: Rename all use of system_t to clock_t.
net: Rename all use of system_t to clock_t.
libs: Rename all use of system_t to clock_t.
fs: Rename all use of system_t to clock_t.
drivers: Rename all use of system_t to clock_t.
arch: Rename all use of system_t to clock_t.
include: Remove definition of systime_t; rename all use of system_t to clock_t.
2018-06-16 12:16:13 -06:00
Michał Łyszczek
249d7e0d84
drivers/mtd/mtd_config.c: mtdconfig_register() returned OK intead of -ENOMEM on failed malloc
2018-05-08 06:48:00 -06:00
Michael Jung
121211f096
progmem interface: Discern r/w and erase page sizes. Introduce new up_progmem_erasesize architecture API to be able to communicate the read/write page size independently from erase page size. Implement up_progmem_erasesize for all architectures that already support progmem, assuming that for those architectures the sizes of both read/write and erase pages are identical.
2018-05-01 06:23:52 -06:00
lihaichen
a71aa070e7
Merged in lihaichen/nuttx_fix_w25 (pull request #623 )
...
fix w25_cacheflush sector bug.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-04-04 17:04:23 +00:00
Gregory Nutt
987a8298f2
Fix some errors found in build testing + clean-up some issues with last changes to remove use of printf() from within the OS.
2018-03-03 15:51:27 -06:00
Gregory Nutt
b4f2b0dfc6
Remove all usage of printf() from the OS. That is not an acceptable context for the use of an application-oriented interface that depends on a task-specific file descriptor and C buffered I/O.
2018-03-03 15:20:21 -06:00
Gregory Nutt
d1b31d536a
Eliminate a couple more uses of printf() within the OS. There are several more.
2018-03-03 12:59:48 -06:00
Dmitriy Linikov
a8c58607e9
Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603 )
...
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:24:53 +00:00
Gregory Nutt
8572837d9e
Squashed commit of the following:
...
Author: Juha Niskanen <juha.niskanen@haltian.com>
Date: Mon Feb 19 15:03:17 2018 -0600
drivers/mtd: mtd_config.c: Add still more error handling (to detect bad underlying flash implementations)
drivers/mtd: mtd_config.c: Remove MTD_ERASE that was erasing data block instead of erase block. This is a partial revert of 4f18b4. Reported-by: Pascal Speck <iktek01@yahoo.com>
arch/arm/src/stm32l4: stm32l4_flash: change flash programming to use page buffer for unaligned writes.
2018-02-19 15:03:47 -06:00
Gregory Nutt
7cf88d7dbd
Make sure that labeling is used consistently in all function headers.
2018-02-01 10:00:02 -06:00
Alexander Oryshchenko
a7834bcb7b
drivers/mtd/at24xx.c: Correct page size for AT24C02 part.
2018-01-24 06:51:34 -06:00
Ekaterina Kovylova
59a5c24739
drivers/mtd: Add a driver for Macronix MX35LFxGE4AB serial NAND flash.
2017-11-29 07:15:36 -06:00
Gregory Nutt
f3b37e5da3
fs/procfs/fs_procfsprogrem: Add /proc/progmem. This is an alternative way to get the information that was previoulsy available in apps/system/free. apps/system/free was removed beause it made illegal calls into the OS violating the portable interface. This new procfs entry provides the same information with no such violation.
2017-11-13 09:08:39 -06:00
Gregory Nutt
e52bc92238
drivers/mtd/filemtd.c: Don't use file descriptors... Use the internal file system interfaces so that the loop device can be shared across threads.
2017-11-02 17:07:08 -06:00
Gregory Nutt
bc40403516
There was a reference counting problem in the TPC logic of net_clone(). net_clone() which is the common logic underlying dup() and dup2() for sockets. When net_clone() calls net_start_monitor() and net_start_monitor() returns a failure (because the underlying TCP connection) then net_clone() must back out the reference count on the structure. Problem noted by Pascal Speck and this implementation of the solution is based on his suggestion.
2017-10-19 11:09:23 -06:00
Jussi Kivilinna
5ef548677a
drivrs/mtd/filemtd.c: add block device MTD interface. Block MTD interface allows using block device directly as MTD instead of having to use file-system in between. NOTE that this provides the opposite capability of FTL which will let you use an MTD interface directly as a block device.
2017-10-19 09:53:41 -06:00
Gregory Nutt
181875f3ba
fs/vfs: Add new internal OS interface nx_read(). nx_read() is functionally equivalent to read() except that it does not modify the errno variable and it is not a cancellation point. Changed all references to read() in the OS to nx_read().
2017-10-11 12:13:41 -06:00
Gregory Nutt
a00d8e16a1
Adds OS internal function nx_write() which is functionally equivalent to write() except that it does not set the errno variable and do not cause cancellation points.
2017-10-11 10:18:30 -06:00
Gregory Nutt
936df1bcb5
Adds new OS internal functions nxsig_sleep() and nxsig_usleep. These differ from the standard sleep() and usleep() in that (1) they don't cause cancellation points, and (2) don't set the errno variable (if applicable). All calls to sleep() and usleep() changed to calls to nxsig_sleep() and nxsig_usleep().
...
Squashed commit of the following:
Change all calls to usleep() in the OS proper to calls to nxsig_usleep()
sched/signal: Add a new OS internal function nxsig_usleep() that is functionally equivalent to usleep() but does not cause a cancellaption point and does not modify the errno variable.
sched/signal: Add a new OS internal function nxsig_sleep() that is functionally equivalent to sleep() but does not cause a cancellaption point.
2017-10-06 10:15:01 -06:00
Gregory Nutt
9568600ab1
Squashed commit of the following:
...
This commit backs out most of commit b4747286b1
. That change was added because sem_wait() would sometimes cause cancellation points inappropriated. But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.
In the OS, all calls to sem_wait() changed to nxsem_wait(). nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.
In all OS functions (not libraries), change sem_wait() to nxsem_wait(). This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.
sched/semaphore: Add the function nxsem_wait(). This is a new internal OS interface. It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615
Squashed commit of the following:
...
sched/semaphore: Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable. Changed all references to sem_post in the OS to nxsem_post().
sched/semaphore: Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable. Changed all references to sem_destroy() in the OS to nxsem_destroy().
libc/semaphore and sched/semaphore: Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable. Changed all references to sem_setprotocol in the OS to nxsem_setprotocol(). sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552
Squashed commit of the following:
...
libc/semaphore: Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable. Changed all references to sem_getvalue in the OS to nxsem_getvalue().
sched/semaphore: Rename all internal private functions from sem_xyz to nxsem_xyz. The sem_ prefix is (will be) reserved only for the application semaphore interfaces.
libc/semaphore: Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable. Changed all references to sem_init in the OS to nxsem_init().
sched/semaphore: Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.
sched/semaphoate: Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Sebastien Lorquet
9ea215f2e4
Merged in slorquet/nuttx/mt25q (pull request #501 )
...
Add support for Micron MT25Q series MT25Q128
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-02 18:33:54 +00:00
Simon Piriou
b1f50490bd
MTD: Add driver for Macronix QuadSPI flash memory
2017-08-06 10:51:17 -06:00
Gregory Nutt
e8738e1f55
Minor update to some comments.
2017-08-04 09:00:58 -06:00
Gregory Nutt
bbc06dcd8e
RAMTRON: Should be able to select chunked write mode via a configuration option, not by editing the file.
2017-08-04 08:49:07 -06:00
Boris Astardzhiev
79ee0a5209
RAMTRON: Add support for splitting block writes in chunks. Some Re-RAMs like MB85AS4MT has a write buffer size limitation.
2017-08-04 08:12:59 -06:00
Gregory Nutt
95e20afcd2
drivers/: Remove dangling space at the end of lines.
2017-06-28 13:17:17 -06:00
Jussi Kivilinna
4eaa136850
smart: fix wrong freeing of device structure and use-after-free issues on error paths
2017-06-28 07:20:07 -06:00
Jussi Kivilinna
7b8df1b930
mtd/w25: wait for BUSY flag to clear in w25_readid and w25_unprotect. W25Q128 datasheet says that all instructions expect 'Read Status Register' and 'Erase/Program Suspend' are ignored when BUSY flag in status register is '1'. Therefore wait for busy flag to clear in w25_readid() and w25_unprotect().
2017-06-13 07:35:49 -06:00
Jussi Kivilinna
2596b14c90
mtd/w25: add missing locking and fix SPI_SELECT usage for w25_unprotect
2017-06-13 07:33:34 -06:00
Gregory Nutt
0a85a41678
MTD FLASH driver: Clone Sebastien Lorquet's m25px change to at25, is25xp, ramtron, and sst25xx.
2017-06-12 09:51:42 -06:00
Sebastien Lorquet
2851959dee
MTD M2PX: If we READ while a write/erase is pending, the command is ignored and the write/erase continues. If we dont catch this situation we will return garbage to the user because the flash will not execute the command. So READ MUST wait for write completion, and before that, the bus must be locked since it's a precondition to calling waitwritecomplete().
2017-06-12 09:34:09 -06:00
Gregory Nutt
d35a060a41
Revert "MTD: Fix problems in SPI locking in mp25x.c driver. Same problem probably in exists in several other drivers that derive from this this driver as well."
...
This reverts commit 85645284b3
.
2017-06-12 07:23:06 -06:00
Sebastien Lorquet
85645284b3
MTD: Fix problems in SPI locking in mp25x.c driver. Same problem probably in exists in several other drivers that derive from this this driver as well.
2017-06-12 06:38:27 -06:00
Gregory Nutt
670d6a1e8d
MTD FLASH drivers: The byte write method of several drivers had a cloned error: It was not locking the bus while performing byte write operations.
2017-06-06 16:10:41 -06:00
Juha Niskanen
06edfae133
mtd/config: Add some error checks for I/O errors
2017-06-01 06:22:27 -06:00
Jussi Kivilinna
7af5cbb833
drivers/mtd/w25.c: Enable short delay after sector/chip erase
2017-05-31 09:17:58 -06:00
Jussi Kivilinna
8b006e705e
drivers/mtd/w25.c: erase sector only if it is not in erased state
2017-05-31 09:09:24 -06:00
Jussi Kivilinna
c7fcdf968d
mtd/smart: Fix use of uninitialized variable
2017-05-31 09:07:25 -06:00
Gregory Nutt
0de294a586
Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they.
2017-05-11 13:35:56 -06:00
Juha Niskanen
0f7210b0ae
mtd: fix some unallocated and NULL pointer issues. rwb->wrflush and rwb->wrmaxblocks in rwbuffer could get unallocated values from ftl_initialize() in some configurations. Also fixes related assert:
...
up_assert: Assertion failed at file:rwbuffer.c line: 643
that can happen with the following configuration:
CONFIG_FTL_WRITEBUFFER=y
CONFIG_DRVR_WRITEBUFFER=y
# CONFIG_FS_WRITABLE is not set
These problems are caused by CONFIG variable differences between the buffer layers. TODO: This is not a perfect solution. readahead support has similar issues.
2017-05-11 07:22:21 -06:00
Juha Niskanen
58a0b09b82
mtd/config: fix byte read interface test
2017-05-11 07:19:24 -06:00
Juha Niskanen
797e3c3ca4
mtd: build RAMTRON and AT45DB drivers only if selected
2017-05-11 07:17:29 -06:00
Juha Niskanen
4f18b40429
mtd/config: erase block between block read and write
2017-05-10 08:25:39 -06:00
Gregory Nutt
e9a5477506
Add an instance argument to the SPIDEV definitions.
2017-04-29 12:26:52 -06:00
Heesub Shin
a10735b50d
mtd/progmem: fix incorrect target address calculation
...
progmem_read/write() is incorrectly calculating the target address,
expecting the offset argument is given in a block number. This is
completely wrong and as a result invalid flash region is accessed.
Byte-oriented read/write interfaces of mtd device accept the
target address in a byte offset, not a block number.
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2017-03-19 01:11:37 +09:00
Gregory Nutt
a70ea9d3bc
Typos withim mtd/ with Macronix MX25L. In NuttX/drivers/mtd/Make.defs letters X between M and 25 are missing. Noted by Oleg Evseev.
2017-01-30 07:26:38 -06:00
Gregory Nutt
5e0c18b535
Merged in david_s5/nuttx/upstream_2_greg_ramtron (pull request #198 )
...
Adding missing CONFIG_ prefix
2017-01-20 20:48:22 +00:00
David Sidrane
ca895b978b
Adding missing CONFIG_ prefix
2017-01-20 10:45:50 -10:00
Gregory Nutt
08c001196b
drivers/: Remove all explicit use of 'hidden' macro _info. Code must never use this directly. Code must always use a debug macro such as info which is basic on _info but can be appropriately filtered.
2017-01-15 13:00:50 -06:00
Aleksandr Vyhovanec
bf528f2071
packed_struct replaced by begin_packed_struct and end_packed_struct
2017-01-09 14:17:49 +03:00
Gregory Nutt
1793c1f8e1
Trivial, cosmetic change
2016-11-29 15:03:51 -06:00
Gregory Nutt
8dd2494407
Review of last PR: Fix return value (ERROR is not a value return value in this context). Fix some spacing.
2016-11-01 15:13:09 -06:00
Aleksandr Vyhovanec
be1626ad7b
Added EEPROM timeout
2016-11-02 00:03:16 +03:00
Aleksandr Vyhovanec
b0f973d901
MTD: SPI-based driver for Macronix MX25L3233F or MX25L6433F.
2016-09-02 11:00:04 -06:00
Aleksandr Vyhovanec
3f40541b21
MTD: Fixed cloned typos in several FLASH drivers.
2016-09-02 07:27:57 -06:00
Beat Küng
dd1f679891
mtd: Add Fujistu MB85RS256B ramtron support
...
contributed by flatlevel from https://github.com/PX4/NuttX/pull/79
2016-08-23 18:27:04 +00:00
Gregory Nutt
9965cbe428
drivers/: Review and correct some stylistic inconsistencies
2016-08-07 09:43:48 -06:00
Gregory Nutt
10fff9011a
Move include/nuttx/configdata.h to include/nuttx/mtd/configdata.h
2016-07-21 13:34:54 -06:00
Gregory Nutt
46dbbe837e
rwbuffer.h moved from include/nuttx/ to include/nuttx/drivers.
2016-07-20 13:54:38 -06:00
Ken Pettit
39174da3be
Remove naming conflict in drivers/mtd/filemntd.c
2016-07-17 20:19:44 -06:00
Ken Pettit
fea2aaba05
SMART MTD layer: Fixes freesector logic error when sectorsPerBlk=256, adds DEBUGASSERT for invalid geometry and additional memory debug logic. Also fixes the dangling pointer on error bug.
2016-07-14 10:31:28 -06:00
Gregory Nutt
74037a7951
Merged in ziggurat29/nuttx/stm32l4_smartfs_test (pull request #97 )
...
fixes to n25qxxx mtd driver for smartfs support, etc...
2016-07-12 12:16:13 -06:00
ziggurat29
74777499bc
alter the notion of 'blocksize' to be equivalent to 'flash write page size' in order to align with assumptions in the smartfs driver (at least, maybe other things do as well).
...
Correct a bug that was previously masked by having blocksize=eraseblocksize which would cause buffer overflows and delicious hardfaults.
Trivial spelling changes in comments, etc.
2016-07-12 11:46:08 -05:00
Sebastien Lorquet
0d41a1cd42
Before accessing the sst26 flash, the "Global Unlock" command must me executed, which I do in the sst26 driver.
...
BUT. re-reading the datasheet, the WREN instruction is required to enable the execution of this command. This was not done.
I have no idea how the driver currently works except by chance. The writes
should never happen at all, the flash is half-enabled!
2016-07-12 10:34:03 -06:00
Gregory Nutt
5b6fafb3f5
Several MTD FLASH drivers nullify the freed 'priv' structure and failed to return NULL as stated in the comments. Result, will operate on a NULL pointer later. Noted by David Sidrane.
2016-06-30 17:49:53 -06:00
Gregory Nutt
43eb04bb8f
Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info().
2016-06-20 11:59:15 -06:00
Gregory Nutt
0c8c7fecf0
Add _ to the beginning of all debug macros to avoid name collisions
2016-06-16 12:33:32 -06:00
Gregory Nutt
efb02f2ef1
drivers/: Change some nerr() ERRORS to nwarn() WARNINGS. Anomolous network evernts are not errors.
2016-06-12 08:31:22 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
e99301d7c2
Rename *lldbg to *llerr
2016-06-11 14:55:27 -06:00
Gregory Nutt
1cdc746726
Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES
2016-06-11 14:14:08 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Gregory Nutt
3a74a438d9
Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO
2016-06-11 11:50:18 -06:00
Gregory Nutt
5f9bcfd5bf
Trivial changes from review of last PR
2016-06-09 09:36:06 -06:00
Gregory Nutt
03c44c3583
Merged in marten_svanfeldt/nuttx-public/for_upstream/is25 (pull request #44 )
...
Added driver of IS25xP SPI flash devices
2016-06-09 09:30:34 -06:00
Marten Svanfeldt
edeb2eed4e
Added driver of IS25xP SPI flash devices
...
Based on sst25xx driver
Signed-off-by: Marten Svanfeldt <marten@intuitiveaerial.com>
2016-06-09 05:13:06 +02:00
Gregory Nutt
a18dbfda6e
Remove drivers/mtd/flash_eraseall.c. It is not used in the OS and is just a dumb wrapper around the MDIOC_BULKERASE IOCTL call.
2016-06-02 10:44:13 -06:00
Sebastien Lorquet
880b59aa26
Additional configuration option to enable SST26 driver debug output. Using comming FS debug output generates too much output.
2016-05-25 13:43:44 -06:00
Sebastien Lorquet
f4fa4799f7
Add a driver for SST26F spi/qspi flash devices (SPI mode only)
2016-05-10 11:09:15 -06:00
ziggurat29
d3fbd86657
bug in smart.c; return code of smart_scan not checked, can cause success result in failure case, leading to 'dev' pointer being invalid.
2016-04-27 19:33:45 -05:00
Gregory Nutt
e8f0965d35
Mostly cosmetic changes from review of last PR
2016-04-17 14:13:44 -06:00
ziggurat29
1b9d837df3
add MTD support for Micron N25Qxxx family of QSPI flash
2016-04-17 12:20:07 -05:00
Gregory Nutt
84cd720479
FTL: Make it clear the the unlink method has not been implemented
2016-04-15 07:03:28 -06:00
Paul A. Patience
c62bb9beb1
Fix issues detected by cppcheck
2016-03-22 15:46:47 -04:00
Gregory Nutt
3ef25dc49d
AT24xx: Add logic to unregister from the procfs file system if the driver is uninitialized
2016-03-17 09:55:10 -06:00
Max Neklyudov
1951b9df57
Improve m25px driver
2016-03-17 07:37:45 -06:00
Gregory Nutt
7fa0adff83
Fix a misplaced right bracket
2016-03-08 15:33:33 -06:00
Frank Benkert
4d9c41fd57
AT24XX: Correct address calculation in Multi-Block-Read
2016-03-08 15:31:23 -06:00
Gregory Nutt
0fb035f76b
Standardize some naming in code section comments
2016-02-21 18:09:04 -06:00
Gregory Nutt
009e9f76cb
I2C: Fixes/improvements from last massive I2C commits
2016-02-02 07:13:03 -06:00
Gregory Nutt
69ce24c70c
I2C: Remove the setfrequency method from the interface
2016-02-01 16:31:13 -06:00