Summary:
- This commit fixes IRQ control for the following use case
- The gs2200m Wi-Fi driver requests SPI-DMA to receive a packet.
- cxd56_dma.c enables IRQ for the SPI-DMA and start transfer.
- Then LCD driver requests SPI-DMA to display an image.
- These SPI-DMAs use different DMA channels but share the DMA controller.
- Also, they share the same IRQ.
- When the first SPI-DMA finishes the transfer, it disables the IRQ.
- And if the second SPI-DMA finishes the transfer just after the IRQ disabled.
- The second SPI-DMA will be in a deadlock condition.
- To resolve this issue, do not control IRQ during DMA transfer.
- Instead, up_enable_irq() is called in up_dma_initialize()
Impact:
- All use cases which use DMA
Testing:
- Tested with spresense:wifi with LCD
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
configuration changes
According to the usage documentation, [-e] option should "enforce
distclean if already configured". This behavior was broken due to the -e
option being evaluated only if the current defconfig is different from
the backup defconfig. The new -E command inherits this behavior.
Summary:
- This commit refactors stm32_gs2200m.c
- gs2200m_irq_enable() and gs2200m_irq_disable() are now symmetric.
Impact:
- All use cases which use the gs2200m driver.
Testing:
- Tested with stm32f4discovery:wifi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- This commit refactors cxd56_gs2200m.c
- gs2200m_irq_enable() and gs2200m_irq_disable() are now symmetric.
Impact:
- All use cases which use the gs2200m driver.
Testing:
- Tested with spresense:wifi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
When CONFIG_MMCSD_MULTIBLOCK_DISABLE is lit, all SD
read/write failed. The function return the number of
blocks in `ret`, set on entry to nsectors. That was
then wiped out by using the ret for the mmcsd_takesem.
Since the code had many path setting return, the choices for
the fix could have been add a new varaible or simple init it
were used. I choose the latter.
and enable on sim as a demo. Here is the paper:
ftp://gcc.gnu.org/pub/gcc/summit/2003/Stackguard.pdf
Signed-off-by: qiaowei <qiaowei@xiaomi.com>
Change-Id: I1926936328dad54eee16b322dcaad0b42f9c4a62
boards: metro-m4 Add support for starting the watchdog timer on the metro-m4.
Testing:
- Build check only
Signed-off-by: Leomar Mateus Radke <leomar@falker.com.br>
Linux Programmer's Manual
NAME
epoll_create, epoll_create1 - open an epoll file descriptor
...
SYNOPSIS
#include <sys/epoll.h>
int epoll_create1(int flags);
...
epoll_create1()
If flags is 0, then, other than the fact that the obsolete
size argument is dropped, epoll_create1() is the same as
epoll_create(). The following value can be included in flags
to obtain different behavior:
EPOLL_CLOEXEC
Set the close-on-exec (FD_CLOEXEC) flag on the new file
descriptor. See the description of the O_CLOEXEC flag in
open(2) for reasons why this may be useful.
https://man7.org/linux/man-pages/man7/epoll.7.html
sync the struct epoll_event define with linux:
Linux Programmer's Manual:
DESCRIPTION
EPOLL_CTL_DEL
...
The event argument describes the object linked to the file descriptor
fd. The struct epoll_event is defined as:
typedef union epoll_data {
void *ptr;
int fd;
uint32_t u32;
uint64_t u64;
} epoll_data_t;
struct epoll_event {
uint32_t events; /* Epoll events */
epoll_data_t data; /* User data variable */
};
https: //man7.org/linux/man-pages/man2/epoll_ctl.2.html
Change-Id: I3ad447b485fd331190e461a198ef7c39301eb1bb
Signed-off-by: chao.an <anchao@xiaomi.com>
flush the dirty sector to keep the sector sequence before ftl write
Change-Id: I1096cce39965806d5c877c2929b5a2ecdab27ac9
Signed-off-by: chao.an <anchao@xiaomi.com>
it is useful to pass the nonempty argument to change the init task behaviour
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I684e9c76b9eac54404d0e4e63ab78e51e039c9a8
since these function don't depend on standard input/output function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I011a387a1e2c1360e8f37716d512bd32f93ad467
Summary:
- This commit adds SMP support to cxd56_farapi.c
- nxplayer now works in SMP mode
Impact:
- Spresense in SMP mode only
Testing:
- Add the following configs to spresense:wifi
- +CONFIG_SCHED_INSTRUMENTATION=yy
- +CONFIG_SCHED_INSTRUMENTATION_BUFFER=y
- +CONFIG_SMP=y
- +CONFIG_SMP_NCPUS=2
- +CONFIG_SPINLOCK_IRQ=y
- Run nxplayer and play an WAV file on uSD card
- NOTE: http streaming playback would cause deadlocks
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Fixes:
##[error]net/tun.c:837:13: error: conflicting types for 'tun_poll_expiry'
837 | static void tun_poll_expiry(FAR void *arg)
| ^~~~~~~~~~~~~~~
net/tun.c:196:13: note: previous declaration of 'tun_poll_expiry' was here
196 | static void tun_poll_expiry(wdparm_t arg);
| ^~~~~~~~~~~~~~~
And
##[error]net/tun.c:881:57: error: passing argument 4 of 'wd_start' makes integer from pointer without a cast [-Werror=int-conversion]
881 | wd_start(&priv->txpoll, TUN_WDDELAY, tun_poll_expiry, priv);
| ^~~~
| |
| struct tun_device_s *
In file included from /github/workspace/sources/nuttx/include/nuttx/sched.h:41,
from /github/workspace/sources/nuttx/include/sched.h:34,
from /github/workspace/sources/nuttx/include/nuttx/arch.h:81,
from net/tun.c:60:
/github/workspace/sources/nuttx/include/nuttx/wdog.h:134:42: note: expected 'wdparm_t' {aka 'long unsigned int'} but argument is of type 'struct tun_device_s *'
134 | wdentry_t wdentry, wdparm_t arg);
| ~~~~~~~~~^~~
And
chip/cxd56_rtc.c: In function 'up_rtc_initialize':
##[error]chip/cxd56_rtc.c:358:3: error: too many arguments to function 'cxd56_rtc_initialize'
358 | cxd56_rtc_initialize(1, NULL);
| ^~~~~~~~~~~~~~~~~~~~
chip/cxd56_rtc.c:253:13: note: declared here
253 | static void cxd56_rtc_initialize(wdparm_t arg)
| ^~~~~~~~~~~~~~~~~~~~
boards: metro-m4 Add support for starting the watchdog timer on the metro-m4.
Testing:
- Build check only
Signed-off-by: Leomar Mateus Radke <leomar@falker.com.br>