Xiang Xiao
27629b74c9
Fix Error: chip/stm32_serial.c:1542:20: error: unused function 'up_serialmod'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
4e6568c29a
Fix Error: chip/stm32l4_dfumode.c:45:20: error: unused function 'rcc_reset'
...
and unused function 'apb_reset'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
4cc52f277b
Fix Error: chip/stm32l4_pwr.c:50:20: error: unused function 'stm32l4_pwr_modifyreg'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
30a153d2a0
Fix chip/stm32l562xx_rcc.c:78:20: error: unused function 'rcc_reset'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
59a747ee36
Fix error: chip/stm32l5_pwr.c:50:20: error: unused function 'stm32l5_pwr_modifyreg'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Lee Lup Yuen
6aba739f05
arch/arm64: Add support for Generic Interrupt Controller Version 2
...
Currently NuttX on Arm64 supports Generic Interrupt Controller (GIC) Versions 3 and 4: [`arm64_gicv3.c`](https://github.com/apache/incubator-nuttx/blob/master/arch/arm64/src/common/arm64_gicv3.c ), [`arm64_gic.h`](https://github.com/apache/incubator-nuttx/blob/master/arch/arm64/src/common/arm64_gic.h ). This PR adds support for GIC Version 2, which is needed by [Pine64 PinePhone](https://lupyuen.github.io/articles/interrupt ) based on Allwinner A64 SoC.
This 64-bit implementation of GIC v2 is mostly identical to the existing GIC v2 for 32-bit Armv7-A ([`armv7-a/arm_gicv2.c`](https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/armv7-a/arm_gicv2.c ), [`armv7-a/gic.h`](https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/armv7-a/gic.h )), with minor modifications to support 64-bit Registers (Interrupt Context).
- `arch/arm64/Kconfig`: Under "ARM64 Options", we added an integer option `ARM_GIC_VERSION` ("GIC version") that selects the GIC Version. Valid values are 2, 3 and 4, default is 3.
- `arch/arm64/src/common/arm64_gicv2.c`: Implements 64-bit GIC v2 based on 32-bit [`armv7-a/arm_gicv2.c`](https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/armv7-a/arm_gicv2.c ) and [`armv7-a/gic.h`](https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/armv7-a/gic.h ), modified to support 64-bit Registers (Interrupt Context).
Function and Macro Names have not been changed, for easier cross-referencing between the 32-bit and 64-bit implementations of GIC v2.
- `arch/arm64/src/common/arm64_gicv3.c`: Added Conditional Compilation for GIC v3. This file will not be compiled if `ARM_GIC_VERSION` is 2.
- `arch/arm64/src/common/arm64_gic.h`: Added the Version Identifier for GIC v2. At startup we read the GIC Version from hardware and verify that it matches `ARM_GIC_VERSION`.
- `arch/arm64/include/qemu/chip.h`: Added the QEMU Base Addresses for GIC v2.
- `arch/arm64/src/common/Make.defs`: Added the source file that implements GIC v2.
- `boards/arm64/qemu/qemu-armv8a/README.txt`: Added the documentation for testing GIC v2 with QEMU.
- `boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig`: Added the Board Configuration `qemu-armv8a:nsh_gicv2` for testing GIC v2 with QEMU. Identical to `qemu-armv8a:nsh`, except that `ARM_GIC_VERSION` is 2.
2022-11-20 21:44:12 -08:00
Xiang Xiao
f28cfbf2f3
Fix chip/stm32_eth.c:3358:20: error: unused function 'stm32_selectrmii'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
720acac6af
Fix chip/stm32_usbdev.c:929:20: error: unused function 'stm32_setstatusout'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
6af9afaa60
Fix error: more '%' conversions than data arguments
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
22768ede17
Fix chip/sam_tc.c:682:24: error: unused function 'sam_tc_getreg'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
d01fbf77d0
Fix chip/sam4l_clockconfig.c:923:20: error: unused function 'sam_enable_fastwakeup'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
d3e282e561
Fix chip/s32k3xx_qspi.c:925:44: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
d8e53d7b4f
Fix error: format specifies type 'unsigned long' but the argument has type 'unsigned int'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
670c3e0e35
Fix chip/s32k3xx_lpi2c.c:624:3: error: unused function 's32k3xx_lpi2c_sem_waitstop'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
987d2561c0
Fix chip/s32k3xx_fs26.c:249:31: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
e18d5870db
Fix chip/s32k3xx_lpspi.c:719:23: error: unused function 's32k3xx_lpspi_readbyte'
...
and chip/s32k3xx_lpspi.c:748:20: error: unused function 's32k3xx_lpspi_writebyte'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
658dfeaf40
Fix chip/kinetis_spi.c:473:23: error: unused function 'spi_getreg8'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
6fd08787b6
Fix chip/kinetis_usbdev.c:3317:1: error: unused function 'khci_epreserved'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
232360cbd0
Fix chip/kinetis_enet.c:875:59: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
9a50c30168
Fix chip/imxrt_enc.c:950:27: error: use of logical '&&' with constant operand
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
4913552140
Fix chip/imxrt_lpspi.c:553:23: error: unused function 'imxrt_lpspi_readbyte'
...
and chip/imxrt_lpspi.c:580:20: error: unused function 'imxrt_lpspi_writebyte'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
3ecf66415c
Fix chip/imxrt_serial.c:1375:20: error: unused function 'imxrt_disableuartint'
...
and chip/imxrt_serial.c:1400:20: error: unused function 'imxrt_restoreuartint'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
9f7d7c046a
Fix chip/imxrt_lpi2c.c:1254:1: error: unused function 'imxrt_lpi2c_getenabledints'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
427f65ac28
Fix chip/imxrt_lpi2c.c:755:1: error: unused function 'imxrt_lpi2c_sem_waitstop'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
f9479885ba
arch/arm64: Move group_addrenv to arm64_syscall_switch
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 08:17:03 -03:00
Xiang Xiao
63bcca985f
arch/armv7-r: Don't clear SCTLR_U bit since spec require it's always one
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-19 14:42:22 -03:00
Xiang Xiao
4d56ef5d8c
arch/armv7-a: Support the big endian in arm_pghead.S like arm_head.S
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-19 14:42:22 -03:00
Xiang Xiao
4abd626288
arch/armv7-r: Remove the nonexistent SCTLR_IE
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-19 14:42:22 -03:00
raiden00pl
04a66d2d3a
arch/stm32g4: fix ADC clock after ef517ed
2022-11-17 19:53:53 +08:00
raiden00pl
f22ef83cd6
arch/stm32f3: fix ADC clock after ef517ed
2022-11-17 19:53:53 +08:00
raiden00pl
b239985037
stm32f30xxx_rcc.c: remove code that refers to STM32F1 specific definitions
2022-11-17 19:53:53 +08:00
qinwei1
8021dfece6
sched/task/task_getpid: getpid should return process id not thread id
...
Summary:
implement the right semantics:
1. getpid should return the main thread id
2. gettid should return the current thread id
Refer to:
https://github.com/apache/incubator-nuttx/issues/2499
https://github.com/apache/incubator-nuttx/pull/2518
Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2022-11-17 17:58:08 +08:00
Ville Juven
596ce5e7b1
riscv/addrenv: Implement up_shmat/shmdt for RISC-V
...
These are great utility functions to create/destroy anonymous mappings
2022-11-17 09:16:54 +08:00
Ville Juven
5c29042ab4
riscv/mmu: Implement mmu_ln_clear
...
Implement procedure to clear a mapping from MMU
2022-11-17 09:16:54 +08:00
Ville Juven
85470adcc3
riscv/addrenv: Make private function get_pgtable into a public one
...
The utility function can be used from other places
2022-11-17 09:16:54 +08:00
Xiang Xiao
e047ca6011
Fix arch/arm/src/samv7/sam_pwm.c:489:1: error: Missing blank line after comment
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-16 14:37:44 -03:00
Ville Juven
093760b48c
mpfs_head.S: Mark .start section attributes explicitly
...
a = allocated, x = executable. Otherwise the input section type will
become empty, which means output section will be empty as well.
2022-11-16 23:32:51 +08:00
Simon Filgis
6376d90c3d
In case of SAMV7 it is possible to overwrite the pwm output with 0 or 1 immediately. Changing the dutycycle to 0 or 100 will take effect only on end of cycle, which could be to late for some applications.
...
This solution adds a overwrite flag and value when updating the duty cycle.
2022-11-16 12:07:09 +08:00
Tiago Medicci Serrano
aa208bd52c
esp32/i2s: remove "esp32_" prefix from private functions
2022-11-15 17:01:47 -03:00
Tiago Medicci Serrano
3b5ab27893
esp32/i2s: implement I2S receiver module
...
- Add ioctl method to enable allocating the apb buffer.
- Add RX methods to set data width, sample rate, channels and
for receiving data from the I2S peripheral.
- Update the i2schar defconfig to enable the I2S receiver.
- Add nxlooper defconfig to enable testing the RX interface.
- Add specific bindings on ESP32 bringup to enable nxlooper
to work without the need of any specific codec.
2022-11-15 17:01:47 -03:00
Tiago Medicci Serrano
7ae4152f47
esp32[-s2]/i2s: fix gpio setting when slave mode is selected
2022-11-15 17:01:47 -03:00
David Sidrane
97930ab110
imxrt:Fix Case ENET_MMFR_OP_RdNOTMII->ENET_MMFR_OP_RDNOTMII
2022-11-15 02:27:35 +08:00
David Sidrane
d05a5d16ee
imxrt:Support TJ1103 PHY
2022-11-15 02:27:35 +08:00
Xiang Xiao
93fe5a3d0d
arch/stm32/1wire: Don't free the context if the reference doesn't equal zero
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-14 11:40:08 -03:00
Xiang Xiao
8a8e115623
arch: Initialize usbhost_connection_s directly
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-14 09:34:04 +09:00
Xiang Xiao
148c544759
Don't check nxsem_init and nxmutex_init
...
since both never fail
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-14 09:34:04 +09:00
Xiang Xiao
e244720aa4
bl602/spi: add reference in bl602_spibus_initialize
...
and unlock the mutex before return
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-14 09:34:04 +09:00
Xiang Xiao
8098c80338
arch: Don't free the context if the reference doesn't equal zero
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-14 09:34:04 +09:00
Xiang Xiao
67686c231a
Call nxmutex_destroy and nxsem_destroy in error patch to avoid the leak
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-14 09:34:04 +09:00
Xiang Xiao
a026dbaece
Call kmm_zalloc instead of kmm_malloc and memsest
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-14 09:34:04 +09:00