Commit Graph

6499 Commits

Author SHA1 Message Date
Bowen Wang 6ea3dcace4 misc/rpmsgdev: fix block mode read/write bug in rpmsgdev
Rpmsg dev server always open the real char device with nonblock mode,
so let client try to read/wrtie the read device every read/write
operation.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-09 19:53:28 +08:00
liwenxiang1 0647b49990 drivers/battery: Fix Goldfish Battery x64 unresponsive interrupt issue
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-09 18:32:29 +08:00
anjiahao fa59adde40 Simplify BOARD_MEMORY_RANGE initialization logic
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-09 15:41:48 +08:00
yangsong8 81d704cd82 gdbstub: support the use of recvbuf and sendbuf
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-10-09 15:41:48 +08:00
anjiahao e007ace00d gdbstub:support only use gdbstub when panic
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-09 15:41:48 +08:00
lipengfei28 15126945cd qemu_epc_get_msi: flag should use msi enable flag
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-09 15:07:37 +08:00
yangsong8 954e84c82a usb: If usb3.0, set the ep0 sssize to cfgdescsize
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-10-09 14:19:16 +08:00
wanggang26 ecc2d473e3 mmcsd: add multi partitions prototype implementation
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-09 13:57:07 +08:00
lipengfei28 42041a428c include/nuttx.h: add common align definitions for nuttx
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-09 13:52:01 +08:00
lipengfei28 4ebf830bbd userspace: Exclude nuttx/arch.h
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-09 13:52:01 +08:00
Bowen Wang acbe19d744 pci_drivers: move qemu edu and test device header content to pci_drivers.h
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-09 13:52:01 +08:00
lipengfei28 1ce6ec7c65 declare pci_dev_register
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-09 13:52:01 +08:00
lipengfei28 bc6cd326b8 pci test drv is pci rc drv not pci ep drv
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-09 13:52:01 +08:00
Bowen Wang 23b40818cb misc/dev_mem: fix compile error in aarch64
misc/dev_mem.c:203:24: error: comparison between two arrays [-Werror=array-compare]
  203 |   bool merge = (_edata == _sbss);
      |                        ^~
misc/dev_mem.c:203:24: note: use '&_edata[0] == &_sbss[0]' to compare the addresses

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-09 12:11:20 +08:00
Xiang Xiao b068e2357a circbuf: Move from mm/circbuf to libs/libc/misc
so that it can be used by userspace program.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-09 08:41:49 +08:00
xuxingliang 5dffc61097 sched/note: add wdog note for segger sysview
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-09 08:39:58 +08:00
xuxingliang bc5a337a58 sched/note: add note for wdog module
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-09 08:39:58 +08:00
chenzhijia 5f2bd4c655 drivers/coresight:Add TRFCR_EL1 initialization
Add TRFCR_EL1 initialization in ETM4 driver

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-09 08:37:48 +08:00
chenzhijia 6f8501e564 nuttx/drivers:Fix coresight compilation error
CC:  coresight/coresight_etm4.c coresight/coresight_etb.c: In function 'etb_open':
coresight/coresight_etb.c:334:19: error: implicit declaration of function 'enter_critical_section' [-Werror=implicit-function-declaration]
  334 |           flags = enter_critical_section();
      |                   ^~~~~~~~~~~~~~~~~~~~~~
coresight/coresight_etb.c:346:11: error: implicit declaration of function 'leave_critical_section' [-Werror=implicit-function-declaration]
  346 |           leave_critical_section(flags);
      |           ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-09 08:37:48 +08:00
chenzhijia a443a37390 drivers/coresight:ETM4 setup
Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-09 08:37:48 +08:00
chenzhijia 48a5419005 drivers/coresight:Add caps member to coresight_desc_s for etr
Add caps member to coresight_desc_s for etr and fix etr compilation error

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-09 08:37:48 +08:00
chenzhijia 49ad5e05d5 drivers/coresight:Fix coresight_replicator.c compilation error
Fix coresight_replicator.c compilation error, ret is not initialized

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-09 08:37:48 +08:00
ligd 6dc08ee681 pci: fix compile failed, fdt_get_reg_base() need 3 args
goldfish: fix compile failed, fdt_get_irq_by_path() need 4 args

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-09 02:18:49 +08:00
Bowen Wang ba18f87a9e devicetree/fdt: fix fdt_get_reg_size() get wrong size
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-09 02:18:49 +08:00
zhengyu9 323e2518d9 drivers/devicetree/fdt: get 'reg' property
Original code can only deal with single 'address & size' cell
Add function dealing with multiple 'address & size' cell
Add function getting 'bankwidth' property, for cfi-flash device

Signed-off-by: zhengyu9 <zhengyu9@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-09 02:18:49 +08:00
likun17 a9c1684a1e usensor.c:fix container_of member error.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-09 01:33:19 +08:00
wangmingrong1 1fdb3f5107 notesnap_driver.c: modify struct notesnap_s member type
clang atomic no support other type:
modify .index type size_t --- atomic_int
modify .dumping type bool --- atomic_bool

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-08 23:48:32 +08:00
yezhonghui c90b654598 release msi/msix irq clean capability struct
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-10-08 23:47:45 +08:00
wangshaoxin 6feec8e4c5 rpmsg_port.c:add rpmsg_port_dump function
[01/01 00:02:48] [187] [ EMERG] [ap] Remote: wit
[01/01 00:02:48] [187] [ EMERG] [ap] ept NS
[01/01 00:02:48] [187] [ EMERG] [ap] ept rpmsg-sensor
[01/01 00:02:48] [187] [ EMERG] [ap] ept rpmsg-ping
[01/01 00:02:48] [187] [ EMERG] [ap] rpmsg_port queue RX: {used: 0, avail: 5}
[01/01 00:02:48] [187] [ EMERG] [ap] rpmsg buffer list:
[01/01 00:02:48] [187] [ EMERG] [ap] rpmsg_port queue TX: {used: 4, avail: 0}
[01/01 00:02:48] [187] [ EMERG] [ap] rpmsg buffer list:
[01/01 00:02:48] [187] [ EMERG] [ap]  TX buffer 0x619b84a8 hold by rpmsg-ping
[01/01 00:02:48] [187] [ EMERG] [ap]  TX buffer 0x619b86a8 hold by rpmsg-ping
[01/01 00:02:48] [187] [ EMERG] [ap]  TX buffer 0x619b88a8 hold by rpmsg-ping
[01/01 00:02:48] [187] [ EMERG] [ap]  TX buffer 0x619b8aa8 hold by rpmsg-ping

Signed-off-by: wangshaoxin <wangshaoxin@xiaomi.com>
2024-10-08 23:34:50 +08:00
Xu Xingliang f51a9d5ac5 drivers/fb: use ENOTTY to replace assert
Some drivers may not implement certain ioctls, but applications
may still call these ioctl functions for consistency.
In this case, to avoid an assertion, return ENOTTY.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-10-08 23:23:26 +08:00
jianglianfang 7db5e6bdb0 driver: add GOLDFISH_GPU_FB_PRIORITY for goldfish_gpu_fb_vsync_thread
We need to configure the priority of FB Vsync thread to prevent nxcamera from preempting scheduling without sleep, which currently causes issues with Goldfish x86_64's default FIFO scheduling.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-10-08 23:23:08 +08:00
Jouni Ukkonen b4de080b1f usbdev/cdcacm: Fix read queue counter in shutdown
nrdq is already set 0 in resetconfig.

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-10-08 22:28:51 +08:00
zhanghongyu 948d51cd67 e1000: add polling mode support for tx/rx
In scenarios that require high time accuracy, we do not want an
interrupt from the NIC to interrupt the current task, so add support
for polling mode.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-08 13:15:31 +02:00
Bowen Wang 064eb5fd35 rpmsg services: should release the tx buffer when rpmsg_send_nocopy failed
Otherwise, the tx buffer will be discarded and can no longer be obtained

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 18:26:39 +08:00
lipengfei28 fa5fef2b95 pci: msi and msix irq need release irq
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-08 18:04:13 +08:00
buxiasen a6b12eb29c goldfinsh: fix timer compile issue
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 15:27:33 +08:00
ligd 39bfdb95e1 timers: add goldfish timer support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 15:27:33 +08:00
Xiang Xiao 4e5a963443 drivers/net: Register "/dev/net/tun" as tun node too
to compatible with Linux convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-08 11:16:01 +08:00
Xiang Xiao 77821fb7eb net: Remove IFF_DOWN flag to compatible with Linux/*BSD
turn off interface by checking IFF_UP flag isn't set:
https://github.com/apache/nuttx/issues/1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-08 10:15:16 +08:00
ligd aff700f8ca timer: set g_timer.lower after TIMER_START()
in case of up_perf_gettime() get non-start value

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:59:39 +08:00
zhangwenjian 869271f5b8 drivers/note: suport rpmsg transfer channel for note,some note api
need to adapte for rpmsg.

We can transfer note content through rpmsg

Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-08 08:58:43 +08:00
Bowen Wang e8467a9bd5 fdt_virtio_mmio: bug fix, should not return when ret == -ENODEV
-ENODEV is a normal error code for function virtio_register_mmio_device()
because the virtio device is not must be in the mmio register address

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 08:15:00 +08:00
Bowen Wang e83c7aba1c devicetree/fdt_virtio_mmio: implement the fdt_virtio_mmio_devices_register()
So the borad level do not need implement the
register_virtio_devices_from_fdt() again and again.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 08:15:00 +08:00
Bowen Wang 79be76a22c serial/uart_rpmsg: should init the lock before call rpmsg_register_callback
To avoid init the lock after this lock has been used.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-07 20:42:44 +08:00
Bowen Wang 262ccbb068 drivers/uart_rpmsg: add recv lock when received the data from peer
The recv buffer is used both in user thread and rpmsg ept->callback
thread, so add recv lock to protect the recv buffer.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-07 20:42:44 +08:00
yintao a1dc6dc7fc driver/uart_rpmsg: clear transmit buffer when remote exception occurred
Make uart rpmsg work normally when restart the remote core

Signed-off-by: yintao <yintao@xiaomi.com>
2024-10-07 20:42:44 +08:00
ligd 5ff332f936 math: remove is_power_of_2() keep IS_POWER_OF_2()
Caused it may conflict with other platfrom

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 18:39:27 +08:00
xuxingliang 18d5ae20f5 drivers/segger: add heap data plot
Add heap current used to note.
Plot it in segger sysview data plot.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
Neo Xu b3cc564910 drivers/segger: upgrade segger to v356
From V3.5.6 on, data plot is supported.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang 3bfb40f299 drivers/segger: add heap note support
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00