Commit Graph

21420 Commits

Author SHA1 Message Date
liqinhui
be32247e73 simwifi: Escapes the special characters of ssid in the scan results.
The ssid format refers to the format of ssid displayed on the mobile
phone.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-11-21 17:05:32 -08:00
liqinhui
7c13116007 simwifi: Connect the wifi whose ssid contains the special charaters.
When setting the essid that contains the special characters (\"'),
we need to add an escape (\) for them.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-11-21 08:00:13 -08:00
liaoao
6e604741f6 arm64_vector: no need to save x0 to sp
It will cause an incorrect sp value saved in context when saving X0 to sp.

Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-11-21 07:56:19 -08:00
Eero Nurkkala
1cb879773a risc-v/mpfs/opensbi: update opensbi to version 1.3.1
Version 1.3.1 is the latest tagged version as of November
the 21st, 2023.  This patch prepares the required changes
to make v1.3.1 work.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2023-11-21 04:04:47 -08:00
Xiang Xiao
eddd90de78 poll: pollsetup should notify only one fd passd by caller
since it's redundant to iterate the whole fds array in setup

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-21 09:07:17 +01:00
Xiang Xiao
20783635d4 arch/sim: Remove the wrong comment from up_allocate_heap
forget from https://github.com/apache/nuttx/pull/11043

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-19 20:23:30 +01:00
bertrand
f5374e71f3 Fix compilation and fix SAM_DMAC_CHINTENCLR settings 2023-11-18 18:39:30 -03:00
Petteri Aimonen
2cf56e0fb3 stm32: Add support for Ethernet packet timestamping and PTP timer
Adds support for hardware timestamping of received Ethernet packets.
The timestamp is available to applications using socket option SO_TIMESTAMP.

Optionally, the Ethernet PTP timer can be used as system high-resolution RTC.
In this mode it supports fine resolution rate adjustment.

Alternatively other time source for CLOCK_REALTIME can be used, and the
PTP timestamps are converted by sampling the clocks and computing the
difference. This results in a few microseconds of uncertainty.
2023-11-18 03:10:45 -08:00
zhanghongyu
bdc934b817 usb_rawgadget: remove halt operation
The halt operation may be causes the raw epread data segment lost, and
usb ep_queue can handle when the usb buffer is full. so remove the
relevant operations.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-11-17 06:38:21 -08:00
raiden00pl
42211cc1c3 nrf91: initial support for GNSS (GPS only for now) 2023-11-16 20:32:41 -08:00
raiden00pl
d38bf3ff2d nrf91/nrf91_modem.c: configure system mode 2023-11-16 20:32:41 -08:00
raiden00pl
18cf6aef16 nrf91/nrf91_modem.c: add support for board-specific modem configuration
this can be used to configure an antenna that is specific to a given board
2023-11-16 20:32:41 -08:00
raiden00pl
4b6213adef nrf91/nrf91_modem_sock.c: fix printf warnings 2023-11-16 20:32:41 -08:00
Masayuki Ishikawa
479dda98ed arch: Disable ARCH_HAVE_FORK for arm64 as a precaution
Summary:
- Temporarily disables ARCH_HAVE_FORK for arm64 to address a crash issue,
  as detailed in https://github.com/apache/nuttx/pull/9755.
- This is a precautionary measure until a more permanent solution is implemented.

Impact:
- Temporarily limits certain functionalities on arm64,
  but necessary to ensure system stability.

Testing:
- Successfully tested on QEMU-8.1.2.
- Note: please apply the changes from https://github.com/apache/nuttx-apps/pull/1962.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-16 00:35:43 -08:00
Xiang Xiao
5ca3e805b2 arch/imx6: Replace cpu_start_t with start_t
avoid the unnecessary typedef

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-16 14:35:48 +09:00
chao an
64cf63475c arch/dumponexit: unify dump on exit to common code
remove arch implement and move to common code

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-15 08:28:25 -08:00
raiden00pl
e1b947cd52 stm32/stm32_foc.c: rename some macros
change the names to be the same as for stm32f7/stm32_foc.c
2023-11-15 03:44:17 -08:00
Xu Xingliang
6e7115ca09 mm: free delay list when exceeding specified count
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2023-11-15 12:05:20 +01:00
Petteri Aimonen
6dabcd567e stm32/samv7: Update SysTick drivers to new up_adjtime() API. 2023-11-14 19:47:40 -08:00
Eren Terzioglu
4033018a72 xtensa/esp32s3: Add XTWDT support 2023-11-14 19:42:33 -03:00
raiden00pl
7d99f01cf7 drivers/foc: get hardware information via lower-half interface 2023-11-14 04:34:49 -08:00
Eren Terzioglu
d92a7011fd xtensa/esp32s3: Add RWDT support 2023-11-13 21:04:30 -03:00
raiden00pl
0e40cc2853 stm32/stm32_adc.c: protect irq_attach with refcounter
irq_attach should only be called once for ADCs that share a common interrupt handler.
We can move irq_attach to just before interrupts are enabled.
2023-11-13 21:03:36 -03:00
raiden00pl
225d5bba6e stm32/foc: add support for board-specific ioctl 2023-11-13 08:40:11 -08:00
Xiang Xiao
459f8235e4 arch/arm: Let's old arm's arm_doirq return register context like armv7-a
and remove the duplicated arm_doirq and arm_ack_irq prototype

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-13 11:41:56 +01:00
Takumi Ando
c076cb1bef rp2040: pwm: Fix errors at CONFIG_PWM_NCHANNELS=1
Perhaps it has never been tested with CONFIG_PWM_NCHANNELS=1.

Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
2023-11-13 11:40:22 +01:00
Xiang Xiao
0d42f1b3cf arch/sim: Replace [enter|leave]_critical_section with up_irq_[save|restore]
since it's enough to protect per cpu data with irq disabling

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-12 18:28:05 +01:00
dongjiuzhu1
b64dd8bed0 sim/raw_gadget: let's raw_epxhandle exit when unregister usbdev
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-11-11 21:09:59 +08:00
dongjiuzhu1
839eaacbcc sim/usbdev: add clase disconnect when usbdev_unregister
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-11-11 21:09:59 +08:00
chenwen@espressif.com
b6e09955dd xtensa/esp32s3: Support multiple PHY init data bin
1. If CONFIG_ESP32S3_PHY_INIT_DATA_IN_PARTITION and CONFIG_ESP32S3_SUPPORT_MULTIPLE_PHY_INIT_DATA are enabled,
PHY initialization data (PHY initialization data is used for RF calibration) will be loaded from a partition.

2. The corresponding PHY init data type can be automatically switched according to the country code,
China's PHY init data bin is used by default, country code can be modified through the wapi command: wapi country <ifname> <country code>.

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2023-11-10 15:55:14 -03:00
chenwen@espressif.com
cc10c54f6c xtensa/esp32s3: Support partition and OTA device
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2023-11-10 15:55:14 -03:00
Xiang Xiao
122558a1de arch/armv8-m: Fix typo error for NVIC_SYSHCON_HARDFAULTPENDED
and the comment too

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-10 15:44:03 -03:00
David Sidrane
a92bd5d081 s32k1xx:Serial Do not wait on TXDMA semaphore
If using flow control with a high CTS the thread may be
    blocked forever on the second transmit attempt due to waiting
    on the txdma semaphore.  The calling thread can then never
    make progress and release any resources it has taken, thus
    may cause a deadlock in other parts of the system.

    The implementation differs in behavior from interrupt-driven
    TX. It should not implicitly wait on a taken semaphore but
    return immediately and let the upper layers decide on what to
    do next.
2023-11-10 22:30:41 +08:00
David Sidrane
8362e3147e s32k3xx:Serial Do not wait on TXDMA semaphore
If using flow control with a high CTS the thread may be
    blocked forever on the second transmit attempt due to waiting
    on the txdma semaphore.  The calling thread can then never
    make progress and release any resources it has taken, thus
    may cause a deadlock in other parts of the system.

    The implementation differs in behavior from interrupt-driven
    TX. It should not implicitly wait on a taken semaphore but
    return immediately and let the upper layers decide on what to
    do next.
2023-11-10 22:30:41 +08:00
David Sidrane
54b4cd3bf3 imxrt:Serial Do not wait on TXDMA semaphore
If using flow control with a high CTS the thread may be
    blocked forever on the second transmit attempt due to waiting
    on the txdma semaphore.  The calling thread can then never
    make progress and release any resources it has taken, thus
    may cause a deadlock in other parts of the system.

    The implementation differs in behavior from interrupt-driven
    TX. It should not implicitly wait on a taken semaphore but
    return immediately and let the upper layers decide on what to
    do next.
2023-11-10 22:30:41 +08:00
Tiago Medicci Serrano
18718316dc esp32/ble: enable the BLE interrupt during a SPI flash operation
This commit sets the BLE's interrupt as a IRAM-enabled interrupt,
which enables it to run during a SPI flash operation. This enables
us to create a cache to off-load semaphores and message queues
operations and treat them when the SPI flash operation is finished.
By doing that, we avoid packet losses during a SPI flash operation.
2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
f94daf09b2 esp32s3/spiflash: Fix comment and remove unused variable 2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
b25793ebac esp32/spiflash: Make it similar to ESP32-S3 by removing cache state 2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
57b8fc9954 esp32/irq: Allow IRAM ISRs to run during SPI flash operation
This commit provides an interface to register ISRs that run from
IRAM and keeps track of the non-IRAM interrupts. It enables, for
instance, to avoid disabling all the interrupts during a SPI flash
operation: IRAM-enabled ISRs are, then, able to run during these
operations.

It also makes the code look more similar to the ESP32-S3 SPI flash
implementation by creating a common `esp32_spiflash_init` that is
responsible to create the SPI flash operation tasks. The function
intended to initialize the SPI flash partions was, then, renamed to
`board_spiflash_init`.
2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
606190d9b3 esp32/ble: fix saving/restoring the interrupt status flags
Whenever we enter/leave a critical section, the interrupt status is
saved and, then, restored. However, for the ESP32's BLE adapter,
entering/leaving a critical section is done on separate functions
that need to be registered as a callback.

The status flag was being saved as a global variable. However,
calling nested enter_critical_section would overwrite this global
variable that was storing the previous flag and, when leaving the
last critical section, the restored status would be different from
the one expected. The proposed solution for this issue is to create
a global array to store the interrupt status flags for nested calls.
2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
c60d5c2ea1 esp32s3/wireless: Fix typo
The CPU 2 interrupt source (which is not used for anything else) is
used to off-load BLE data after a SPI flash operation.
2023-11-10 09:11:35 +08:00
Tiago Medicci Serrano
fae075a749 esp32/ble: Lock the scheduler before creating pinned thread
This ensures that the thread that has been just created doesn't
run before its affinity is set, avoiding it to be scheduled in the
wrong CPU core.
2023-11-10 09:11:35 +08:00
Eren Terzioglu
9997a858e2 xtensa/esp32s2: Add SPI slave support 2023-11-10 00:34:39 +08:00
Eren Terzioglu
77df430f30 xtensa/esp32s2: Add rtc heap support 2023-11-09 23:58:30 +08:00
yinshengkai
bb5b5420ae mm: record the maximum system memory usage
Add the usmblks field to mallinfo to record the maximum space allocated historically in the system

https://man7.org/linux/man-pages/man3/mallinfo.3.html#:~:text=mmap(2).-,usmblks,-This%20field%20is

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-11-09 09:08:49 +08:00
Janne Rosberg
03064b9701 sama5: add support for QSPI 2023-11-08 21:58:02 +01:00
Janne Rosberg
0f5cea7322 sama5/sam_dmac: add define for DMACH_FLAG_PERIPHISMEMORY 2023-11-08 21:58:02 +01:00
chenwen@espressif.com
5239d01dba xtensa/esp32s3: Disable psram as task stack
1. Disable psram as task stack to avoid system blocking.
2. Add some function comments.
2023-11-08 16:25:57 -03:00
chenwen@espressif.com
8d94c1b3cb xtensa/esp32s3: Support malloc from external RAM and internal RAM
Enables the allocation of the entire Userspace heap into SPI RAM and reserving the Internal RAM exclusively for the Kernel heap.
2023-11-08 16:25:57 -03:00
Niklas Hauser
660ac63b92 stm32h7/serial: Do not wait on TXDMA semaphore
If using flow control with a high CTS the thread may be blocked forever
on the second transmit attempt due to waiting on the txdma semaphore.
The calling thread can then never make progress and release any
resources it has taken, thus may cause a deadlock in other parts of the
system.

The implementation differs in behavior from interrupt-driven TX and the
STM32F7 TXDMA . It should not implicitly wait on a taken semaphore but
return immediately and let the upper layers decide on what to do next.
2023-11-08 12:52:30 -05:00