Commit Graph

46727 Commits

Author SHA1 Message Date
Jukka Laitinen
03bce705d5 arch/risc-v/src/mpfs/mpfs_ethernet.c: Set PHY speed advert after PHY reset
This allows properly using 10/100Mbps also with 1G phy. Some gigabit PHYs
come out of reset with 1G advertisement enabled, causing other devices to
set up link with 1G. If, after this, the link is set to 10/100 on the mpfs,
the link won't work.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-10-03 19:35:30 +02:00
Masayuki Ishikawa
2fa872e304 arch: qemu-rv: Add M-timer handling for BUILD_KERNEL
Summary:
- In RISC-V, BUILD_KERNEL uses S-mode and to use M-mode timer
  we need to handle it by using OpenSBI or self-implementation.
- This commit adds M-timer self-implementation for BUILD_KERNEL.

Impact:
- qemu-rv only

Testing:
- Tested with rv-virt:knsh64 on qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-10-03 23:26:11 +08:00
Xiang Xiao
34b05804b0 bluetooth: Remove hcicollecttask from btuart shim driver
monitor POLLIN event through callback mechanism instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
fe38cb1bad bluetooth: Implement hciuart_ioctl for btuart lowerhalf shim driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
6ec74d8d36 bluetooth: Forward ioctl to btuart lowerhalf driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
fab8b081c0 bluetooth: Implement btuart_close for btuart upperhalf driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
11d083b358 bluetooth: Remove the unnecessary cast in btuart driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
dbb3c768c3 driver/usersock_dev: Check CONFIG_NET_USRSOCK_DEVICE instead CONFIG_NET_USRSOCK
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 22:13:52 +02:00
wangbowen6
e9ccab2db3 fs/poll: using callback mechanism to implement poll notification
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-10-03 00:00:56 +08:00
Masayuki Ishikawa
b3e300f8e6 arch: qemu-rv: Fix qemu_rv_start_s() for S-mode
Summary:
- I found inappropriate SET_CSR() usage in the function.
- This PR fixes this issue.

Impact:
- None

Testing:
- tested with rv-virt:knsh64

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-10-02 22:32:07 +08:00
raiden00pl
0aa0394ca2 include/stdint.h: add sig_atomic_t limits 2022-10-02 22:30:54 +08:00
raiden00pl
d8483a24e8 include/threads.h: return values should be integer type to prevent compiler warnings 2022-10-02 22:30:29 +08:00
raiden00pl
00aa822546 libs/libc/netdb/Kconfig: allow to enable LIBC_NETDB directly from menuconfig 2022-10-02 22:29:41 +08:00
Xiang Xiao
2a574427c6 boards: Remove CONFIG_NETDEVICES=y from board defconfig
since it's enabled by default now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-01 19:12:15 +02:00
Xiang Xiao
486a6f81d1 drivers/net: Enable NETDEVICES by default
since there are many net drivers doesn't depend on phy

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-01 19:12:15 +02:00
Tiago Medicci Serrano
fc9b9f70ac xtensa/esp32: add documentation of the I2S/audio support on ESP32 2022-09-30 17:23:17 -03:00
Tiago Medicci Serrano
06bc2220b9 xtensa/esp32: add support for the CS4344 audio codec
Include i2schar and audio drivers defconfigs for ESP32-DevKitC board.
2022-09-30 17:23:17 -03:00
Tiago Medicci Serrano
18c715ba92 xtensa/esp32: add initial support for I2S
Add initial support for the I2S peripheral on ESP32.
Add I2S character driver and generic I2S audio driver.
Include i2schar defconfig for ESP32-DevKitC board.
2022-09-30 17:23:17 -03:00
Xiang Xiao
d906c2ff3b sim/adb: Enable netdb
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 15:37:48 -03:00
Xiang Xiao
e38248ee08 Return -EINVAL for the internal API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 17:54:56 +02:00
Xiang Xiao
bdeaea3742 Remove the unnessary empty line after label
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 17:54:56 +02:00
Carlos Sanchez
6e490759d6 s32k1xx: Fix FlexIO timer register access macros 2022-09-30 23:38:59 +08:00
Carlos Sanchez
68db81ab4f s32k1xx: Allow building with debug features and no console. 2022-09-30 15:15:55 +02:00
Xiang Xiao
53dcddc9e3 arch/armv[7|8]-m: Implement up_invalidate_icache
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 08:07:45 +02:00
Xiang Xiao
0fa17f32f2 drivers/telnet: Remove io work thread
The thread isn't really needed but complicate the workflow

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 12:54:29 +09:00
Xiang Xiao
c3b6d35290 drivers/telnet: Let psock_poll check the valid of td_psock instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 12:54:29 +09:00
Xiang Xiao
a52fbe87eb drivers/telnet: Return the partial sent bytes in telnet_write
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 12:54:29 +09:00
Xiang Xiao
d6bb08f6fd boards/sim: Enable telnetd in adb config
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-29 19:12:33 -03:00
Gustavo Henrique Nihei
c0cd56a758 risc-v/esp32c3: Fix retrieval for linker-defined symbol
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-29 23:31:48 +02:00
chao an
6bc4baa4ca arch/makefile: preprocess link script to make configure more flexibly
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-29 17:06:47 +08:00
yinshengkai
5c9b094d65 tools: Replace mkallsyms.sh with mkallsyms.py
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-29 08:33:04 +08:00
yinshengkai
3c8773a854 tools: Optimizing mkallsyms scripts with python
When compiling my project, the time to generate allsyms decreased from tens of seconds to 2 seconds

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-29 08:33:04 +08:00
Ville Juven
7c003162a6 libelf/libelf_symbols.c: Fix compilation warning about void* arithmetics
Fixes minor issue with a trace (build failure with -Werror):
libelf/libelf_symbols.c:310:41: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]
  310 |               (uintptr_t)(sym->st_value + symbol->sym_value));
2022-09-28 20:35:31 +08:00
Xiang Xiao
386547676d net: Return -ENOPROTOOPT for unsupported/unknown socket option
so usrsock implementation could support more option than built-in stack

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-28 20:47:48 +09:00
zhangyuan21
85d013f69a sched: mqueue wait list optimize 2022-09-28 18:08:37 +08:00
zhangyuan21
838309313e sched: semaphore wait list optimize 2022-09-28 18:08:37 +08:00
yinshengkai
d9065f29aa tools/ci: add pyelftools and cxxfilt 2022-09-28 14:08:13 +08:00
Fotis Panagiotopoulos
41b4af1ec3 Style fixes. 2022-09-28 09:38:55 +08:00
Fotis Panagiotopoulos
bbf3f2866d Fixed non-UTF8 characters. 2022-09-28 09:38:55 +08:00
ligd
078a0486f5 armv7-a: SMP hande all cores start at same time
In SMP mode, if all cores start at same time, all from __start(),
then only primary need do initialize, so others core should wait
primary, use 'sev' let the non-primary continue to __cpuN_start().

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-28 10:33:13 +09:00
wangbowen6
589647308c arm/tlsr82: move peripherals pin config to board.h
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-09-28 09:30:06 +08:00
Xiang Xiao
764540267e sched/clock: Rename g_system_timer to g_system_ticks
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-27 17:45:44 -03:00
Jukka Laitinen
24ea8ee3e9 arch/risc-v/src/mpfs/mpfs_ddr.c: Use DDR type selection macros to flag out code
The DDR type can be determined at compile time, remove code which is not used

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-09-28 02:09:02 +08:00
Jukka Laitinen
0ba3bc66be arch/risc-v/src/mpfs/Kconfig: Add configuration flags for DDR type selection
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-09-28 02:09:02 +08:00
Masayuki Ishikawa
00ce58963f boards: icicle: Fix license information to use the OpenSBI
Summary:
- I noticed that the OpenSBI library depends on the BSD license
- This commit fixes this issue

Impact:
- None

Testing:
- Build only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-27 18:29:09 +02:00
Masayuki Ishikawa
0cd896b1d5 arch: risc-v: Fix license information to use the OpenSBI
Summary:
- I noticed that the OpenSBI library depends on the BSD license
- This commit fixes this issue

Impact:
- CONFIG_OPENSBI=y only

Testing:
- Build with icicle:opensbi (will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-27 18:29:09 +02:00
yinshengkai
ae38e3eb10 sched: Optimize sched_note_begin/end
Optimize sched_note_begin/end, replace note_printf with note_string
sched_note_begin/end optimized from 50us to 1us per consumption

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-27 21:32:35 +08:00
chao an
aa42f29465 net/local: remove dead code
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 21:31:48 +08:00
ligd
059497d1d1 armv7-a/r: NON-primary core should invalidate dacache level1
NON-primary cpu will invalidate cpu0's cache L2, that will caused cpu0's data mismatch, and then system crash

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-27 14:41:39 +08:00
David Sidrane
a1ebd499ea stm32h7:SDMMC fix unaligned access for buffers not on 32 bit boundaries
The IDMA needs to have 32 bit word alignment, in fact it will
   AND off the lower 2 bits of the value stored in IDMABASE0R.
   This bug was masked by CONFIG_ARMV7M_DCACHE causing proper word alignment
   and also FAT_DMAMEMORY being aligned.

   This commit extends the unaligned logic (used for dcache) to take into account
   the need for a buffer copy when the buffer is ot 32 bit word.

    It leverages the fact that when CONFIG_ARMV7M_DCACHE is not defined the up_xxxxx_dcache are nops.
2022-09-27 09:43:29 +08:00