Commit Graph

44824 Commits

Author SHA1 Message Date
ligd
86a496d6ff rptun: forward panic/reset to lowerhalf
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
bae9a97d31 openamp: add openamp patches
0006-openamp-fix-scenario-case.patch
0007-openamp-divide-shram-to-TX-shram-RX-shram.patch
0008-rpmsg_virtio-don-t-need-check-status-when-get_tx_pay.patch

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
759898c090 rptun: add ping rpmsg support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
a19aef4d36 rptun: enable rx interrupts for virtq
use wait_tx_buffer method need enable rx interrupts

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
1c7e59eafa rptun: pm_stay when send msg & pm_relax when all tx buffer returned
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
f0ba2f0286 rptun: add rptun dump support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
5599f4e24a rptun: divide shram to TX & RX
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
be49f6b87c rptun: add rpmsg_wait/post support for recursive dispatch
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
7471d096cc rptun: add rptun_panic for both master & salve
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
c9404e2705 rptun: use HPWORK instead of thread
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
3ab7ade4ba rptun: add rptun_reset support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
7aba7c3790 rptun: add rptun_force_panic support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
5b6b748f6d rptun: set rptun thread default stack size to 4K
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
田昕
4071f460b2 boards/boardctl:common boardctl to read reset cause.
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-03-30 09:59:10 +03:00
Jiuzhu Dong
ca8ce37433 fs/romfs: fix bug about compare path with same prefix
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-30 09:04:57 +03:00
Alin Jerpelea
3ed4496a76 documentation: Add release notes for 10.3.0 release
This is a local copy taken from the confluence notes
https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.3

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-30 11:19:52 +08:00
Gustavo Henrique Nihei
e1f28c19c2 arch/arm: Make CXX exception and RTTI depend on Kconfig options
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Gustavo Henrique Nihei
7b4d9f0afd esp32[s2/s3/c3]: Add defconfigs for testing C++
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Gustavo Henrique Nihei
0bd436c8db libcxx: Fix libc++ for archs without conditional load/store support
This commit brings a patch already merged to upstream LLVM project:
https://reviews.llvm.org/D118391

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Gustavo Henrique Nihei
8a215b60af libcxx: Add patch for preventing redefinition of PS macro on Xtensa
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Gustavo Henrique Nihei
06d0a9f1ad xtensa|risc-v: Make CXX exception and RTTI depend on Kconfig options
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Gustavo Henrique Nihei
a0617177e8 risc-v/esp32c3: Fix inclusion of C++ constructors/destructors table
RISC-V GCC is configured with --enable-initfini-array so it emits an
.init_array section instead of .ctors

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Gustavo Henrique Nihei
c7311829e0 xtensa: Build OS-assisted atomic operations on ESP32-S2
ESP32-S2 lacks support for conditional load/store instructions.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Gustavo Henrique Nihei
7926bce26b xtensa: Move XCHAL_SWINT_CALL definition into syscall header
This is required to avoid the interface header (syscall.h) depending on
the xtensa_swi.h header from the implementation

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Lee Lup Yuen
416ec42077 riscv/esp32c3: Remove check for LCD driver
## Summary

`esp32c3_spi2_cmddata()` implements SPI Cmd/Data `SPI_CMDDATA()` for only 3 LCD drivers: ST7735, ST7789 and GC9A01.

This patch removes the check for LCD drivers, so that SPI Cmd/Data will work for all LCD drivers.

More details: https://github.com/apache/incubator-nuttx/pull/5898

## Impact

This change impacts LCD drivers that call `SPI_CMDDATA()`.

Previously `SPI_CMDDATA()` would fail with `ENODEV` for LCD drivers other than ST7735, ST7789 and GC9A01.

After patching, `SPI_CMDDATA()` will work correctly with all LCD drivers.

## Testing

This is a minor patch so no testing is needed.
2022-03-29 23:09:57 -03:00
Lee Lup Yuen
4456b13c19 riscv/bl602: Remove check for LCD driver
## Summary

`bl602_spi_cmddata()` implements SPI Cmd/Data `SPI_CMDDATA()` for only 3 LCD drivers: ST7735, ST7789 and GC9A01.

This patch removes the check for LCD drivers, so that SPI Cmd/Data will work for all LCD drivers.

More details: https://github.com/apache/incubator-nuttx/pull/5898

## Impact

This change impacts LCD drivers that call `SPI_CMDDATA()`.

Previously `SPI_CMDDATA()` would fail with `ENODEV` for LCD drivers other than ST7735, ST7789 and GC9A01.

After patching, `SPI_CMDDATA()` will work correctly with all LCD drivers.

## Testing

We tested with LVGL and ST7789 on PineCone BL602:

-   [Testing with LVGL](https://github.com/lupyuen/st7789-nuttx#run-lvgl-demo)

As for regular SPI Devices that don't require SPI Cmd/Data, we tested `CONFIG_SPI_CMDDATA=y` with Semtech SX1262 SPI Transceiver on PineCone BL602:

-   [Testing Cmd/Data](https://github.com/lupyuen/incubator-nuttx/releases/tag/release-2022-03-30)
2022-03-29 23:09:42 -03:00
ligd
e9f17947b7 task: don't set default signal in kernal thread
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:53:14 +09:00
ligd
0c1f63625a signal: Don't do schedule_sigaction when there is no action
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:53:14 +09:00
chao.an
a98a599cb9 arm/cortex-[a|r]: IRQ Switch return should with shadow SPSR
The SPSR is used to store the current value of the CPSR when an exception
is taken so that it can be restored after handling the exception.
Each exception handling mode can access its own SPSR.

User mode and System mode do not have an SPSR because they are not
exception handling modes.

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-30 08:12:26 +09:00
ligd
b0e0f9db68 opendir: use inode_find() instead when opendir()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 03:33:39 +08:00
Richard Tucker
dc93c309b5 boards/risc-v/litex/arty_a7: update README to include building in LITESDCARD peripheral 2022-03-30 02:35:27 +08:00
Richard Tucker
3939575d7c boards/risc-v/litex/arty_a7: add SDCARD support for the Arty_A7 board 2022-03-30 02:35:27 +08:00
Richard Tucker
6d8cd4ec92 arch/risc-v/src/litex/litex_sdio: add litesdcard peripheral driver
See the following for details on the pepheral:
https://github.com/enjoy-digital/litesdcard
2022-03-30 02:35:27 +08:00
Richard Tucker
163e3fd93c driver/mmcsd: add option to support SD/MMC PHYs that only run in 4-bit mode 2022-03-30 02:35:27 +08:00
Richard Tucker
d557b87b25 arch/risc-v/litex: add cache_invalidate 2022-03-30 02:35:27 +08:00
Lee Lup Yuen
4f885fe6bf riscv/bl602: Implement SPI Cmd/Data
## Summary

To control the Data/Command Pin on ST7789 SPI Display, the SPI Driver flips the MISO Pin as though it was a GPIO.

To implement this on BL602, we reconfigure MISO from SPI Pin to GPIO Pin on the fly inside `bl602_spi_cmddata()`.

When the SPI Port is deselected (after the SPI operation), we revert MISO back from GPIO Pin to SPI Pin. We implement this inside `bl602_spi_select()`.

[More Details Here](https://github.com/lupyuen/st7789-nuttx#spi-cmddata)

## Impact

This change impacts 3 LCD drivers that call `SPI_CMDDATA()`: ST7735, ST7789, GC9A01.

Previously the BL602 SPI Driver would fail with "SPI cmddata not supported" when the above drivers are used.

After the change, the above drivers will set the LCD Data/Command Pin correctly.

## Testing

We tested this implementation of SPI Cmd/Data with NuttX ST7789 Driver and a Logic Analyser on PineCone BL602:

-   [Testing with Logic Analyser](https://github.com/lupyuen/st7789-nuttx#spi-cmddata)

We also tested LVGL with ST7789 on PineCone BL602:

-   [Testing with LVGL](https://github.com/lupyuen/st7789-nuttx#run-lvgl-demo)

As for regular SPI Devices that don't require SPI Cmd/Data, we tested `CONFIG_SPI_CMDDATA=y` with Semtech SX1262 SPI Transceiver on PineCone BL602:

-   [Testing Cmd/Data](https://github.com/lupyuen/incubator-nuttx/releases/tag/release-2022-03-29)
2022-03-30 02:01:29 +08:00
Huang Qi
904f7aabda arch/risc-v: Use riscv_fpuconfig to enable FPU
Use common function instead of chip specified code.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-30 01:33:04 +08:00
Huang Qi
20c511fcf1 arch/risc-v: Rename up_fpuconfig to riscv_fpuconfig
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-30 01:33:04 +08:00
ligd
d09be7d658 workqueue: add work_foreach support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 18:03:08 +08:00
tianxin7
b53bbb15c5 fs:add _POSIX_OPEN_MAX limit to files_extend
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-03-29 17:51:20 +08:00
zhuyanlin
0460367a70 irq_csection: fix assert warning
constant 65535 with expression of type 'int16_t' (aka 'short')
is always true

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-03-29 13:44:01 +08:00
ligd
7619d2a6f9 syslog: fix syslog print twice when active assert
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 12:20:37 +08:00
ligd
b6e0614be6 syslog: use & instead of % when calculate offset
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 12:20:37 +08:00
ligd
61cb79d192 syslog_rpmsg: change head & tail NON-wrap
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 12:20:37 +08:00
Petro Karashchenko
f5665db1f2 boards: correct path to RCRAWS files during file copy
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-29 12:11:09 +08:00
Xiang Xiao
37d7298f34 fs/littlefs: Convert the lfs_file_size error code to POSIX's
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-29 10:11:13 +08:00
Jiuzhu Dong
1146ff2f61 littlefs: unify lfs error code to nuttx
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-29 10:11:13 +08:00
ligd
ed8704d90e sim/rptun: rsc must set rpmsg_vdev.config_len
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 10:10:33 +08:00
ligd
1796663e08 rpmsg_socket: fix kasan report error
==1598322==ERROR: AddressSanitizer: heap-use-after-free on address 0xf514f8a8 at pc 0x58ac3898 bp 0xd0b4d488 sp 0xd0b4d478
READ of size 4 at 0xf514f8a8 thread T0
    #0 0x58ac3897 in rpmsg_socket_pollnotify rpmsg/rpmsg_sockif.c:211
    #1 0x58ac512f in rpmsg_socket_ept_cb rpmsg/rpmsg_sockif.c:312
    #2 0x5787881c in rpmsg_virtio_rx_callback open-amp/lib/rpmsg/rpmsg_virtio.c:331
    #3 0x57886a67 in virtqueue_notification open-amp/lib/virtio/virtqueue.c:623
    #4 0x5786fb89 in rproc_virtio_notified open-amp/lib/remoteproc/remoteproc_virtio.c:340
    #5 0x5786bde3 in remoteproc_get_notification open-amp/lib/remoteproc/remoteproc.c:985
    #6 0x57755a50 in rptun_worker rptun/rptun.c:303
    #7 0x57755e51 in rptun_thread rptun/rptun.c:352
    #8 0x57730d4a in nxtask_start task/task_start.c:128
    #9 0xdeadbeee  (/memfd:pulseaudio (deleted)+0x15dbeee)

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 10:09:49 +08:00
ligd
a1eb3f66fa rexec: fix free error in error handing
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 10:09:04 +08:00