Commit Graph

49039 Commits

Author SHA1 Message Date
Masayuki Ishikawa
fb6bef2c2d arch: imx6: Add support for AR8031 gigabit ethernet phy
Summary:
- This commit adds AR8031 gigabit ethernet phy for the
  sabre-6quad board.

Impact:
- None

Testing:
- Tested with sabre-6quad:netnsh_ar8031 (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-04-25 11:45:19 +08:00
Masayuki Ishikawa
8c89052fb3 drivers/net, include/nuttx/net: Add AR8031 PHY
Summary:
- This commit adds AR8031 PHY definitions

Impact:
- None

Testing:
- Tested with sabre-6quad:netnsh_ar8031 (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-04-25 11:45:19 +08:00
Masayuki Ishikawa
dc914f43ea arch: imx6: Fix CONFIG_IMX_ENET_ENHANCEDBD related code
Summary:
- This commit applies the changes from imxrt
- See 3a4542f3c4

Impact:
- imx6 ethernet with d-cache

Testing:
- Tested with imx6_with_ar8031 (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-04-25 11:45:19 +08:00
Lwazi Dube
79fde96a1d wireless/bluetooth: Fix build error when BT_GATT_CCC is used. 2023-04-25 11:42:22 +08:00
yinshengkai
20c5c4f47d sched/irq: optimizing IRQMONITOR, move up_perf_convert to irq_procfs
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-25 09:58:43 +08:00
Petro Karashchenko
3e3670af77 arch/xtensa/esp32: fix wrong enabled BLE interrupts
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-24 09:35:58 -07:00
Petro Karashchenko
0c28094059 arch/xtensa/esp32: fix crash in BLE startup
ROM symbols provided by linker are placeholders for addresses
and not a pure addresses, so we need to read data pointed by
ROM symbols instead of using those as pure addresses.

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-24 09:35:58 -07:00
Petro Karashchenko
0a28b2a26e net/bluetooth: fix parameter indentation
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-24 09:35:58 -07:00
Petro Karashchenko
756e244b18 wireless/bluetooth: fix double buffer free
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-24 09:35:58 -07:00
Petro Karashchenko
d50ec662be arch/risc-v/esp32c3: Change the linker generated symbols from uint32_t to uint8_t *
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-24 09:35:58 -07:00
chao an
b8780fe906 arch/arm: relax compiler check for workaround with "GCC 12.2"
1. relax compiler check for workaround with "GCC 12.2"
2. export GCCVER to environment

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-24 19:00:52 +03:00
zhangyuan21
d7de93f906 arch/arm: Resolving warnings for assembly instructions
arm/arm_saveusercontext.S:61: Warning: duplicated register (r14) in register list

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-24 23:49:33 +08:00
Xiang Xiao
dd631265c4 fs: Add g_ prefix for all global mountpt_operations instances
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-24 16:13:29 +02:00
Xiang Xiao
51dc67ad5f fs: Add g_ prefix for all global file_operations instances
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-24 16:13:29 +02:00
yinshengkai
308b93b168 doc: add critmon comand docment
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-24 19:38:29 +08:00
yinshengkai
c418d147fe procfs: add total time running time of task
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-24 19:38:29 +08:00
Huang Qi
3d3a86ae53 arch/sim: Move up_textheap_xxx to common place
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-24 19:37:15 +08:00
Huang Qi
97f8817d6b arch/sim: Implement host_freeheap for windows
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-24 19:37:15 +08:00
chao an
f620b039aa rv-virt/knsh64: increase proxy stack size to avoid overflow
Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-24 12:59:39 +03:00
hujun5
0477fb116a pthread: pthread_cond_wait dead lock
pthread_cond_wait is preempted after releasing the lock, sched_lock cannot lock threads from other CPUs, use enter_critical_section

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-04-24 12:53:56 +03:00
chao an
2be18a8b24 makefile: fix libc/mm files can not be compiled incrementally
Use double delim to fix windows native build and give an error:
makefile:132: *** target mode do not include“%”. stop.

In Windows environment DELIM := $(strip \) but \ has two role:
first: \ as directory, and second \ as Escape character, Reference:

https://github.com/apache/nuttx/pull/7572#discussion_r1028219229

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-24 12:43:10 +03:00
Xiang Xiao
1113746d44 Let BOARDIOC_SOFTRESETCAUSE_ASSERT equals to the default value of BOARD_ASSERT_RESET_VALUE
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-24 05:14:06 -04:00
yanghuatao
826dd87f30 libm/newlib: add newlib/libm support
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-04-24 10:32:53 +08:00
Huang Qi
70395f49b2 arch/sim: Implement text heap
If CONFIG_MM_CUSTOMIZE_MANAGER enabled on sim, malloc/mmap is bypassed to glibc, so the memory allocated without execution permisson.

For this case, CONFIG_ARCH_USE_TEXT_HEAP can be used.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-24 10:29:20 +08:00
YAMAMOTO Takashi
0066bf80d2 esp32: enable LIBC_ARCH_ATOMIC
fixes a build issue in https://github.com/apache/nuttx-apps/pull/1723
2023-04-24 10:12:57 +08:00
yinshengkai
a40a802f9b sched/pthread: repalce sched_lock to enter_critical_section
After RR is enabled, an interrupt occurs during this period and the task cannot be switched

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-24 01:54:44 +08:00
zhanghongyu
9162800255 tcp_input: drop SYN when no free node in the backlog
Wait for the client to retransmit the ack before trying to allocate the
backlog

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-24 01:52:33 +08:00
hujun5
6063c0516e cpu: in SMP pthread_cancel occasionally deadlock
In smp when cpu0 calls up_cpu_resume to release the cpu1 lock, another locked cpu1 did not execute immediately,
and soon cpu0 called up_cpu_resume again, now cpu1 unable to respond to the interrupt at this time, resulting in a deadlock.
Our solution is to restore cpu1 execution from asynchronous to synchronous to ensure that cpu1 is restored.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-04-23 23:33:09 +08:00
anjiahao
9971dfd0c1 circbuf support write or read buffer direct
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-23 23:32:00 +08:00
anjiahao
781a34da94 memepool:fix memory consumption double counting issue
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-23 23:28:32 +08:00
anjiahao
49cd7a795a mm:change special pid to macro
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-23 23:28:32 +08:00
chao an
f2257ffd80 rv-virt/nsh64: enable CONFIG_BCH to support block device access
Since ramdisk is registered as block device, enable CONFIG_BCH
to support block device access

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-23 23:27:23 +08:00
YAMAMOTO Takashi
2d223d0744 Documentation/platforms/sim/sim/boards/sim: mention toywasm config 2023-04-23 23:19:20 +08:00
YAMAMOTO Takashi
a5bf3d769b Add sim:toywasm config 2023-04-23 23:19:20 +08:00
Lwazi Dube
129a0703c4 bluetooth: Fix the Unexpected ACL flags error
This change fixes a bug that was introduced when a 16 bit handle was
changed into a 12 bit bitfield without adapting the rest of the stack.
2023-04-23 17:14:01 +08:00
chao an
13cdffd302 fs/procfs: fix readdir loss last character
nsh> ls proc/fs
/proc/fs: ----> /proc/fs:
 block           blocks
 moun            mount
 usag            usage

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-23 17:13:51 +08:00
zhanghongyu
50488ac8f3 sim: multi netdevice forward issue when ll_guardsize not 14
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-23 10:37:50 +03:00
zhanghongyu
37644c8818 Revert "sim: multi netdevice forward issue when ll_guardsize not 14"
This reverts commit a69c6c1dac.
2023-04-23 10:37:50 +03:00
Huang Qi
b21f68d751 tools/mksymtab: Fix a compilation warning
Fix:
```
mksymtab.c: In function ‘main’:
mksymtab.c:280:15: warning: the comparison will always evaluate as ‘true’ for the address of ‘g_parm’ will never be NULL [-Waddress]
  280 |       cond = (g_parm[COND_INDEX] && strlen(g_parm[COND_INDEX]) > 0);
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-23 12:22:19 +08:00
TimJTi
4719e44b8b APDS9922
WIP

WIP - ALS now OK with full IOCTL.

WIP

WIP

ALS now works as intended

WIP - getting to bottom of crash when ctrl-c the app

Seems to all work...

ioctl #define changes

Update ioctl.h

Maybe final changes

Maybe final changes - again

Delete .settings directory

Delete nuttx Default.launch

Maybe final changes - again

changes after initial feedback

changes after initial feedback

Add snerr error when incorrect device ID seen

Update apds9922.c

Revert "Merge branch 'apds9922' of https://github.com/TimJTi/nuttx into apds9922"

This reverts commit 8fdf5cbfb783d25251d13bc338ece6adca1308bc, reversing
changes made to 0d58237ba27f3cf87cf711658f5388d974be502e.

Improve probe error messages

APDS9922

WIP

WIP - ALS now OK with full IOCTL.

WIP

WIP

ALS now works as intended

WIP - getting to bottom of crash when ctrl-c the app

Seems to all work...

ioctl #define changes

Update ioctl.h

Maybe final changes

Maybe final changes - again

Delete .settings directory

Delete nuttx Default.launch

Maybe final changes - again

changes after initial feedback

changes after initial feedback

Add snerr error when incorrect device ID seen

Update apds9922.c

Revert "Merge branch 'apds9922' of https://github.com/TimJTi/nuttx into apds9922"

This reverts commit 8fdf5cbfb783d25251d13bc338ece6adca1308bc, reversing
changes made to 0d58237ba27f3cf87cf711658f5388d974be502e.

Improve probe error messages

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Delete .gitignore

Changes after PR review

Remove static arrays from header file

Update apds9922.c

improvements to enum usage

Restore .gitignore

Update Kconfig

Update .gitignore

Update .gitignore
2023-04-22 20:38:29 +08:00
zouboan
9bc3a9e4bb drivers/mpu60x0 Fix the error when mpu60x0 in SPI case 2023-04-22 20:38:21 +08:00
Zhe Weng
44a04733d4 mm/iob: Don't return NULL in iob_pack
We don't want to get a NULL pointer after iob_pack on an IOB chain with
several iobs with length 0, it should return one IOB with length 0.
Otherwise each place calls iob_pack needs to check the result.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 19:26:22 +08:00
Zhe Weng
1aceb1d872 net/tcp: Fix clear condition in ofoseg input
We have a case that an http server gives out-of-ordered ACKs, and NuttX client makes `ofoseg`s with length 0, trying to rebuild / put them into `ofosegs` array, which is not intended (no available data and should be skipped). This breaks later logic and finally crashed in `tcp_ofoseg_bufsize` (`ofosegs[i].data` is `NULL`, which should never happen in normal logic).

Note:
- `iob_trimhead` won't return `NULL` when it's applying on normal IOB.
  - Keep `dev->d_iob == NULL` to avoid `iob_trimhead` changed.
- `iob_free_chain` will do nothing when applied to `NULL`.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 19:26:22 +08:00
zhanghongyu
6c73221dd4 forward: limit the forwarding range of broadcast packets
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-22 19:24:46 +08:00
Xiang Xiao
4be499a243 procfs: Make g_procfs_entries in the alphabetic order
and option in procfs/Kconfig

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
Xiang Xiao
c6d210289f procfs: remove procfs_ from procfs_operations variables
to aglin the naming style with other implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
Xiang Xiao
149cafe450 procfs: Add g_ prefix to all procfs_operations
to conform the coding style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
rongyichang
e6490694a1 drivers/video: passthrough unknown ioctl commands for customized scenarios in fb
driver

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-04-22 12:48:46 +08:00
ZhongAn
7eeba71366 audio: add audio_dma device driver.
Signed-off-by: ZhongAn <zhongan@pinecone.net>
2023-04-22 01:50:51 +08:00
YAMAMOTO Takashi
72783209a3 Migrate sim board README.txt to Documentation 2023-04-22 01:47:46 +08:00