Commit Graph

19758 Commits

Author SHA1 Message Date
Petro Karashchenko
4c71075ea5 arch/arm/stm32h7: multiple fixes for stm32h7 flash interface
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-25 05:37:08 -04:00
chao an
86e3bd9d75 arm/toolchain: update toolchain comment to avoid confusion
1. add 'ARM' prefix to choice menu
2. rename 'Generic Clang toolchain' to 'LLVM Clang toolchain'
   to avoid confuse with CONFIG_ARM_TOOLCHAIN_ARMCLANG

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-25 12:33:46 +08:00
chao an
9804320cae arm/armv6-m: fix build break if enable syntax unified
armv6-m/arm_exception.S: Assembler messages:
armv6-m/arm_exception.S:171: Error: cannot honor width suffix -- `lsl r7,r7,#2'

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-25 12:32:06 +08:00
chao an
09cc29af4d arch/armv6-m: fix compile error on LLVM clang
armv6-m/arm_exception.S:139:2: error: invalid instruction, any one of the following would fix this:
 sub r1, #(4 * (10))
 ^
armv6-m/arm_exception.S:139:2: note: instruction requires: thumb2
 sub r1, #(4 * (10))
 ^
armv6-m/arm_exception.S:139:10: note: invalid operand for instruction
 sub r1, #(4 * (10))
         ^
armv6-m/arm_exception.S:139:2: note: no flag-preserving variant of this instruction available
 sub r1, #(4 * (10))
 ^
armv6-m/arm_exception.S:139:10: note: operand must be a register in range [r0, r7]
 sub r1, #(4 * (10))
         ^
-----------------------------------------

bringup.c:125:18: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
          return ret;
                 ^~~
bringup.c:73:10: note: initialize the variable 'ret' to silence this warning
  int ret;
         ^
          = 0

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-25 00:52:00 +08:00
chao an
539f9a862e arm/cache: fix build warning on LLVM clang
armv7-m/arm_cache.c:93:24: warning: unused function 'arm_clz' [-Wunused-function]
static inline uint32_t arm_clz(unsigned int value)
                       ^

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-24 23:37:30 +08:00
chao an
c629fd1b00 arm/phy62xx: fix compile warning ('while' clause does not guard)
chip/flash.c: In function '_spif_read_status_reg_x':
chip/flash.c:46:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   46 |         while ((AP_SPIF->fcmd &0x02)==0x02);         \
      |         ^~~~~
chip/flash.c:128:3: note: in expansion of macro 'SPIF_STATUS_WAIT_IDLE'
  128 |   SPIF_STATUS_WAIT_IDLE(SPIF_WAIT_IDLE_CYC);
      |   ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-24 20:23:59 +08:00
SPRESENSE
a4df3c0330 arch: cxd56xx: Fix deadlock by using GNSS CEP file on SPI-Flash
If you specify a file path on SPI-Flash in CONFIG_CXD56_GNSS_CEP_FILENAME,
it causes a deadlock issue in the inter-CPU communication. To resolve it,
introduce a new CONFIG_CXD56_GNSS_CEP_ON_SPIFLASH and then use pre-read
buffers during checking CEP file. So this needs the large of free memory.
2022-10-24 19:19:44 +08:00
SPRESENSE
22a29fdc97 arch: cxd56xx: Fix stall bulk xfer when sending 512 byte data
Remove hardware zero length packet enhancement because of driver
logic already processed the ZLP correctly. It is unnecessary and cause
of IN interrupt lost.
2022-10-24 09:02:39 +02:00
Petro Karashchenko
a74dddd2ff arch/risc-v/src/mpfs/hardware: fix alignment in comment
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-24 12:59:24 +08:00
Xiang Xiao
4aad964d48 Fix sam4s_nand.c:152:3: error: this 'while' clause does not guard... [-Werror=misleading-indentation]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-23 22:44:35 +02:00
raiden00pl
f1277a2233 stm32/socketcan: fix the EFF flag for received frames 2022-10-22 17:28:55 +08:00
Tiago Medicci Serrano
16b99ee013 xtensa/esp32s2: add initial support for I2S
Add initial support for the I2S peripheral on ESP32S2.
Add I2S character driver and generic I2S audio driver.
Include i2schar defconfig for ESP32-S2-Saola-1 board.
2022-10-22 15:18:35 +08:00
anjiahao
e1ca516488 use SEM_INITIALIZER inside of NXSEM_INITIALIZER
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +08:00
anjiahao
5724c6b2e4 sem:remove sem default protocl
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +08:00
Michael Jung
ec3805721c armv8-m: Fix MPU Region Limit Address config
On armv8-m the MPU region limits are inclusive.  Thus, we must substract
one byte of size from (base + limit).

Signed-off-by: Michael Jung <michael.jung@secore.ly>
2022-10-21 16:23:49 -03:00
Michael Jung
d4cbb4f5b8 armv8-m: Fix MPU Attribute Indirection reg offsets
Both MPU_MAIR0 and MPU_MAIR1 were off by 0x10.

Signed-off-by: Michael Jung <michael.jung@secore.ly>
2022-10-21 16:23:49 -03:00
raiden00pl
36ae5316b7 include/nuttx/can.h: make error definitions compatible with Linux 2022-10-21 18:47:29 +08:00
Zhe Weng
4ac44bc8b5 arch/sim: fix MTU mismatch on TAP device in host route mode
In host route mode (bridge mode disabled), the d_pktsize of TAP device is not initialized and will be set to CONFIG_NET_ETH_PKTSIZE in netdev_register, while the MTU on host side keeps at 1500. Input packets larger than CONFIG_NET_ETH_PKTSIZE will be dropped because 'IP packet shorter than length in IP header'.
This patch fix this issue by reading MTU from host side and set as d_pktsize, just the same as what is done in bridge mode.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-10-21 16:57:36 +08:00
xiangdong6
924c3d8b5f arch/armv7-r: Fix armclang build warning: L6306W
When a function is known to preserve eight-byte alignment of the stack, armclang assigns the build
attribute Tag_ABI_align_preserved to that function. However, the armclang integrated assembler does
not automatically assign this attribute to assembly code.

Signed-off-by: xiangdong6 <xiangdong6@xiaomi.com>
2022-10-21 13:58:23 +08:00
Gustavo Henrique Nihei
ae8ea29379 xtensa: Save SCOMPARE1 on context switches
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-10-21 11:10:51 +08:00
Xiang Xiao
942513cd37 time: Typedef time_t to int64_t if CONFIG_SYSTEM_TIME64 is defined
to handle 2038 problem correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-20 22:17:52 +02:00
SPRESENSE
0d87694024 arch: cxd56xx: Fix duplicate definitions in battery_ioctl.h
Fix duplicate definitions of arch/arm/include/cxd56xx/battery_ioctl.h
with include/nuttx/power/battery_ioctl.h.
2022-10-20 21:49:07 +02:00
SPRESENSE
2060f7be60 arch: cxd56xx: hostif: Remove -Wformat-truncation warnings
Remove -Wformat-truncation warnings in cxd56_hostif.c.
2022-10-20 21:49:07 +02:00
SPRESENSE
52cbfcf3bd arch: cxd56xx: Remove -Wmissing-braces warning
Remove -Wmissing-braces warning in cxd56_cpu1signal.c.
2022-10-20 21:49:07 +02:00
SPRESENSE
d3ed469f00 arch: cxd56xx: Fix compile warning in cxd56_pwm.c 2022-10-20 21:49:07 +02:00
Javier Casas
663bf4d968 Add support for stm32h7b3xx MCU's flash 2022-10-21 01:37:23 +08:00
Alan Carvalho de Assis
0e4c2fed93 esp32s2: Add DMA support to SPI 2022-10-20 10:11:26 +08:00
Alan Carvalho de Assis
a0a7375911 Fix esp32s2_spi.h offset 2022-10-20 10:11:26 +08:00
Lucas Saavedra Vaz
b0f96fc204 esp32/i2c: Add macros to conform with other peripherals and fix typos
Fix coding style

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-19 20:31:29 -03:00
Hidenori Matsubayashi
544552c305 arch/arm64/arm64_arch_timer: delete unused includes
Delete unnecessary includes.

Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
2022-10-19 23:15:00 +02:00
Lucas Saavedra Vaz
cc04e2137a esp32/i2s: Reduce MCLK multiple to support existing boards 2022-10-20 00:40:24 +08:00
raiden00pl
a3db5fe24b stm32f7: add SocketCAN support 2022-10-20 00:08:36 +08:00
SPRESENSE
c48feac0e9 arch: cxd56xx: gnss: Fix compile error
Fix a compile error caused by
d1d4633 Replace nxsem API when used as a lock with nxmutex API
2022-10-19 14:10:51 +02:00
Fotis Panagiotopoulos
f9fd53cda1 gmtimer: Fixed range of tm_yday. 2022-10-19 12:39:04 +08:00
Xiang Xiao
774648de0f risc0v/bl602: Call kthread_create instead of nxtask_create in bl_os_task_create
since the kernel component should use the kernel thread instead the normal task

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-19 08:22:56 +09:00
raiden00pl
27db9558de stm32/socketcan: fixes for arm_netinitialize 2022-10-18 15:35:21 -03:00
Xiang Xiao
d200cacc49 arch/armv7-r: Fix typo error in commit 4fab2b9501
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 10:31:07 -03:00
Xiang Xiao
6b31918b42 Remove the unnecessary cast for main_t, NULL and argv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 08:51:45 +02:00
Zhe Weng
d8f35cf1b6 arch/sim: calling txdone callback after devif_loopback in netdriver
When devif_loopback handles a packet (like a ping targeting at this dev), it does not call the txdone callback, breaking the tx pipeline and may left some packets unhandled, delayed until next transmit on the network interface.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-10-18 11:16:33 +08:00
Zhe Weng
cb25a9dee3 arch/sim: change g_avail_work and g_recv_work to array in netdriver
Share one worker between multiple simulated network devices may work most of the time, but sometimes breaks the tx pipeline when sending packets on more than one interface at the same time, and leaves some packets unprocessed in network stack, delayed until next transmit on the network interface. The rx process is likely delayed in packet processing under similar situation, so keep g_avail_work and g_recv_work the same number as interfaces.

dev0 tx1 avail              tx1 done
        v                      v
work dev0 tx1 -> dev0 tx1 -> empty -> dev1 tx2 -> dev1 tx3 -> empty
                    ^                    ^           ^          ^
dev1     tx2 avail (failed to queue)  tx3 avail   tx2 done   tx3 done

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-10-18 11:16:33 +08:00
Xiang Xiao
4fab2b9501 arch/armv7-[a|r]: Don't define fiq stack if CONFIG_ARMV7A_DECODEFIQ=n
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 08:01:52 +09:00
Alan Carvalho de Assis
0e091b2486 esp32_qencoder: Fix small issues and typos reported by Tiago Medicci 2022-10-18 03:03:28 +08:00
zouboan
ba2b37e23f Update arch/sparc/include/spinlock.h
Co-authored-by: Alan Carvalho de Assis <alan.carvalho@espressif.com>
2022-10-18 00:55:30 +08:00
zouboan
d51d109d0a arch/sparc build CMN_SRC in common dir to keep up with other arch 2022-10-18 00:55:30 +08:00
zouboan
9b55b0af63 arch/sparc add support of spinlock for LEON3 and LEON4 2022-10-18 00:55:30 +08:00
anjiahao
dee38ce3e8 arch: Replace critical section with nxmutex in i2c/spi/1wire initialization
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
anjiahao
d1d46335df Replace nxsem API when used as a lock with nxmutex API
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
Alan Carvalho de Assis
655faa33d4 ESP32: Add support to Quadrature Encoder
Reviewed-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-17 00:30:53 +02:00
Bernd Walter
947e771c41 fix typo big letter 'o' in hex value for zero. 2022-10-17 02:55:21 +08:00
Hidenori Matsubayashi
ffe8dd39c6 arch/arm64: update for coding style
Replace "unsigned char" with "bool".

Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
2022-10-16 17:20:14 +08:00