Commit Graph

48753 Commits

Author SHA1 Message Date
raiden00pl
a1aecd7369 {stm32/stm32l4/stm32f7/stm32h7/efm32}/otgdev: remove invalid use of the priv field for EP
This field is for use in the class driver, not in the controller logic
2023-03-24 09:13:05 -07:00
raiden00pl
0b4b35c80a include/nuttx/usb/usbmsc.h: fix compiler error when USBMSC_COMPOSITE=y
usbdev/usbmsc.c:1758:5: error: conflicting types for 'usbmsc_classobject'; have 'int(void *, struct usbdev_devinfo_s *, struct usbdevclass_driver_s **)'
 1758 | int usbmsc_classobject(FAR void *handle,
      |     ^~~~~~~~~~~~~~~~~~
In file included from /home/raiden00/git/RTOS/nuttx/nuttx/include/nuttx/usb/usbdev.h:36,
                 from usbdev/usbmsc.c:68:
/home/raiden00/git/RTOS/nuttx/nuttx/include/nuttx/usb/usbmsc.h:173:5: note: previous declaration of 'usbmsc_classobject' with type 'int(void *, struct usbdev_devinfo_s *, struct usbdevclass_driver_s **)'
  173 | int usbmsc_classobject(FAR void *handle,
2023-03-24 17:23:24 +02:00
raiden00pl
13a96c7eb7 {stm32f7,stm32h7}/otg: fix compilation for USBDEV when USB_DEBUG=y 2023-03-24 08:16:06 -07:00
Petro Karashchenko
5651715486 signal: remove unused SIGCONDTIMEDOUT
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-23 17:17:25 -06:00
Gregory Nutt
104a7d4e00 Correct Real Time signal definitions.
There are number problems with the implementation of realtime signals in NuttX as discussed in Issue #8869.  A first step to correcting any of these is to correct the definitions of SIGRTMIN, SIGRTMAX, and RTSIG_SIX.

SIGRTMIN is the first real-time signals.  Real-time signal numbers must not overlap the standard signal numbers.  Before this fix, it was set equal to the first standard signal.  Real-time signals differ from standard signals in that (1) they have no default actions, and (2) real time signal actions are prioritized whereas standard signal actions are processed FIFO.

SIGRTMAX is the last real-time signal.

RTSIG_MAX must be set equal to maximum number of realtime signals reserved for application use

The change corrects the definitons but has not impact at all becasuse none of there definitions are currently used in the OS.  But they will be when prioritized real time signal handling is implemented.
2023-03-23 21:56:13 +02:00
Dong Heng
663b4c4f34 xtensa/esp32: Tasks use PSRAM as stack can do SPI flash read/write/erase/map/unmap 2023-03-23 09:26:09 -03:00
Matthias Grob
d1113110f3 armv7-m irq: avoid uninitialized warning/error
arm-none-eabi-gcc 12.2.0 gives the following warnings:
error: 'primask' is used uninitialized
error: 'primask' may be used uninitialized

We use Werror and the file is indirectly included in different
places. I suggest telling the compiler to ignore these warnings
since primask is initialized on the first assembly line.

This is the only problem I encountered so far when upgrading the compiler.
2023-03-23 04:02:43 -07:00
wangbowen6
5d53c8299e fs/fs_epoll: add oneshot list to handle the EPOLLONESHOT correctly
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-03-23 09:43:27 +02:00
SPRESENSE
e317af0a84 arch: cxd56xx: Fix SPI transfer without DMA
SPI transfers are dynamically determined to use DMA or not.
The flag to judge is removed in a previous simple refactoring commit.
Revert the logic and fix an issue that SPI transfer fails.
2023-03-23 08:34:29 +01:00
Masanari Iida
7ac80d4e59 Documentation: Fix some spelling typos in index.rst
This patch fixes some spelling typos in index.rst.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
2023-03-22 17:28:58 -03:00
chao an
bafef6b3d3 stm32/photon: Use D0 Busy to detect Write Complete
1. Enable CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE to use D0 Busy to detect Write Complete
2. Increase bcmf frame pool to 16
3. Increase NET_ETH_PKTSIZE to 1518 to compatible with net MTU

Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 17:26:52 -03:00
chao an
cdcdce16f7 wireless/bcm43xxx: enter power saving only if IEEE80211_BROADCOM_LOWPOWER enabled
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 17:26:52 -03:00
chao an
266774939f wireless/bcm43xxx: downgrade log level of allocate frame fail
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 17:26:52 -03:00
chao an
4e3480554d mmcsd/sdio: enlarge cmd53 timeout to 1s
cmd53 need a longer tolerance on some slow devices

Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 17:26:52 -03:00
Xiang Xiao
901cd599b1 arch: Remove MIN macro definition
use the definition from sys/param.h instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-22 17:26:37 -03:00
Petro Karashchenko
a261439b8b libs/libx: relax compiler check for workaround with "GCC 12.2"
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-21 21:59:30 -03:00
Petro Karashchenko
33a4a61cfb arch/xtensa/esp32: Workaround -Wmaybe-uninitialized warning with "GCC 12.2"
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-21 21:59:30 -03:00
Petro Karashchenko
f84f30fe17 tools/ci: upgrade to the latest Xtensa ESP32 toolchains
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-21 21:59:30 -03:00
jturnsek
1d7383d4a1 imxrt_flexpwm independent output B support added 2023-03-21 21:03:39 +02:00
chao an
2005076345 photon/wlan: enable more configs to make debuging more friendly
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-21 14:40:44 -03:00
chao an
1b46484849 mmcsd/sdio: fix potential race condition in sdio
sdio driver should ensure the thread safety

Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-21 14:40:44 -03:00
Lwazi Dube
84a3ddd79b boards/sama5d3-xplained: Fix OHCI clock.
Choose a divider value that matches the description provided within
the same header file.
Include stddef.h to fix compiler errors because NULL is not defined.
Make logs print protocol, vid and pid consistently, (decimal hex hex).
2023-03-21 14:08:03 -03:00
Zhe Weng
c9a38f42f7 sched/wqueue: Do as much work as possible in work_thread
Decouple the semcount and the work queue length.

Previous Problem:

If a work is queued and cancelled in high priority threads (or queued
by timer and cancelled by another high priority thread) before
work_thread runs, the queue operation will mark work_thread as ready to
run, but the cancel operation minus the semcount back to -1 and makes
wqueue->q empty. Then the work_thread still runs, found empty queue,
and wait sem again, then semcount becomes -2 (being minused by 1)

This can be done multiple times, then semcount can become very small
value. Test case to produce incorrect semcount:

high_priority_task()
{
  for (int i = 0; i < 10000; i++)
    {
      work_queue(LPWORK, &work, worker, NULL, 0);
      work_cancel(LPWORK, &work);
      usleep(1);
    }

  /* Now the g_lpwork.sem.semcount is a value near -10000 */
}

With incorrect semcount, any queue operation when the work_thread is
busy, will only increase semcount and push work into queue, but cannot
trigger work_thread (semcount is negative but work_thread is not
waiting), then there will be more and more works left in queue while
the work_thread is waiting sem and cannot call them.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-21 17:50:40 +02:00
Lucas Saavedra Vaz
2d5a9e72b2 boards/xtensa/esp32-lyrat: Add support for audio input 2023-03-21 12:13:59 -03:00
Lucas Saavedra Vaz
326261dd7d drivers/audio/es8388: Add input support 2023-03-21 12:13:59 -03:00
yinshengkai
64e7e43f1f drivers/note: adjust the note_driver_ops definition
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-21 12:13:38 -03:00
yinshengkai
9ecaa022c8 note: fix assignment warning
note/note_driver.c:154:7: warning: unsigned conversion from ‘int’ to ‘unsigned char’ changes value from ‘65535’ to ‘255’ [-Woverflow]
  154 |     , CONFIG_SCHED_INSTRUMENTATION_CPUSET
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-21 12:13:38 -03:00
yinshengkai
d73fb5ca21 note: fix sched_note_suspend logic error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-21 12:13:38 -03:00
yinshengkai
cb06ad5ec4 note: fix sched_note_begin/end parameter error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-21 12:13:38 -03:00
yinshengkai
926bfe5818 include/assert: fix nxstyle
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-21 12:09:45 -03:00
yinshengkai
216483f96b include/compiler: replace likely to predict_true
likely is defined repeatedly in an external library

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-21 12:09:45 -03:00
Alan Carvalho de Assis
b91042e5a0 avr: Add support to Atmega mega1284p_xplained board 2023-03-21 16:30:44 +02:00
chao an
c839fc45af libc/settimeofday: correct prototype of settimeofday()
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-21 11:16:30 -03:00
wangbowen6
52525796ab openamp: libmetal compile pass with arm64 arch
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-03-21 07:43:20 +01:00
Christian Rauch
f57814999a fix typo cyles -> cycles 2023-03-21 00:18:13 +01:00
Huang Qi
fab77cd322 drivers/pty: Echo input by default
Align the pty behavior to linux/bsd,

Also fix the ECHO issue with microadb after https://github.com/apache/nuttx/pull/8691.

adb shell will echo normally with this patch.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-21 07:23:17 +09:00
Gustavo Henrique Nihei
d4e6d9ab77 xtensa/esp32: Update bootloader patch to recent ESP-IDF version
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-20 21:14:00 +01:00
Sebastien Lorquet
13d823f307 spi_xx25xx: Repair the spi bus locking mechanism when waiting for write completion 2023-03-20 07:08:16 -07:00
Shoukui Zhang
947100c5b8 sim: Fix iic/spi bus open failed
when CONFIG_SIM_I2CBUS or CONFIG_SIM_SPI enabled,the iic/spi
bus will report open failed

Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2023-03-20 14:17:35 +01:00
xinbingnan
14d1f3b995 sim_linuxi2c: fix snprintf parameter
use `sizeof` instead of constant number

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-03-20 10:18:44 +01:00
ligd
bb281eedfa cache: add up_get_xcache_linesize() support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-03-20 17:17:22 +08:00
Xiang Xiao
673a4aabf5 arch: Set the default value of ARCH for x86_64
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-20 09:16:44 +01:00
Lwazi Dube
f5575b1b85 boards/sama5d3-xplained: Add reboot support.
The peripheral reset flag was added to speed up the reboot.
Rebooting takes too long (15 seconds) if this flag is not set.
2023-03-20 09:13:37 +01:00
Hiroki Noda
cc2b0e2594 Documentation/quickstart: update link for USBIP in WSL2 2023-03-20 08:58:14 +01:00
Xiang Xiao
e7090022a0 drivers/serial: Fix some typo error report in https://github.com/apache/nuttx/pull/8843
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-20 08:08:04 +01:00
Xiang Xiao
75cf216861 sim/adb: Enable CONFIG_NSH_CONSOLE_LOGIN
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-19 14:54:59 -06:00
Xiang Xiao
d9a8d5f2ee usb/cdcacm: Remove the process for tc_iflag, tc_oflag and tc_lflag
since the common code in serial.c already handle them correctly:
https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L1556-L1601

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-19 14:54:59 -06:00
Xiang Xiao
b63994b7f7 drivers/serial: Always support c_oflag, c_iflag and c_lflag in termios
CONFIG_SERIAL_TERMIOS only decide whether to support c_cflag field since
many terminal application need the first three fields to work correctly.
For more information please reference:
https://www.mail-archive.com/dev@nuttx.apache.org/msg09321.html

before this change(olimexino-stm32:tiny):
   text    data     bss     dec     hex filename
  34884     328    1768   36980    9074 nuttx
after this change:
   text    data     bss     dec     hex filename
  35052     340    1768   37160    9128 nuttx
delta
   text    data     bss     dec     hex filename
    168      12       0     180      b4 nuttx

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-19 14:54:59 -06:00
zhangyuan21
cf56e4113a arch: remove unnecessary sem_setprotocol code
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-17 16:53:19 -03:00
Gustavo Henrique Nihei
c44d55c70c risc-v/espressif: Fix bootloader and app potential IRAM overlap
Related to a recent fix from esp-idf:
0fb0be3817

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-17 16:51:52 -03:00