Commit Graph

51484 Commits

Author SHA1 Message Date
yinshengkai
ddb87d3b86 clock: replace all up_perf_xx with perf_xx
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-02 16:11:43 +02:00
yinshengkai
b99820744c timer: handle perf count overflow
clock_getcycle always returns an incremented cycle value
If the hardware does not support perf event it will use arch_alarm's up_perf_gettime

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-10-02 16:11:43 +02:00
Alin Jerpelea
244293ce5f Documentation: update gcc download location
Update GCC 10.3 download link to match the curent location

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2023-10-02 17:17:05 +08:00
Hank Wu
f144169f44 Initialize led driver during bringup for nucleo-f446re board. 2023-10-01 19:33:55 +08:00
Ville Juven
8c6be8e1f3 riscv/addrenv: Fix the user VMA end address
The end address was off by 1, making it overflow to 0 (u32 value).
2023-09-29 22:34:40 +08:00
Ville Juven
c57c11c516 mm/kmap: Fix bug in kmm_unmap
Searching the current process mappings for kmappings is quite futile,
do the search in the kernel's mappings instead.
2023-09-29 21:06:16 +08:00
Ville Juven
51f8611fc0 mm/kmap: Change kmm_user_map to kmm_map_user
Naming consistency wrt kmm_map_user_page
2023-09-29 21:06:16 +08:00
raiden00pl
6865697b70 sensors: SENSORS_BMI270_LOAD_FROM_HEAP equals ARCH_DMA_NO_FLASH_TRANSFER 2023-09-29 21:04:02 +08:00
raiden00pl
761bddcab8 arch: add a flag indicating that the chip doesn't support DMA transfer from/to FLASH 2023-09-29 21:04:02 +08:00
raiden00pl
cb04c0a928 boards/nrf52: remove CONFIG_ARMV7M_SYSTICK form tickless configurations 2023-09-29 21:02:46 +08:00
raiden00pl
20a65fa21b arch/nrf{52|53|91}: add support for up_perf 2023-09-29 19:56:21 +08:00
raiden00pl
4ea825ef9e arch/nrf{52|53|91}: fix timer for small intervals and correct CC overflow check 2023-09-29 18:21:01 +08:00
Petteri Aimonen
0611f39cdc adjtime(): Improve configuration and math
1) Previously adjustments less than 1 microsecond per tick would be
   completely ignored. Now they are applied over a shorter period at
   a rate of 1 us per tick.

2) Previously CLOCK_ADJTIME_PERIOD was in units of 1/100th of second.
   Change to milliseconds to be more generally useful unit.
   Change setting name to CLOCK_ADJTIME_PERIOD_MS to make the unit change
   easier to notice.

3) Previously CLOCK_ADJTIME_SLEWLIMIT was in percentage.
   Most clock crystals have better accuracy than 1%, so the minimum slew
   rate was excessive. Change to CLOCK_ADJTIME_SLEWLIMIT_PPM with setting
   value in parts per million.

4) No need to use floating point math in clock_adjtime.c.
2023-09-29 13:03:10 +08:00
Petteri Aimonen
76f6d340ee stm32: Add architecture adjtime() support
Based on the samv7 implementation, adjusts systick period.
2023-09-29 13:03:10 +08:00
Xiang Xiao
cb11747f36 arch: add use_data to g_tcbinfo
to avoid compiler/linker remove it from the final image

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-29 08:00:18 +03:00
raiden00pl
4db39d7afd drivers/rtt: make RTT console optional 2023-09-29 13:00:06 +08:00
Daniel P. Carvalho
024bdcbca0 Fixes compilation warnings. 2023-09-29 12:57:58 +08:00
Ville Juven
7b18f5eb6f risc-v/riscv_addrenv.c: Fix bug where SHM area page tables are not freed
The SHM physically backed memory does not belong to the user process,
but the page table containing the mapping does -> delete the page table
memory regardless.
2023-09-28 22:17:55 +08:00
Ville Juven
2cd1fd1145 risc-v/pgalloc.h: Add SHM area to riscv_uservaddr query
If the vaddr resides within the user's SHM, it is a user memory mapping.
2023-09-28 22:17:55 +08:00
Alin Jerpelea
4e93f93f30 Documentation: update gcc compiler to 10.3
Update the gcc compiler to 10.3-2021.10 to be able to compile the latest NuttX version

Fix for error:
arm-none-eabi-g++: error: unrecognized command line option '-std=gnu++20';
did you mean '-std=gnu++2a'?

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2023-09-28 16:14:50 +08:00
Xiang Xiao
a37759a6a9 drivers/ioexpander: Add const to the value array of multiwritepin
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-28 10:09:51 +08:00
Xiang Xiao
e499c6c1c7 drivers/ioexpander: Add const to the pin array
forget in patch: https://github.com/apache/nuttx/pull/9529

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-28 10:09:51 +08:00
Ville Juven
9be93addea mpfs/mpfs_corespi: Several speed optimizations to the FPGA driver
This is a collection of tweaks / optimizations to the driver to limit
CPU usage as well as interrupt processing times.

The changes are as follows:
- setfrequency is now no-op if the frequency does not change. Accessing
  MPFS_SPI_CONTROL requires synchronization to the FIC domain, which
  takes unnecessary time if nothing changes
- load/unload FIFO loops optimized so !buffer, priv->nbits and i==last are
  only tested once (instead of for every word written in loop).
- Disable the RX interrupt only once (again, FIC domain access is slow)
- In case a spurious MPFS_SPI_DATA_RX interrupt arrives, just wipe the
  whole RX FIFO, instead of trying to read it byte-by-byte
2023-09-28 09:36:07 +08:00
Eren Terzioglu
ded321a515 xtensa/esp32s2: Add support to TWAI/CANBus controller 2023-09-28 09:35:08 +08:00
TimJTi
fc76b9955c Sort XDMA support for SAMA5D2 ADC&TSD 2023-09-28 09:33:35 +08:00
Daniel P. Carvalho
e45e932a8a Adds low level operations to start and stop DMA. 2023-09-28 09:32:52 +08:00
liqinhui
8014f51cc1 net/local: Allow the local udp socketpair function to use the local_release_fifos interface.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-09-27 19:28:02 +08:00
anjiahao
ae9d9054af zipfs:Add Documentation for zipfs
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-09-27 01:06:04 +08:00
anjiahao
a2c5cb729a fs:support zipfs,can mount zipfile
we can mount a zipfile in nuttx use mount command like this:

mount -t zipfs -o /data/test.zip /zip

The zipfs is a read only file system,The advantage is that it
does not occupy additional space when reading the decompressed file.

When used, reading and decompression operations are simultaneous.
The known disadvantage is that when using seek to read forward,
it will reopen and cause slow speed problems.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-09-27 01:06:04 +08:00
Petteri Aimonen
bedcc5fc04 Add CONFIG_NET_ICMPv6_ROUTER_LIFETIME
Allows setting the advertised route lifetime, and also to set
it to 0 for advertising only the prefix.

From RFC4861:

   A router might want to send Router Advertisements without advertising
   itself as a default router.  For instance, a router might advertise
   prefixes for stateless address autoconfiguration while not wishing to
   forward packets.  Such a router sets the Router Lifetime field in
   outgoing advertisements to zero.
2023-09-27 00:51:20 +08:00
xucheng5
366628bf5a dma: support source/destination address auto step
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-09-27 00:47:02 +08:00
likun17
f99b1a41a3 nuttx/drivers: add regmap subsystems support.
regmap: add i2c and spi bus support.

Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-27 00:46:51 +08:00
TimJTi
7c4349fa9c TSD behaviour incorrect if ADC software trigger set. Pressure scaling wrong. 2023-09-27 00:15:20 +08:00
Xiang Xiao
ee3d2d1c0d video/goldfish: Remove the vsync residual code
forget from patch:
commit bbf5b0bb6d
Author: jianglianfang <jianglianfang@xiaomi.com>
Date:   Tue Aug 15 19:47:14 2023 +0800

    driver/video: adapting Goldfish FB to VSync optimized FB driver

    The circbuf part is implemented by the fb driver, and goldfish needs to
    delete the part related to circbuf and adapt to the interface of the fb
    driver.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 22:51:12 +08:00
Petteri Aimonen
a2da12a67e Fix dependencies of CONFIG_SCHED_CPULOAD_ settings
CONFIG_SCHED_CPULOAD_EXTCLK doesn't actually require tickless mode.
As long as the platform provides external call to nxsched_process_cpuload(),
it will work in either tickless or ticking mode.
Removed Kconfig dependency.

Instead, CONFIG_SCHED_CPULOAD_SYSCLK does require ticking mode to work,
as documented in CONFIG_SCHED_CPULOAD help text.
Added the dependency to Kconfig also.
2023-09-26 22:13:37 +08:00
Petteri Aimonen
d68c8ec560 stm32_eth: Fix excessively long critical section in ifdown handler
stm32_ifdown() holds critical section when calling stm32_ethreset().
That function used to call up_mdelay(10) while waiting for the ethernet
peripheral reset to complete. This resulted in excessively long
critical section time with interrupts disabled.

The actual expected delay is a few clock ticks of the 50 MHz clock domain.
This commit changes polling interval to 1us and maximum to 10us.
2023-09-26 22:13:24 +08:00
Alin Jerpelea
e09aa5b7f9 Documentation: split the ReleaseNotes
Our releases contain links to github PR and lots of text so we
are splitting the release notes to individual files
This change should
- improve readability
- reduce the ReleaseNotes file for each release.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2023-09-26 20:41:00 +08:00
Alin Jerpelea
4137fb5fdf Documentation: move ReleaseNotes
Move the release notes under Documentation folder for future cleanup

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2023-09-26 20:41:00 +08:00
Xiang Xiao
2acd975435 assert: Skip to include arch/board/board.h if CONFIG_ARCH_LEDS=n
follow up the change: https://github.com/apache/nuttx/pull/10553

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 15:41:35 +08:00
Xiang Xiao
167c4ae2a4 arch/arm: Fix error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 15:03:59 +08:00
anjiahao
5d6f6f2d47 mm:fix warning
mm_heap/mm_initialize.c:69:11: warning: array subscript -1 is outside array bounds of 'void[2147483647]' [-Warray-bounds]
   69 |       node->pid = MM_BACKTRACE_MEMPOOL_PID;
      |           ^~
mm_heap/mm_initialize.c:64:9: note: at offset -16 into object of size [0, 2147483647] allocated by 'mm_memalign'
   64 |   ret = mm_memalign(arg, alignment, size);

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-09-26 14:12:59 +08:00
hujun5
b6693065e7 pthread_once: g_lock may lead deadlock
For programs with the dependencies logic in pthread_once callback , using global locks may cause deadlock:

task A
pthread_once()
|
|-> nxrmutex_lock(&g_lock);
 -> init_routine(); // callback to wait task B
                                                  task B
                                                  pthread_once()
                                                  |
                                                   ->nxrmutex_lock(&g_lock); // Deadlock
                                                   ->init_routine(); // hold resource to wake up task A

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-09-26 10:13:00 +08:00
Xiang Xiao
f02ad03124 Fix error: 'mmcsd_general_cmd_read' defined but not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 00:45:50 +03:00
ligd
dc096f951e list: update list.h
The function name comes from list.h inside Linux,
but rewrite from scratch to avoid the copyright issue.
Since many developers are familiar with Linux list API.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-09-26 00:15:21 +08:00
wanggang26
50cad1536d emmc: add get emmc cid register interface.
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-25 23:29:34 +08:00
Xiang Xiao
b172de378d Fix make[1]: *** No rule to make target '.header', needed by 'context'. Stop.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-25 23:29:05 +08:00
raiden00pl
3f1417ef8d boards: add nrf9160-dk board support (nrf52840 chip) 2023-09-25 23:06:39 +08:00
Xiang Xiao
1edcea3997 arch/Kconfig: Add prompt string to ARCH_CHIP_CUSTOM
so the user could enable it from defconfig

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-25 23:02:37 +08:00
shipei
f99f67378d audio:add state sync for virtio snd device
qemu host virtio device don't support recvice the same cmd like start/stop twice
Signed-off-by: shipei <shipei@xiaomi.com>
2023-09-25 21:04:59 +08:00
xuxin19
ed5b3766dc tools/Unix.mk:ignore Kconfiglib menuconfig module warning
terminal character redirection will cause curselib errors.
the warning check has been completed before the menuconfig execution phase.
so lets ignored here.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-25 21:04:43 +08:00