zhangwenjian
d469216653
note:fix syscall note compile error
...
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-13 14:05:50 +08:00
zhangwenjian
149b1f186e
drivers/note:add the api of sched_note_add
...
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-13 14:05:50 +08:00
zhangwenjian
7aa1871664
note:support filter for each note channel
...
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-13 14:05:50 +08:00
yinshengkai
c018be66bd
note: merge nc_systime_nsec and sec
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 14:05:50 +08:00
zhaoxingyu1
0be1196046
note_driver: time_t outputs in 64-bit format
...
Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2024-10-13 14:05:50 +08:00
cuiziwei
19851c0979
note: Move the instrument register to note_initialize
...
avoid the instrument doesn't get registered in some case
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 14:05:50 +08:00
Xiang Xiao
08829bd388
mtd/nvs: Trigger recovery process in nvs_startup
...
when mtd driver return -EBADMSG
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-13 03:10:19 +08:00
Xiang Xiao
7b2dbcf50a
drivers/optee: Return error if optee_recv return prematurely
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-13 02:48:29 +08:00
Bowen Wang
143466baed
drivers/pci: fix pci framework warning in 32bit chip
...
In file included from pci/pci.c:30:
pci/pci.c: In function 'pci_setup_device':
pci/pci.c:449:66: warning: right shift count >= width of type [-Wshift-count-overflow]
449 | pci_write_config_dword(dev, base_address_1, res->start >> 32);
| ^~
pci/pci.c: In function 'pci_presetup_bridge':
pci/pci.c:541:51: warning: right shift count >= width of type [-Wshift-count-overflow]
541 | ctrl->mem_pref.start >> 32);
| ^~
pci/pci.c: In function 'pci_postsetup_bridge':
pci/pci.c:604:57: warning: right shift count >= width of type [-Wshift-count-overflow]
604 | (ctrl->mem_pref.start - 1) >> 32);
| ^~
CC: pthread/pthread_release.c pci/pci_ecam.c:71:12: warning: initialization of 'int (*)(struct pci_bus_s *, unsigned int, int, int, uint32_t *)' {aka 'int (*)(struct pci_bus_s *, unsigned int, int, int, long unsigned int *)'} from incompatible pointer type 'int (*)(struct pci_bus_s *, uint32_t, int, int, uint32_t *)' {aka 'int (*)(struct pci_bus_s *, long unsigned int, int, int, long unsigned int *)'} [-Wincompatible-pointer-types]
71 | .read = pci_ecam_read_config,
| ^~~~~~~~~~~~~~~~~~~~
pci/pci_ecam.c:71:12: note: (near initialization for 'g_pci_ecam_ops.read')
pci/pci_ecam.c:72:12: warning: initialization of 'int (*)(struct pci_bus_s *, unsigned int, int, int, uint32_t)' {aka 'int (*)(struct pci_bus_s *, unsigned int, int, int, long unsigned int)'} from incompatible pointer type 'int (*)(struct pci_bus_s *, uint32_t, int, int, uint32_t)' {aka 'int (*)(struct pci_bus_s *, long unsigned int, int, int, long unsigned int)'} [-Wincompatible-pointer-types]
72 | .write = pci_ecam_write_config,
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-13 02:28:32 +08:00
xuxin19
4667163152
cmake:add driver thermal CMake scripts
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-13 02:25:06 +08:00
Xiang Xiao
a5aea61537
driver: Post sempahore only when it's value is smaller than one
...
to avoid waking up the waiting thread redundantly.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-13 02:12:01 +08:00
fangpeina
3f1fd42f73
drivers/input: fix complie err about undefined
...
There will be compilation errors about undefined reference to `enter_critical_section'.
Fixed by include irq.h
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2024-10-13 02:03:40 +08:00
wangyongrong
ad2e6fb2ba
pci_ivshmem.c: ivshmem_support_irq API support
...
ivshmem based driver can use this api to judge weather current
ivshmem device support irq or not, and use polling mode or irq
mode to process the event.
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-12 12:13:23 +08:00
Bowen Wang
99b6c77c79
drivers/rptun: minor fix about rptun
...
1. follow the nxstyle, change formot of rptun_init();
2. remove used wqueue header file;
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-12 12:12:00 +08:00
xuxingliang
62f0126b06
drivers/segger: add note vprint support
...
Print note log to sysview terminal.
See https://www.segger.com/products/development-tools/systemview/#logging-output
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-12 09:58:00 +08:00
buxiasen
c4f82c1f66
drivers/timer: fix goldfish timer did not included in cmake
...
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-12 09:31:15 +08:00
buxiasen
9ea38368ad
goldfish_timer: fix interrupt not cleared
...
will cause a loop interrupt handler, in some new version qemu
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-12 09:31:15 +08:00
ligd
3479622fec
serial: use nxsig_tgkill instead of nxsig_kill
...
Caused nxsig_tgkill is for the one thread, nxsig_kill for the group
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 09:30:37 +08:00
Bowen Wang
313d6df787
include/nuttx.h: replace all the align macros to nuttx version
...
1. add IS_ALIGNED() definitions for NuttX;
2. replace all the ALIGN_UP() and ALIGN_DOWN() to use common
align implementation;
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 16:55:43 +08:00
Yongrong Wang
976c4173f0
rpmsg_ping.c: fix msg data memset length
...
The range of memset exceeds the size of the buffer
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang
4b77dd03db
rpmsg_ping.c: change msg cmd type for more compatible
...
Use bit mask method to represent the command, because it's more
convenient to express multiple characteristics simultaneously.
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang
1cf97ac4d0
rpmsg_ping.c: improve log level to LOG_EMERG
...
Usually rpmsg ping logs are needed during testing,
but too many other module logs can easily overwrite it,
so improve the rpmsg ping log level, later we can setlogmask to
a higher log level to mask other modules' logs.
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang
b96ad59d69
rpmsg_ping.c: change check data to fluctuation value
...
We can found the error happend packet more accurately based
on the data value.
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
yinshengkai
c83858bbb6
note: fix note_common unaligned access
...
Data in ARMV8-M may be aligned with less than 4 bytes, resulting in USAGE FAULT
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
464d284587
drivers/note: simplify notesnap_dump logic
...
RTOSXMDPYX-969
Crash at startup, index is 0 will cause loop printing
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
a70175ea06
note: make sched_note_start depend on INSTRUMENTATION_SWITCH
...
In some cases, we only need to use INSTRUMENTATION_DUMP to record custom data,
and we don't want the thread start and end information
Move this part to INSTRUMENTATION_SWTICH for recording
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
453cde945f
note: add note stream drivers
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
43d96a5d9e
note: Increase crash dump buffer
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
zhangwenjian
aec44de921
ICANON mode need echo every bytes
...
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:11:26 +08:00
zhangwenjian
7532a0e833
serial:need check old config before setting tty
...
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:11:26 +08:00
zhangwenjian
df5c876932
libc:getline support backspace
...
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:11:26 +08:00
yinshengkai
ec691cc5e4
tools: prasetrace.py supports parsing syslog
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 01:30:11 +08:00
yinshengkai
211a56910a
syslog: support syslog redirection to sched_note
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 01:30:11 +08:00
ligd
e608d5522d
syslogmask: add default value Kconfig to syslogmask
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 01:30:11 +08:00
yinshengkai
02eb280302
arch/perf: modify the return value of up_perf_gettime to clock_t
...
When using alarm_arch implementation, 64-bit time can be returned. Using unsign long will cause precision loss.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 23:17:14 +08:00
yintao
37a30023f5
nuttx/drivers: add ept_release_cb for destroy server resource
...
use ept_release_cb to destory rpmsg services server dile resource
to avoid the used-after-free issue
Signed-off-by: yintao <yintao@xiaomi.com>
2024-10-10 08:44:29 +08:00
hujun5
e249dd2672
arch: support customized up_cpu_index() in AMP mode
...
Some app with same code runs on different cores in AMP mode,
need the physical core on which the function is called.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-10 02:38:40 +08:00
Bowen Wang
092bdec20b
drivers/serial: support force panic only when repeat the panic char
...
We can increase the panic repeat count to avoid abnormal crashes
caused by serial port interference.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-10 02:38:12 +08:00
Bowen Wang
bbb7f436d4
serial.c: should protect the fds when calling poll_notify
...
1. Use critical_section to protect the fds array;
2. Use critical_section and sched lock to protect the poll notify, because
poll notify may cause context switch, delay the context swtich to
sched_unlock();
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-10 02:38:12 +08:00
ligd
0a70235b0c
serial/pl011: fix can't up_putc() after setup
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 02:38:12 +08:00
ligd
94cc99d01b
serial: fix cu ctrl+c crash
...
__assert
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/libs/libc/assert/lib_assert.c:36
nxsem_recover
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/semaphore/sem_recover.c:86 (discriminator 3)
nxtask_recover
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/task/task_recover.c:79
nxtask_exithook
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/task/task_exithook.c:448
nxtask_terminate
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/task/task_terminate.c:110
pthread_cancel
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/pthread/pthread_cancel.c:110
cu_main
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/apps/system/cu/cu_main.c:485
nxtask_startup
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/libs/libc/sched/task_startup.c:70 (discriminator 2)
nxtask_start
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/task/task_start.c:134
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 02:38:12 +08:00
sunjikun
ee306d47fd
drivers/serial: Add 16550_DLF_SIZE option for DesignWare UART.
...
Signed-off-by: sunjikun <sunjikun@xiaomi.com>
2024-10-10 02:38:12 +08:00
Bowen Wang
89c49c53a7
virtio-mmio/pci: add alloc_buf/free_buf for mmio and pci transport layer
...
And remove the virtio_alloc/free_buf implementation in virtio.c, because
these two apis has been moved to the OpenAMP
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-09 23:32:58 +08:00
wangyongrong
0b1f45d600
rptun: rptun implements notify_wait through rvdev->notify_wait_cb
...
notify_wait has been remove in remoteproc ops and virtio_dispatch and
has been moved to the struct rpmsg_virtio_device in new OpenAMP,
so change the rptun too,
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
Yongrong Wang
1b24139020
virtio-pci/mmio: Features change to 64 bit in all virtio_dispatch and fix compile warning
...
virtio/virtio-pci-legacy.c:399:48: warning: passing argument 2 of ‘pci_bus_write_io_dword’ makes integer from pointer without a cast [-Wint-con>
399 | pci_write_io_dword(vpdev->dev, vpdev->ioaddr + VIRTIO_PCI_GUEST_FEATURES,
| ^
| |
| void *
/home/wyr/work/code/project/vela/nuttx/include/nuttx/pci/pci.h:559:65: note: expected ‘uintptr_t’ {aka ‘long unsigned int’} but argument is of >
559 | int pci_bus_write_io_dword(FAR struct pci_bus_s *bus, uintptr_t where,
| ~~~~~~~~~~^~~~~
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
wangyongrong
5aeb644bc5
virtio: adapt to the new OpenAMP
...
Sync all the virtio api usage to sync with new OpenAMP
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
wangyongrong
8e799ff823
rpmsg: upgrade API passing on parameters with the upgrade of OpenAMP
...
All the rpmsg transport layer and rpmsg services sync the API
with new OpenAMP
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
buxiasen
264252497c
pm: fix pm_wakelock_uninit api block, wd api need irq not disabled
...
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-09 23:31:49 +08:00
dongjiuzhu1
a005f4bff1
drivers/power: using baterr/batinfo to avoid frequency log output
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 23:31:49 +08:00
zhangshengchao
e26a01d9a6
regulator:add bypass logic when registering
...
do not control regulators when set bypass flag
Signed-off-by: zhangshengchao <zhangshengchao@xiaomi.com>
2024-10-09 23:31:49 +08:00
wanggang26
955a3838f7
mmcsd: refine emmc capacity calculate
...
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-09 22:24:18 +08:00
yinshengkai
3271142b87
note: print without relying on format strings
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 22:23:29 +08:00
yinshengkai
b5cf4310cb
gote: implement asynchronous printf formatting
...
Do not format immediately when calling sched_note_printf, but delay formatting until dump trace.
After turning on SYSTEM_NOTE, similar asynchronous syslog functions can be achieved.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 22:23:29 +08:00
liwenxiang1
fa48d9e972
drivers/timers:Arch_alarm and arch_timer add up_ndelay interface
...
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-09 22:11:03 +08:00
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
xuxingliang
ee11d6ca0a
drivers/noteram: fix compile error
...
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang
eac6a8597f
sched/note: add note when mm add new region
...
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang
0663ac1483
sched/note: specify note event for heap instrumentation
...
1. Add NOTE_HEAP_ prefix for heap note event.
2. Use note type as heap instrumentation parameter.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
yinshengkai
79eab8783f
note: add memory tracing event support
...
Record all memory allocation and release, save to ram, used to analyze memory allocation rate and memory usage
Its absolute value is not trustworthy because the memory will be allocated in thread A and released in thread B
netinit-5 [0] 0.105984392: tracing_mark_write: C|5|Heap Usage|96|free: heap: 0x606000000020 size:24, address: 0x603000000370
netinit-5 [0] 0.105996874: tracing_mark_write: C|5|Heap Usage|24|free: heap: 0x606000000020 size:72, address: 0x6070000008e0
nsh_main-4 [0] 3.825169408: tracing_mark_write: C|4|Heap Usage|2177665|free: heap: 0x606000000020 size:424, address: 0x614000000840
nsh_main-4 [0] 3.825228525: tracing_mark_write: C|4|Heap Usage|14977|free: heap: 0x606000000020 size:2162688, address: 0x7f80a639f800
nsh_main-4 [0] 3.825298789: tracing_mark_write: C|4|Heap Usage|15189|malloc: heap: 0x606000000020 size:20, address: 0x6030000003a0
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
ligd
553cf84a7b
audio: update audio null driver
...
fix nxplayer can't start
support capture
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 13:33:34 +08:00
yuanyongjian
6869a05368
syslog/syslog_rpmsg.c: the last log may be lost when it crashes
...
At line 236, we may set the null terminate to the priv->buffer,
when flushing the priv->buffer, we should use up_putc() instead up_nputs()
to ensure all the data has been output, because up_nputs() will check
the null terminate but up_putc() not.
Signed-off-by: yuanyongjian <yuanyongjian@xiaomi.com>
2024-10-07 12:18:10 +08:00
yuanyongjian
9e1750d22c
syslog/syslog_rpmsg.c: out of memory
...
Signed-off-by: yuanyongjian <yuanyongjian@xiaomi.com>
2024-10-07 12:18:10 +08:00
ligd
7567e429b6
syslog_rpmsg: fix coding style
...
Follow the nxstyle
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 12:18:10 +08:00
yuanyongjian
8713638687
syslog/syslog_rpmsg.c: improve syslog_rpmsg performance
...
use copy buffer instead of single assignment
Signed-off-by: yuanyongjian <yuanyongjian@xiaomi.com>
2024-10-07 12:18:10 +08:00
Yongrong Wang
365fed554e
rpmsgblk.c: fix compile warning
...
misc/rpmsgblk.c:616:29: warning: implicit declaration of function ‘rpmsg_virtio_get_buffer_size’; did you mean ‘rpmsg_get_rx_buffer_size’? [-Wimplicit-function-declaration]
616 | if (MAX(msglen, rsplen) > rpmsg_virtio_get_buffer_size(priv->ept.rdev))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| rpmsg_get_rx_buffer_size
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-07 04:18:18 +08:00
Xiang Xiao
7c839d7a09
rptun: Remove include/nuttx/rptun/openamp.h
...
and use include/nuttx/rpmsg/rpmsg.h instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-07 00:44:28 +08:00
Yongrong Wang
26ac220810
virtio devices: update virtqueue operate buffer add lock API
...
1. Use the virtqueue_xxx_lock() api;
2. Add spinlock for some virtio and vhost drivers that do not
use spinlock to protect the virtqueues;
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-06 08:37:53 +08:00
Bowen Wang
fd9efb600c
virtio/virtio-net: add spinlock for the virtqueue
...
virtqueues are used in irq and thread, so add spinlock to protect
them.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-06 08:37:53 +08:00
Bowen Wang
c0edb0f402
virtio/virtio-net: calculate the correct buffer number
...
Avoid exceed the virtqueue length limit when adding buffer to the
virtqueue.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-06 08:37:53 +08:00
wangyongrong
377f184019
virtio-rpmb.c: add spin lock for virtqueue add/get buffer
...
Virtqueeus are used in both user thread and interrupt, so add spinlock
to proetect them.
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-06 08:37:53 +08:00
wangyongrong
e8a8052a8a
virtio-serial.c: add spin lock for virtqueue add/get buffer
...
Virtqueeus are used in both user thread and interrupt, so add spinlock
to proetect them.
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-06 08:37:53 +08:00
wangyongrong
67ceba3cd6
virtio-blk.c: add spin lock to fix get/add virtqueue buffer at the same time err
...
Virtqueues are used in both user thread and interrupt, so add spinlock to protect
them.
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-06 08:37:53 +08:00
wangyongrong
58aca26b1b
virtio-blk.c: change virtio blk req and resp to local variables
...
So we can remove the mutex lock to improve the virtio-block driver
performance
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-06 08:37:53 +08:00
wangyongrong
735dc6e2bf
virtio-rng.c: add spin lock to fix get/add virtqueue buffer at the same time err
...
the virtqueue should be protected by the spinlock, because the virtqueues are used
both in worker and interrupt.
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-06 08:37:53 +08:00
wangyongrong
f6f151a8e1
virtio-blk: add VIRTIO_BLK_F_BLK_SIZE feature
...
Support configure the virtio block device block size to other value
(default value is 512)
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-06 08:37:53 +08:00
wangyongrong
ef58c71582
virtio-blk: add VIRTIO_BLK_F_RO feature
...
When feature VIRTIO_BLK_F_RO is set, virtio-blk only support read
operation.
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-06 08:37:53 +08:00
wangyongrong
7ec167392c
virtio-blk: add VIRTIO_BLK_F_FLUSH features
...
Should support the flush command only when virtio device support
feature VIRTIO_BLK_F_FLUSH
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-06 08:37:53 +08:00
Bowen Wang
7eda1700c2
virtio/virtio-rng: make virtio-rng work for remoteproc transport layer
...
For remoteproc transport layer, the virtio drivers can not use the malloced
memory from the default system heap to communicate with the virtio devices,
the buffers placed in virtqueue should be in the share memory region
(mallcoed virtio_alloc_buf()).
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-06 08:37:53 +08:00
Bowen Wang
106040df6c
virtio-serial: support custom the virtio serial device name
...
By setting config CONFIG_DRIVERS_VIRTIO_SERIAL_NAME to "ttyXX0;ttyXX1;..."
to customize the virtio serial name.
For example:
If CONFIG_DRIVERS_VIRTIO_SERIAL_NAME="ttyBT;ttyTest0;ttyTest1",
virtio-serial will register three uart devices with names:
"/dev/ttyBT", "/dev/ttyTest0", "/dev/ttyTest1" to the VFS.
nsh> ls dev
/dev:
console
null
telnet
ttyBT
ttyS0
ttyTest0
ttyTest1
zero
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-06 08:37:53 +08:00
Bowen Wang
84d2aae63b
virtio-mmio: add secure virtio mmio device register api
...
In secure state, call virtio_register_mmio_device_secure() to
register the secure virtio mmio device;
In non-secure state, call virtio_register_mmio_device() to
register the non-secure virtio mmio device;
Board should ensure not mixed use the secure and non-seucre mmio
device.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-06 08:37:53 +08:00
shipei
551b9b1626
audio:add getlatency for virtio snd driver
...
add getlatency in virtio snd driver
Signed-off-by: shipei <shipei@xiaomi.com>
2024-10-06 08:37:53 +08:00
raiden00pl
e3bbd0cfd8
drivers/serial/CMakeLists.txt: add missing files
...
add missing files: uart_bth5.c and uart_ram.c
2024-10-05 23:40:11 +08:00
Xiang Xiao
1195ec03f7
driver/vhost: Call metal_init in vhost_register_drivers
...
since libmetal come from OpenAMP need be initialized before working
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-05 12:05:13 -03:00
Xiang Xiao
f914bc8ef2
driver/vhost: Check driver is NULL before calling probe
...
to avoid the same device bind to multiple drivers at the same time
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-05 12:05:13 -03:00
Xiang Xiao
1e823a077c
driver/vhost: vhost_register_device should set priv before inovking probe
...
align the behavior with vhost_register_driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-05 12:05:13 -03:00
Xiang Xiao
347c2dae29
driver/virtio: Check driver isn't NULL before calling remove
...
since the device mayn't bind to the driver yet
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-05 12:05:13 -03:00
Xiang Xiao
bad1627759
driver/vhost: Check driver isn't NULL before calling remove
...
since the device mayn't bind to the driver yet
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-05 12:05:13 -03:00
Xiang Xiao
0f918c8d4d
pci/ivshmem: Check drv isn't NULL before calling remove
...
since the device mayn't bind to the driver yet
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-05 12:05:13 -03:00
Xiang Xiao
2aaaa7632f
rpmsg/ivshmem: Skip unregistering ivshmem driver
...
since ivshmem device may insert again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-05 12:05:13 -03:00
Xiang Xiao
6685fb5434
pci/ivshmem: Skip unregistering ivshmem driver
...
since ivshmem device may insert again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-05 12:05:13 -03:00
wanggang26
e16c785e8c
mmcsd: move block driver register to probe stage in order to read ext_csd reg
...
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-05 09:17:25 +08:00
Bowen Wang
51d6e8f49e
virtio/vhost: assign the virtio/vhost_drvier to device->priv before probe
...
So the driver can get the driver pointer by vdev/hdev->priv,
and later vdev/hdev->priv can be used to store other data such as the
virtio/vhost drivers' private data.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-03 17:37:40 +08:00
Bowen Wang
c42576e87b
drivers/vhost-rng: add vhost rng driver support for NuttX
...
vhost-rng is a simple virtio device implementation, it receives
the buffer receviced from the virtio-rng driver and fill the random
number to this buffer and return to virtio-rng.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-03 17:37:40 +08:00
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
dongjiuzhu1
d88e0eac02
drivers/sensors: Fixed the overflow problem of uint32_t subtracting large from small.
...
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-28 11:39:54 +08:00
dongjiuzhu1
a5729a81e3
driver/sensors: add flags O_DIRECT to watch sensor state to avoid rpmsg work
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 11:39:54 +08:00
dongjiuzhu1
05f5517f4f
drivers/sensors: clear pollpri events after get events
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 11:39:54 +08:00
dongjiuzhu1
49b650e9db
drivers/sensors: avoid using sre lock between rptun thread and hpwrok
...
When the system cannot obtain buffers for a long time, hpwork will hold
a lot of buffers. However, due to a deadlock between the rptun thread
and hpwork, hpwork cannot send the buffers in time, causing the system
to crash.
so, avoid hold sre lock in rptun thread.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 11:39:54 +08:00
dongjiuzhu1
6b6666ee50
drivers/sensors: update nbuffer after initialization
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 11:39:54 +08:00
yintao
ef9a02f51c
sensors/sensor_rpmsg.c: fix list_delete node is NULL
...
if remote not set CONFIG_SENSOR_RPMSG, local can't receive NS_ACK
so sensor_rpmsg_device_ns_bound won't be called, not add sre->node
when local stop remote, rpmsg_deinit_vdev will call sensor_rpmsg_ns_unbind_cb
if (ept && ept->ns_unbind_cb)
ept->ns_unbind_cb(ept);
list_delete node is NULL at sensor_rpmsg_ns_unbind_cb
Signed-off-by: yintao <yintao@xiaomi.com>
2024-09-28 11:39:54 +08:00
dongjiuzhu1
d72d9049e9
drivers/sensors: fix minor issue about sensor driver
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 11:39:54 +08:00
dongjiuzhu1
7a8d58bf1b
drivers/sensors: release rpmsg resource when register_driver failed
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 11:39:54 +08:00
dongjiuzhu1
fcf2eb8fcb
drivers/sesnros: fix crash because ipc buffer pointer used after free
...
When the ipc buffer is obtained for the first time due to insufficient space,
it waits due to insufficient ipc buffer.
At this time, if rptun recursively operates the next ipc request, the ipc buffer
will be reused, but it has been released at this time.
0 file_read (filep=filep@entry=0x20596738, buf=buf@entry=0x205d4358, nbytes=1560) at vfs/fs_read.c:86
1 sensor_rpmsg_push_event_one (dev=0x20558f70, dev@entry=0x2058fc80, stub=stub@entry=0x20596720) at sensors/sensor_rpmsg.c:799
2 sensor_rpmsg_alloc_stub (dev=dev@entry=0x2058fc80, ept=ept@entry=0x20558f08, cookie=<optimized out>) at sensors/sensor_rpmsg.c:552
3 sensor_rpmsg_sub_handler (ept=0x20558f08, data=0x204849c0, len=51, src=<optimized out>, priv=0x20558f00) at sensors/sensor_rpmsg.c:993
4 sensor_rpmsg_ept_cb (ept=<optimized out>, data=<optimized out>, len=<optimized out>, src=<optimized out>, priv=0x20558f00) at sensors/sensor_rpmsg.c:1186
5 rpmsg_virtio_rx_callback (vq=<optimized out>) at open-amp/lib/rpmsg/rpmsg_virtio.c:605
6 virtqueue_notification (vq=<optimized out>) at open-amp/lib/virtio/virtqueue.c:711
7 rproc_virtio_notified (vdev=vdev@entry=0x20558c98, notifyid=notifyid@entry=4294967295) at open-amp/lib/remoteproc/remoteproc_virtio.c:433
8 remoteproc_get_notification (rproc=rproc@entry=0x2054ff34, notifyid=notifyid@entry=4294967295) at open-amp/lib/remoteproc/remoteproc.c:1002
9 rptun_worker (arg=0x2054ff30) at rptun/rptun.c:339
10 rptun_notify_wait (rproc=<optimized out>, id=<optimized out>) at rptun/rptun.c:543
11 remoteproc_virtio_notify_wait (priv=<optimized out>, id=<optimized out>) at open-amp/lib/remoteproc/remoteproc.c:907
12 rproc_virtio_notify_wait (vdev=<optimized out>, vq=<optimized out>) at open-amp/lib/remoteproc/remoteproc_virtio.c:176
13 rpmsg_virtio_notify_wait (vq=<optimized out>, rvdev=0x2054ff78) at nuttx/include/openamp/rpmsg_virtio.h:162
14 rpmsg_virtio_get_tx_payload_buffer (rdev=0x2054ff78, len=0x20558f90, wait=<optimized out>) at open-amp/lib/rpmsg/rpmsg_virtio.c:404
15 rpmsg_get_tx_payload_buffer (ept=ept@entry=0x20558f08, len=len@entry=0x20558f90, wait=wait@entry=1) at open-amp/lib/rpmsg/rpmsg.c:207
16 sensor_rpmsg_push_event_one (dev=0x0, dev@entry=0x20590d60, stub=stub@entry=0x20596720) at sensors/sensor_rpmsg.c:783
17 sensor_rpmsg_alloc_stub (dev=dev@entry=0x20590d60, ept=ept@entry=0x20558f08, cookie=<optimized out>) at sensors/sensor_rpmsg.c:552
18 sensor_rpmsg_sub_handler (ept=0x20558f08, data=0x20483700, len=49, src=<optimized out>, priv=0x20558f00) at sensors/sensor_rpmsg.c:993
19 sensor_rpmsg_ept_cb (ept=<optimized out>, data=<optimized out>, len=<optimized out>, src=<optimized out>, priv=0x20558f00) at sensors/sensor_rpmsg.c:1186
20 rpmsg_virtio_rx_callback (vq=<optimized out>) at open-amp/lib/rpmsg/rpmsg_virtio.c:605
21 virtqueue_notification (vq=<optimized out>) at open-amp/lib/virtio/virtqueue.c:711
22 rproc_virtio_notified (vdev=vdev@entry=0x20558c98, notifyid=notifyid@entry=4294967295) at open-amp/lib/remoteproc/remoteproc_virtio.c:433
23 remoteproc_get_notification (rproc=0x2054ff34, rproc, notifyid=notifyid@entry=4294967295)
24 rptun_worker (arg=0x2054ff30) at rptun/rptun.c:339
25 rptun_thread (argc=<optimized out>, argv=<optimized out>) at rptun/rptun.c:375
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 11:39:54 +08:00
liangdongdong
5238f2c200
feature: charge: Add battery operate
...
Signed-off-by: liangdongdong<liangdongdong@xiaomi.com>
2024-09-28 11:25:17 +08:00
dulibo1
5a796dfbff
power: fix BQ27426 driver compile error
...
power/battery/bq27426.c:331:17: error: ‘BATTERY_UNKNOWN’ undeclared (first use in this function)
331 | *status = BATTERY_UNKNOWN;
| ^~~~~~~~~~~~~~~
power/battery/bq27426.c:331:17: note: each undeclared identifier is reported only once for each function it appears in
Makefile:108: recipe for target 'bq27426.o' failed
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-28 11:25:17 +08:00
dulibo1
797df22802
power:add default protocol for the driver which not impl get_protocol
...
add default protocol for the driver which not impl get_protocol
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-28 11:25:17 +08:00
dulibo1
b29d103ad3
ramlog:flush should reset the tail of the reader
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-28 11:08:39 +08:00
dulibo1
c055fc2f85
noteram:read noteram may cause crash
...
noteram_get may cause _read = ni_bufsize cause assert crash
[ 1493.627200] [79] [ EMERG] [ap] _assert: Assertion failed : at file: note/noteram_driver.c:370 task: trace process: trace 0x446f238a
[ 1493.627400] [79] [ EMERG] [ap] backtrace:
[ 1493.627500] [79] [ EMERG] [ap] [79] [<0xf7933c9d>] _fini+0xae0720b9/0xb673e41b
[ 1493.628400] [79] [ EMERG] [ap] [79] [<0x498b1b0c>] host_backtrace+0x42/0x72
[ 1493.629300] [79] [ EMERG] [ap] [79] [<0x48bef3d1>] up_backtrace+0x127/0x2d2
[ 1493.630200] [79] [ EMERG] [ap] [79] [<0x48b86bed>] sched_backtrace+0x71/0x8a
[ 1493.631100] [79] [ EMERG] [ap] [79] [<0x44676273>] sched_dumpstack+0xed/0x486
[ 1493.631600] [79] [ EMERG] [ap] [79] [<0x445c61ff>] _assert+0x9f0/0xb38
[ 1493.632200] [79] [ EMERG] [ap] [79] [<0x4420dd07>] __assert+0x3f/0x4c
[ 1493.632800] [79] [ EMERG] [ap] [79] [<0x44151648>] noteram_get+0x1b0/0x5fe
[ 1493.633600] [79] [ EMERG] [ap] [79] [<0x44152370>] noteram_read+0x331/0x4f7
[ 1493.634200] [79] [ EMERG] [ap] [79] [<0x444c66f9>] file_read+0x38b/0x3c0
[ 1493.634700] [79] [ EMERG] [ap] [79] [<0x444c6840>] nx_read+0x112/0x170
[ 1493.635300] [79] [ EMERG] [ap] [79] [<0x444c68e5>] NXread+0x47/0xfa
[ 1493.635800] [79] [ EMERG] [ap] [79] [<0x446f2c70>] trace_dump+0x148/0x2f4
[ 1493.636400] [79] [ EMERG] [ap] [79] [<0x446f110b>] trace_cmd_dump+0x41b/0x4b9
[ 1493.636900] [79] [ EMERG] [ap] [79] [<0x446f2723>] trace_main+0x399/0x6e2
[ 1493.637500] [79] [ EMERG] [ap] [79] [<0x44217fc9>] nxtask_startup+0x69/0x7c
[ 1493.638000] [79] [ EMERG] [ap] [79] [<0x440f9b78>] nxtask_start+0x8a5/0x8b8
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-28 11:08:39 +08:00
yinshengkai
d888df9673
note: add ringbuffer aligned access handle
...
Fix ubsan warning that writes need to be aligned to memory boundaries when writing data
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-28 11:08:39 +08:00
dulibo1
98482d429b
noteram:overflow may discard all the trace message
...
noteram_add may cause head = tail when remain == NOTE_ALIGN(notelen)
log:
nsh_main-14 [0] 2.132127493: tracing_mark_write: B|14|trace dump -c
nsh_main-14 [0] 2.143322780: tracing_mark_write: E|14|trace dump -c
nsh_main-14 [0] 2.513023895: tracing_mark_write: B|14|trace dump -c
nsh_main-14 [0] 2.524060048: tracing_mark_write: E|14|trace dump -c
nsh_main-14 [0] 2.897055341: tracing_mark_write: B|14|trace dump -c
ap> trace dump -c
nsh_main-14 [0] 3.270037241: tracing_mark_write: B|14|trace dump -c
ap> trace dump -c
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-28 11:08:39 +08:00
dulibo1
b4b07ce6bd
PM:use CONFIG_SERIAL_PM_ACTIVITY_PRIORITY == 0 disable pm_activity which need by bl616
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-28 11:03:48 +08:00
dulibo1
5a57aa0af8
pm:CMakeLists update for pm runtime
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-28 11:03:48 +08:00
dulibo1
347154c01e
clk:optimized the clk_set_rate for mux
...
clk_mux_determine_rate->clk_get_parent_by_index
this path consume time too much
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-28 10:38:55 +08:00
dulibo1
a6cf57dbac
clk:change lock to recursive lock
...
case:
clk_set_rate ->
clk->ops->round_rate ->
divider_round_rate ->
clk_divider_bestdiv->
clk_round_rate
this path casue recursive clk_list_lock
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-28 10:38:55 +08:00
dulibo1
d5fdeffd06
clk:add critical protection for api
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-28 10:38:55 +08:00
dulibo1
15833a3cbd
regualtor: use regulator_enable in idle task may casue assert
...
if regulator_get the supply which call kmm_zalloc
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-28 10:38:55 +08:00
dulibo1
f53ae757b8
regualtor:adjust the critical area protected
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-28 10:38:55 +08:00
Bowen Wang
e706805c8b
drivers/pci: one pci device should only associate with one driver
...
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-27 17:12:09 +08:00
Bowen Wang
d6f4d0a20a
drivers/pci: change all devfn type to unsigned int
...
Now all the type of devfn in pci framework are unsigned int
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-27 17:12:09 +08:00
Yongrong Wang
2756045b07
pci.c: fix compile warning
...
pci/pci.c:1128:15: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
1128 | pciinfo("Limit MME to %x, num to %d\n", mmc, num);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
| |
| uint32_t {aka long unsigned int}
pci/pci.c:1128:30: note: format string is defined here
1128 | pciinfo("Limit MME to %x, num to %d\n", mmc, num);
| ~^
| |
| unsigned int
| %lx
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-09-27 17:12:09 +08:00
p-szafonimateusz
860bd3ad6f
drivers/pci_qemu_test.c: fix compiler warning
...
pci/pci_qemu_test.c:218:6: warning: ‘ops’ may be used uninitialized [-Wmaybe-uninitialized]
218 | ops->write(dev->bus, &hdr->test, num, sizeof(num));
| ~~~^~~~~~~
pci/pci_qemu_test.c: In function ‘pci_qemu_test_probe’:
pci/pci_qemu_test.c:286:41: note: ‘ops’ was declared here
286 | FAR const struct pci_qemu_test_ops_s *ops;
|
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-27 17:12:09 +08:00
wangyongrong
e4be747cf5
pci.c: fix pci 32bit warning
...
pci/pci.c:863:66: warning: right shift count >= width of type [-Wshift-count-overflow]
863 | pci_write_config_dword(dev, msi + PCI_MSI_ADDRESS_HI, (mar >> 32));
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-09-27 17:12:09 +08:00
Bowen Wang
0f3feefa85
drivers/pci/pci.c: fix warning when CONFIG_PCI_ASSIGN_ALL_BUSES=n
...
pci/pci.c:415:34: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
415 | FAR struct pci_resource_s *res;
| ^~~
pci/pci.c: In function ‘pci_scan_bus’:
pci/pci.c:663:32: warning: unused variable ‘ctrl’ [-Wunused-variable]
663 | FAR struct pci_controller_s *ctrl = bus->ctrl;
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-27 17:12:09 +08:00
zhangkai25
8829f38bee
Initialize af_channel to ensure no out-of-bounds situations occur
...
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-09-27 14:42:45 +08:00
zhangkai25
63249f71d1
memcpy data directly without channel at msglen is 4
...
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-09-27 14:42:45 +08:00
zhangkai25
bfd6185f4a
add adc_receive_all just for adc_dma
...
Description: No longer transmitting data to fifo in a loop, complete transmission in one go
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-09-27 14:42:45 +08:00
Bowen Wang
fd182dad64
drivers/pci: add error handle for pci_alloc_bus/device()
...
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-27 14:12:11 +08:00
wangyongrong
e8f6b1e695
pci.c: fix judge err in pci_connect_irq
...
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-09-27 14:12:11 +08:00
wangyongrong
6cec175c9d
pci.c:fix ops not implement after calling panic err
...
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-09-27 14:12:11 +08:00
likun17
329d121d50
sensor: Added 6dof motion and gesture related types.
...
For details, see: https://developer.android.com/reference/android/hardware/SensorEvent#values
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-27 13:59:41 +08:00
dongjiuzhu1
899eeb3c35
nuttx/uorb.h: align sensor_type value with aosp
...
refs:0e67aa0cae
:include_all/hardware/sensors-base.h
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-27 13:59:41 +08:00
lipengfei28
8e3c024bdb
msi_set:Message Control Register for MSI:bit3:bit1 used for
...
Multiple Message Capable
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 10:37:31 +08:00
lipengfei28
9d425eb521
pci epc mem use virtual mem
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 10:37:31 +08:00
lipengfei28
aa3568f353
pci epf use epc_node link to epc
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 10:37:31 +08:00
lipengfei28
06a5103838
pci_epf_device_s and pci_epc_ctrl_s add priv data
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 10:37:31 +08:00
wanggang26
ce1d047845
mmcsd: fix cmd6 timeout error when repeat calling
...
If CMD6 is sent again before last transmission is complete, a timeout
error will be encountered.
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-27 10:25:51 +08:00
Xiang Xiao
e105773f7e
can: Merge cd_error and rx_overflow into rx_error
...
so the error could dispath to each client without interference
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-09-27 09:01:06 +08:00
lipengfei28
c552d39d41
qemu epc add misx support
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 08:52:59 +08:00
lipengfei28
57d736b149
add epf test drv
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 08:52:59 +08:00
lipengfei28
c4e1c7334f
get_msi:should return Message Control Register:bit6:bit4
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 08:52:59 +08:00
lipengfei28
2a7cf549a1
pci: add qemu epc
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 08:52:59 +08:00
wangjianyu3
521b3bb500
drivers/bch: ioctl() - BIOC_FLUSH: Add calling ioctl() of block driver
...
Passing `BIOC_FLUSH` to block driver to ensure that changes transfers ("flushes") to the block device
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-27 00:12:43 +08:00
lipengfei28
56f57e5f9b
add pci irq interface
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 00:10:19 +08:00
lipengfei28
1eb151bef6
add pci_bus_map_region and pci_map_region macro
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-26 16:23:18 +08:00
wangyongrong
3b09de844f
pci.h: add pci_map_bar_region support
...
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-09-26 16:23:18 +08:00
chao an
a04e44ea75
syslog/channel: move syslog channel map into rodata
...
add SYSLOG_REGISTER to support disable syslog channel register
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-26 16:10:29 +08:00
chao an
9abe737ef3
syslog/channel: add constant attribute if SYSLOG_IOCTL is not enabled
...
move all private channel define from data to rodata
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-26 16:10:29 +08:00
chao an
4195851845
drivers/rpmsg: replace metal_list_for_each to safety version
...
replace metal_list_for_each to safety version to avoid invalid access to deleted node in destory flow
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-26 08:36:14 +08:00
mazhuang
4fa1c460d3
rptun/rptun_ivshmem:add restart cmd to reboot slave
...
Master can send restart command to slave to reboot the slave core
Signed-off-by: mazhuang <mazhuang@xiaomi.com>
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-09-26 00:04:05 +08:00
xuxingliang
75b87a85dd
rptun: fix memleak on failure
...
Leak backtrace:
1 14 2096 9886 0x4318d768 [0x040320744] <romfs_fileconfigure+184> romfs/fs_romfsutil.c:1039
[0x04031fd3e] <romfs_open+378> romfs/fs_romfs.c:281
[0x04027fa9e] <file_open+446> vfs/fs_open.c:244
[0x0402ab986] <rptun_store_open+26> rptun/rptun.c:955
[0x04034cc88] <remoteproc_load+120> open-amp/lib/remoteproc/remoteproc.c:452
[0x0402ac8ac] <rptun_dev_start+176> rptun/rptun.c:748
[0x0402ad038] <rptun_ioctl+416> rptun/rptun.c:618
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-09-26 00:04:05 +08:00
Bowen Wang
dbe43b0ae9
rptun: move rptun cmd definition before the resource table
...
Because locate the command at the end the resource table is unfriendly
when we want to support multi virtio devices instead only one virtio
rpmsg device.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-26 00:04:05 +08:00
Yongrong Wang
10e8b6c9f6
rptun/rpmsg_virtio: remove chip cmd and reuse the common ones
...
Add more common command for rptun and rpmsg_virtio frameworks,
also modify the rptun and rpmsg_virtio driver to use the common
commands.
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-09-26 00:04:05 +08:00