Commit Graph

47395 Commits

Author SHA1 Message Date
Gustavo Henrique Nihei f78c6432d8 xtensa/esp32: Simplify board linker script selection
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-08 21:55:29 +08:00
Gustavo Henrique Nihei 236ee5c80d xtensa/esp32: Rename linker scripts into more meaningful names
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-08 21:55:29 +08:00
tangyusong1 1c7a9d282c Add mtu set and interface name set in ioctl
Follow LinuxOS:linux-5.10.152\include\uapi\linux\sockios.h
Add SIOCSIFMTU and SIOCSIFNAME

Signed-off-by: tangyusong1 <tangyusong1@xiaomi.com>
2022-12-08 13:58:26 +01:00
Xiang Xiao fdc1aa6ae3 openamp: don't depend on pen-amp.zip and libmetal.zip in the git mode
since both don't exist in this mode

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-08 09:54:00 +01:00
chao an 11de08de27 net/devif_send: replace all block send to nonblock mode
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-08 09:53:15 +01:00
wangbowen6 c44f87eb1a arm: add syscall SYS_save_context support for old arm and armv7-r
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-12-08 12:37:29 +08:00
TimJTi 18482efc39 SAMA5D2 fix printf formatter
Update sam_adc.c

Update sam_adc.c

%08x -> PRIx32

More %08x

Revert incorrect change (PRIx32)

Update sam_tc.c

Update sam_tc.c

more style corrections/typos

Update arch/arm/src/sama5/sam_adc.c

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2022-12-07 21:33:17 +01:00
chao an 6950b67b46 net/can: device buffer must be clear after enqueue to readahead
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-08 03:16:42 +08:00
chao an fc1b71b9a6 net/can: add support of iob input
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-08 03:16:42 +08:00
chao an d295b4e1f1 net/devif: Use the device ll header length to calculate send limit
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-08 03:16:42 +08:00
chao an 960b4bb2a7 net/devif: initialize d_len to 0 before polling connections
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-08 03:16:42 +08:00
Marco Casaroli 7ee8d38fda Remove `intr` param from `pthread_mutex_take` 2022-12-08 03:13:44 +08:00
Marco Casaroli 4cc7f3747c Remove `intr` param from `pthread_sem_take` 2022-12-08 03:13:44 +08:00
chao an e2b00a9fcc mm/iob: reserved bytes should be updated after each iteration
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-07 21:24:25 +08:00
zouboan 756e2419c1 boards/pinephone: add support of reboot command 2022-12-07 21:17:39 +08:00
zouboan 753f46dffe arch/arm64: add support of systemreset 2022-12-07 21:17:39 +08:00
Marco Casaroli 11cc232de5 `pthread_mutex_timedlock` never returns `EINTR`
According to posix spec, this function should never return `EINTR`.

This fixes the call to `pthread_mutex_take` so it keeps retrying the
lock and doesn't return `EINTR`
2022-12-07 21:08:23 +08:00
chao an af149b44cd risc-v/backtrace: fix compile warning
common/riscv_backtrace.c: In function 'up_backtrace':
common/riscv_backtrace.c:145:27: error: passing argument 1 of 'backtrace' from incompatible pointer type [-Werror=incompatible-pointer-types]
  145 |           ret = backtrace(g_intstackalloc,
      |                           ^~~~~~~~~~~~~~~
      |                           |
      |                           uint8_t * {aka unsigned char *}
common/riscv_backtrace.c:64:33: note: expected 'uintptr_t *' {aka 'unsigned int *'} but argument is of type 'uint8_t *' {aka 'unsigned char *'}
   64 | static int backtrace(uintptr_t *base, uintptr_t *limit,
      |                      ~~~~~~~~~~~^~~~
common/riscv_backtrace.c:146:43: error: passing argument 2 of 'backtrace' from incompatible pointer type [-Werror=incompatible-pointer-types]
  146 |                           g_intstackalloc + CONFIG_ARCH_INTERRUPTSTACK,
      |                                           ^
      |                                           |
      |                                           uint8_t * {aka unsigned char *}
common/riscv_backtrace.c:64:50: note: expected 'uintptr_t *' {aka 'unsigned int *'} but argument is of type 'uint8_t *' {aka 'unsigned char *'}
   64 | static int backtrace(uintptr_t *base, uintptr_t *limit,
      |                                       ~~~~~~~~~~~^~~~~

Regression by:
| commit 70290b6e38
| Author: Xiang Xiao <xiaoxiang@xiaomi.com>
| Date:   Tue Sep 20 02:38:54 2022 +0800
|
|     arch: Change the linker generated symbols from uint32_t to uint8_t *
|
|     and remove the duplicated declaration
|
|     Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-07 19:13:09 +08:00
zhangyuan21 5dc4e23bb7 usbdev/adb: fixed usbclass steup issue
1. set usbdev when usb class bind
2. don't call EP_SUBMIT when receive OUT message

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-07 12:24:09 +08:00
sunkun3 d9acaeaccf usbdev:resolve ADB compilation errors
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
2022-12-07 12:24:09 +08:00
zhangyuan21 9150ea0e95 arch_alarm: don't init local variable for fpu test case fail
D16 register will be cleared when compiling with gcc on some boards.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-07 12:21:16 +08:00
Gustavo Henrique Nihei 1ecaa4e672 xtensa/esp32s3: Configure the PMS peripheral for Protected Mode
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-07 03:07:45 +08:00
Gustavo Henrique Nihei bfc40c74d0 xtensa/esp32s3: Add support for Protected Mode
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-07 03:07:45 +08:00
Peter Bee 31347da187 drivers/video: add support for V4L2 mmap-ed buffer
Support V4L2_MEMORY_MMAP memory mode

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-07 01:21:46 +08:00
Lucas Saavedra Vaz 4320eed4a1 arch/xtensa/esp32: Optimize macros and ensure overwrite protection 2022-12-07 00:02:28 +08:00
chao an c738da048c net/ipforward: update IP buffer offset
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-07 00:01:52 +08:00
Xiang Xiao d6c8c269f5 arch/sim: Change usrsock_host_ prefix to host_usrsock_
to align with other similar function style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-06 13:12:21 +01:00
Xiang Xiao 79c8b7d3fd arch/sim: Change sim_host_ prefix to host_
to align with the other similar function style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-06 13:12:21 +01:00
Xiang Xiao 4e24ef23f4 arch/sim: Move host files to the correct location
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-06 13:12:21 +01:00
Xiang Xiao ee93e6ea0d boards/sim: Decouple CONFIG_MM_UBSAN_ALL from CONFIG_MM_UBSAN_ALL
like other arch(e.g. arch/arm/src/common/Toolchain.defs)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-06 19:01:25 +08:00
Xiang Xiao 800fac05d9 mm: Change the default of MM_UBSAN_TRAP_ON_ERROR to n
let's give more information by default

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-06 19:01:25 +08:00
田昕 2719869ab2 Move _assert to kernel space.
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-06 18:33:21 +08:00
Lee Lup Yuen c2d75c930b arm64/a64: Add drivers for PIO and LEDs
This PR adds the drivers for Allwinner A64 PIO (Programmable I/O) and PinePhone LEDs (Red / Green / Blue).

The PIO Driver is based on the NuttX PIO Driver for Allwinner A10: [`arch/arm/src/a1x/a1x_pio.c`](https://github.com/apache/nuttx/blob/master/arch/arm/src/a1x/a1x_pio.c)

-   `arch/arm64/src/a64/Make.defs`: Add PIO Driver to Makefile

-   `boards/Kconfig`: Add `ARCH_HAVE_LEDS` to PinePhone

-   `boards/arm64/a64/pinephone/src/pinephone.h`: Define PinePhone LEDs

-   `boards/arm64/a64/pinephone/src/pinephone_boardinit.c`: Start Auto LEDs

-   `boards/arm64/a64/pinephone/src/pinephone_bringup.c`: Start User LEDs

-   `boards/arm64/a64/pinephone/src/Makefile`: Add LED Driver to Makefile

-   `boards/arm64/a64/pinephone/configs/nsh/defconfig`: Add `CONFIG_USERLED` to `nsh` config

-   `arch/arm64/src/a64/a64_pio.c`, `a64_pio.h`: Allwinner A64 PIO Driver

-   `arch/arm64/src/a64/hardware/a64_memorymap.h`: PIO Memory Map

-   `arch/arm64/src/a64/hardware/a64_pio.h`: PIO Definitions

-   `boards/arm64/a64/pinephone/include/board.h`: Define PinePhone LEDs

-   `boards/arm64/a64/pinephone/src/pinephone_autoleds.c`: Driver for Auto LEDs

-   `boards/arm64/a64/pinephone/src/pinephone_userleds.c`: Driver for User LEDs

-   `introduction/supported_platforms.rst`: Add Allwinner A64 as Supported Platform

-   `platforms/arm/a64/boards/pinephone/index.rst`: Add PIO and LEDs to PinePhone
2022-12-06 18:14:39 +08:00
Zhe Weng 6e9053265c net/ipfwd: fix `ipv4_dev_forward` after IOB offload.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-06 17:03:47 +08:00
Zhe Weng 2a780e0467 net/ipfwd: fix `devif_forward` after IOB offload.
Problem:
- `iob_copyout` to `d_buf` doesn't set `io_len` of the IOB, so `devif_poll` failed to copy the data into `buf` by `iob_copyout`

Modification:
- Just Move the IOB in `devif_forward`.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-06 17:03:47 +08:00
chao an 813dfe9756 spresense/rndis: set default throttle entries to 24 (2*MTU)
Reserve more throttle entries to avoid data discarded in NIC

Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-06 16:59:02 +09:00
Lucas Saavedra Vaz 9cdbec3769 arch/xtensa/esp32: Modify REG_[GET/SET]_FIELD to use [get/set]reg32 2022-12-06 10:53:06 +08:00
chao an b5507ea9a2 compile/attribute: minor fix for packed struct mismatch
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-06 03:50:20 +08:00
Xiang Xiao 1f25da1366 boards: Remove the unused function prototype(slcd_getstream)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-06 01:55:58 +08:00
田昕 b9c913a195 include/nuttx/notifier:fix compiling error.
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-06 00:12:41 +08:00
Peter van der Perk 9c27d96b8a s32k3xx:LPSPI Check for TX complete before RX
Co-authored-by: David Sidrane <david.sidrane@nscdg.com>
2022-12-05 22:35:21 +08:00
Peter van der Perk e7449cf97a S32K3XX EDMA Set Backdoor for DTCM memory map 2022-12-05 22:35:21 +08:00
Xiang Xiao b526e06de1 drivers/lcd: Reuse lib_meminstream_s as much as possible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 14:27:55 +01:00
Xiang Xiao 055f1f33eb libc/stream: Rename [lib_stream_](put|get) to [lib_stream_](putc|getc)
to make the naming style consistent with each other

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 14:27:55 +01:00
Xiang Xiao 4be9ec774b Don't download tarballs if a local git repo found
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 10:47:36 +01:00
Xiang Xiao 83c4e7d9b6 libc/hex2bin: Remove the unused declaration
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 10:42:22 +01:00
Xiang Xiao f142cf0e55 drivers/video: Remove memset from cleanup_streamresources
since initialize_streamresources will do it

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 10:35:26 +01:00
Xiang Xiao 99311ed6a5 drivers/video: Should do uninitialization if is_initialized is true
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 10:35:26 +01:00
Xiang Xiao 92e72f8624 drivers/video: Return zero if gamma curve isn't supported in initialize_scene_gamma
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 10:35:26 +01:00
Xiang Xiao c8868b3745 drivers/video: Return 0 in case g_video_sensor_ops or get_supported_value is NULL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 10:35:26 +01:00