Commit Graph

6411 Commits

Author SHA1 Message Date
Bowen Wang 7afbcc1a62 drivers/vhost: add vhost framework for NuttX
virtio is a framework to implement the virtio drivers
vhost (Virtual Host) is a framework to implement the virtio devices
With the virtio and vhost framework, we can use the virtio drivers
and vhost drivers to implement the cross-core communication.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-03 17:37:40 +08:00
Yongrong Wang d0e4c4436e rpmsg_virtio: move rpmsg virtio cmd definition before the resource table
use reserved[2] in struct resource_table as the command, avoid the
resource table format do not follow the standard.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-03 09:37:24 +08:00
Bowen Wang af6eb7226e drivers/rptun: add cmake support for rptun_secure
1. Add cmake support for rptun_serure;
2. Move rptun_secure.c before rptun_ivshmem.c in Make.defs to follow
   the order in Kconfig.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-03 08:57:46 +08:00
Jukka Laitinen a88693f519 drivers/usbdev/cdcacm.c: Fix compilation issues
Add #ifdef CONFIG_SERIAL_TXDMA/RXDMA in g_uartops init

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-03 08:55:13 +08:00
Jukka Laitinen 5d4d2cbbc8 drivers/usbdev/pl2303.c: Don't let maximum number of bytes in request exceed CONFIG_PL2303_BULKIN_REQLEN
The request length may not exceed CONFIG_PL2303_BULKIN_REQLEN, otherwise buffer overflow will occur

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-03 08:55:13 +08:00
Jukka Laitinen 18526d78eb drivers/usbdev/cdcacm.c: Set reqlen properly according to ep->maxpacket and CONFIG_CDCACM_BULKIN/OUT_REQLEN
The request length may not exceed CONFIG_CDCACM_BULKIN_ lenghts, otherwise buffer overflow will occur

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-03 08:55:13 +08:00
zhaohaiyang1 534114395e char driver CAN: add tx_confirm function in upperCAN driver.
add tx_confirm function in upperCAN driver1

Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-10-02 21:22:07 +08:00
Neo Xu b6d2dc6c54 lcd/st7735: add option to invert display color
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-02 20:52:55 +08:00
zhaohaiyang1 2ebfdf737c add the ability that control CAN transceiver state.
add the ability that control CAN transceiver state in nuttx.

Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-10-01 21:48:50 +08:00
zhaohaiyang1 32b25849fe chardriver upperCAN: support to independent set TX/RX FIFO size.
support to independent set TX/RX FIFO size.

Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-10-01 20:38:31 +08:00
xuxingliang 7044b10c88 task: use get_task_name where possible
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-01 20:38:06 +08:00
Xiang Xiao 73f0c7c51d drivers/mmcsd: Rename mmcsd_read_csd to mmcsd_read_extcsd
since it really read extcsd register not csd register
and remove the temp buffer inside it.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-09-30 21:17:27 +08:00
yangsong8 09030b5d67 cdcacm: config to enable or disable interrupt endpoint
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 20:32:47 +08:00
buxiasen 731af5b42f drivers/pm: pm_smp remove sched_lock
all os-api those have post/wait feature will not allowed in pm_callbacks
and pm_handler, until we support by cpu/tcb sched_lock and add
sched_lock/unlock back here. Then should revert this commit.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 20:23:11 +08:00
buxiasen 46d555e5d4 pm_idle: fix when prepare failed, possible relax error
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 20:23:11 +08:00
buxiasen 43176bbade pm: pm_idle add support for SMP
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 20:23:11 +08:00
Jukka Laitinen 6f7477ab63 drivers/timers/arch_alarm.c: Clean-up oneshot_callback for non-tickless build
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-30 19:23:01 +08:00
xuxingliang 1ec3623b6b serial: add message for FORCE_PANIC
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-09-30 18:21:05 +08:00
dongjiuzhu1 58d233cb42 drivers/sensors/gnss: check invalid nmea statement to avoid parsebuffer overflow
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 17:00:23 +08:00
dongjiuzhu1 9599302f10 drivers/sensors/gnss: using new buffer lock avoid deadlock
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 17:00:23 +08:00
dongjiuzhu1 58fbe31c28 drivers/sensors/gnss: notify user when new data ready
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 17:00:23 +08:00
liaoao e8f9ef022f reset: fix build warning when CONFIG_RESET_RPMSG is not set
Signed-off-by: liaoao <liaoao@xiaomi.com>
2024-09-30 16:43:02 +08:00
Xiang Xiao 8aa42eba20 can: Add more critical section to fix the race condition.
since routines called by IRQ need to be protected in SMP too.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-09-30 16:29:00 +08:00
yangsong8 6290e70212 cdcacm: remove the duplicate code with serial
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
yangsong8 6c71276359 cdcacm: support polling mode in order to work normally in interrupt
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
yangsong8 6161b1ea84 cdcacm: use DMA to rx and tx
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
yangsong8 e3fcabaec2 cdcacm: use serial public APIs
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
yangsong8 b319c27f03 serial: Added APIs for receiving and sending multiple chars
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
zhangkai25 323b6bdea9 Check if the lower half is initialized for af_channel and af_data
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-09-30 15:46:58 +08:00
zhangkai25 e73c32b848 Fix the situation where af_channel is still being read after it is released
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-09-30 15:46:58 +08:00
zhangkai25 bf50899637 Allocate fifosize on demand to optimize memory
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-09-30 15:46:58 +08:00
yezhonghui 85591fc360 pci alloc mis irq support new interface
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-09-30 15:41:28 +08:00
dongjiuzhu1 aa03182bab drivers/usbdev/: don't send setconfig response for xxxx_setup with composite
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 14:06:35 +08:00
dulibo1 f1fc53d7da gpio:add feature for gpio wakeup
1.add pin type to cfg gpio as wake up source
2.add IOEXPANDER_OPTION_WAKEUPCFG for set wake up option

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 08:45:37 +08:00
yezhonghui 6b3f51986d pci ep support msi/msi-x test
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-09-29 22:50:59 +02:00
yintao f45eaa608d rpmsgdev: devpath may exceed RPMSG_NAME_SIZE
Signed-off-by: yintao <yintao@xiaomi.com>
2024-09-28 19:09:54 +08:00
dongjiuzhu1 190fdd18e2 misc/rpmsgdev: get battery info by rpmsgdev
read battery info register by other core

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 19:09:54 +08:00
dongjiuzhu1 22c4a82fa3 rpmsgdev:add support FIOC_FILEPATH for rpmsgdev_ioctl
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 19:09:54 +08:00
chenxiaoyi 065046b2a2 serial: use hostfs read/write on stdio as uart
This is used to implement serial console on instruction set simulator (ISS).

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-09-28 13:53:06 +08:00
dongjiuzhu1 0fb1dc2b93 drivers/pipes: using rmutex to protect pipe and avoid deadlock
nxsem_wait
nuttx/sched/semaphore/sem_wait.c:176
nxmutex_lock
nuttx/libs/libc/misc/lib_mutex.c:204 (discriminator 2)
pipecommon_write
nuttx/drivers/pipes/pipe_common.c:538 (discriminator 2)
file_write
nuttx/fs/vfs/fs_write.c:91
write
nuttx/include/unistd.h:523 (discriminator 2)
nxsig_deliver
nuttx/sched/signal/sig_deliver.c:170 (discriminator 4)
arm_sigdeliver
nuttx/arch/arm/src/armv7-a/arm_sigdeliver.c:107
irq_waitlock
nuttx/sched/irq/irq_csection.c:204
nxsem_post
nuttx/sched/semaphore/sem_post.c:86 (discriminator 2)
nxmutex_unlock
nuttx/libs/libc/misc/lib_mutex.c:339 (discriminator 2)
pipecommon_poll
nuttx/drivers/pipes/pipe_common.c:769
file_poll
nuttx/fs/vfs/fs_poll.c:321
poll_fdsetup
nuttx/fs/vfs/fs_poll.c:194
poll
nuttx/include/sys/poll.h:164
uv_run
apps/system/libuv/libuv/src/unix/core.c:449
adb_hal_run
apps/system/adb/microADB/hal/hal_uv.c:76
adbd_main
apps/system/adb/adb_main.c:157
nxtask_startup
nuttx/libs/libc/sched/task_startup.c:70 (discriminator 2)
nxtask_start
nuttx/sched/task/task_start.c:134

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 13:50:21 +08:00
yezhonghui 786dabfb13 QemuEPC multi function verify for pci
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-09-28 13:39:50 +08:00
yezhonghui db19d00e64 QemuEPC support multi function for pci device
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-09-28 13:39:50 +08:00
lipengfei28 39ec3291ee armv7a pci irq support
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-28 13:34:33 +08:00
Bowen Wang 6d4cab62fd pci/pci_ecam: add read_io/write_io for pci ecam
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-28 13:34:33 +08:00
yezhonghui f6db814804 pci: add pci endpoint test driver
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-09-28 13:13:37 +08:00
yangguangcai 9a84484df5 capture:add multiple register.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-09-28 13:11:52 +08:00
yangguangcai fd47add2a3 capture:add CAPIOC_ALL for ioctl.
When monitoring multiple capture channels, the `ioctl` function
is called three times, leading to significant overhead mainly due
to VFS and `nxmutex_lock/unlock`. Adding a new interface can save
the overhead of two `ioctl` calls.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-09-28 13:11:52 +08:00
Bowen Wang 23a4a23397 devicetree/fdt_pci: implement the fdt_pci_ecam_register()
So the borad level do not need implement the
pci_ecam_register_from_fdt() again and again.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-28 11:51:33 +08:00
nuttxs c0403ed768 1.xtensa/esp32s3: configure the number of universal management
(IEEE) MAC addresses when there are multipleinterfaces.
2.Optimize Lan9250 to adapt to ESP32S3 universalMAC address.
2024-09-28 11:47:24 +08:00
dongjiuzhu1 b5713fd7f4 drivers/sensor: remove frequent logs
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 11:39:54 +08:00