Commit graph

6704 commits

Author SHA1 Message Date
Alin Jerpelea
0bfa46497d drivers/spi/ice40: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Copyright and Author information is missing from the License and was filled with
commit authorship
    Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Andre Heinemans
f4e650352e sensors: fix Make.defs for bmm150 2024-12-16 10:27:21 +08:00
chao an
01e76ddcd9 limits/path: replace CONFIG_PATH_MAX to PATH_MAX to ensure consistency
replace CONFIG_PATH_MAX to PATH_MAX to ensure consistency

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-10 21:56:57 +08:00
lipengfei28
aa1df4e9a9 pci: fix pci dev alloc bridge mem error
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-12-06 21:12:24 +08:00
wangmingrong1
6e3f8d0356 virtio: fix compile error
CC:  virtio/virtio-mmio.c virtio/virtio-mmio.c: In function 'virtio_mmio_config_virtqueue':
virtio/virtio-mmio.c:346:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  346 |       addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.desc);
      |              ^
virtio/virtio-mmio.c:350:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  350 |       addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.avail);
      |              ^
virtio/virtio-mmio.c:354:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  354 |       addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.used)

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-06 20:32:21 +08:00
wangmingrong1
75fc19d729 virtio: Fix the problem of incorrect setting of virtio queue address under tags kasan
There is also a printing error due to https://github.com/apache/nuttx/pull/15043:
Configuration/Tool: rv-virt/virt_nsh
In file included from virtio/virtio-mmio.c:29:
virtio/virtio-mmio.c: In function 'virtio_mmio_init_device':
Error: virtio/virtio-mmio.c:826:14: error: format '%d' expects argument of type 'int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  826 |       vrterr("Version %d not supported!\n", vdev->id.version);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     uint32_t {aka long unsigned int}
virtio/virtio-mmio.c:826:24: note: format string is defined here
  826 |       vrterr("Version %d not supported!\n", vdev->id.version);
      |                       ~^
      |                        |
      |                        int
      |                       %ld
cc1: all warnings being treated as errors
make[1]: *** [Makefile:109: virtio-mmio.o] Error 1
make[1]: Target 'libdrivers.a' not remade because of errors.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-05 21:23:30 +08:00
hujun5
1ab1dbc0f0 wm8776: use small lock in drivers/audio/wm8776.c
reason:
We hope to remove all instances of spin_lock_irqsave(NULL).

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-05 21:22:32 +08:00
zhangyuan29
060fda032b drivers/net: change netdev_lower_quota_load to macro.
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-05 13:26:22 +08:00
zhangyuan29
dcea1b90e7 arch_atomic: only support atomic_xx and atomic64_xx function
Modify the kernel to use only atomic_xx and atomic64_xx interfaces,
avoiding the use of sizeof or typeof to determine the type of
atomic operations, thereby simplifying the kernel's atomic
interface operations.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-04 14:03:14 +01:00
wangmingrong1
eed302b8bb virtio: Add virtio version check
In the source code of qemu or linux, there is a check for the virtio version
/* Check device version */
priv->version = readl(priv->base + VIRTIO_MMIO_VERSION);
if (priv->version < 1 || priv->version > 2) {
	debug("(%s): version %d not supported!\n",
	udev->name, priv->version);
	return 0;
}
/* Check device ID */
uc_priv->device = readl(priv->base + VIRTIO_MMIO_DEVICE_ID);
if (uc_priv->device == 0) {
	/*
	* virtio-mmio device with an ID 0 is a (dummy) placeholder
	* with no function. End probing now with no error reported.
	*/
	return 0;
}

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-04 19:49:26 +08:00
chao an
93a34b1992 drivers/timers: export arch timer api to support higher resolution
Before:
[  384.149000] [CPU0] [ 5] Hello World!
After:
[  384.149947] [CPU0] [ 5] Hello World!

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-04 10:52:26 +01:00
gaohedong
9fb84700a8 com/can: Remove unnecessary judgment logic
The feature of preventing the same ID frame rotation should be done in the lowerhalf, not in the upperhalf.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2024-12-03 08:48:18 +08:00
Jukka Laitinen
140b3080c5 drivers/audio/wm8994.c: Include nuttx/arch.h to fix compilation (up_mdelay prototype)
Fix the compilation error:

  audio/wm8994.c: In function 'wm8994_audio_output':
  Error: audio/wm8994.c:1898:3: error: implicit declaration of function 'up_mdelay' [-Werror=implicit-function-declaration]
   1898 |   up_mdelay(40);
        |   ^~~~~~~~~

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-12-02 13:14:22 +02:00
pengyiqiang
257339a442 video/fb: fix integer overflow issue
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-12-02 13:30:50 +08:00
Simon Filgis
6135892d66 driver for STUSB4500
right now it is only possible to change the delivered power on the fly
by
1. selecting PDO2 slot
2. write to POO2
3. renegotiate power delivery by sw reset command
2024-11-30 08:40:08 -03:00
wangjianyu3
5fbf377214 sensors/fakesensor_uorb: Using different nbuffer for each topic of GNSS
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 14:10:57 +08:00
wangjianyu3
d2dd747e09 drivers/sensors/gnss: Different nbuffer for each topic
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 14:10:57 +08:00
wangjianyu3
f1a57f4265 drivers/sensors/gnss: Add suffix to macro of geofence index
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 03:16:25 +08:00
Michal Lenc
a8d4ed910d st7789: add configuration option to set default background color
ST7789 fills the display with 0xffff color during its initialization.
This color may or may not be overwritten by a higher layer (framebuffer
or lcd driver for example). The color remains on the display until
application UI is started if not overwritten by the higher layer before.

This commit adds configuration option LCD_ST7789_DEFAULT_COLOR that
allows to set the default background color. This may avoid shining
display with, for example, white color for an extensive amount of time.
The default value is set to 0xffff previously hard-coded in the driver,
therefore current implementations will not notice the change.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-11-29 18:32:22 +08:00
lipengfei28
f589d5a4c7 pci: pci res have pci addr and cpu addr, ecam use map translation pci
addr to cpuaddr

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-11-29 11:12:54 +08:00
lipengfei28
b44fb53b61 pci:map bar should not be zaro len
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-11-29 11:12:54 +08:00
lipengfei28
c2cd503f66 pci: add /dev/pci,used for pciutils
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-11-29 11:12:54 +08:00
simbit18
9c9b945876 fix nxstyle
Removed extra spaces from .h and .c files
2024-11-28 20:40:13 +08:00
zhanghongyu
ba419cc894 drivers/net/{e1000|igc}: limit no packet is transmit after carrier off
if the drvier tx queue is full up during the network cable unplugging,
there will be no txdone interrupt after inserting the network cable,
transmit cannot be recovered.

Modified to no longer fill the driver with packet when link down.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-11-27 02:46:04 +08:00
p-szafonimateusz
0932fccfb2 drivers/net/{e1000|igc}: reset TX ring when disconnected
drivers/net/{e1000|igc}: reset TX ring when disconnected

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-27 02:46:04 +08:00
p-szafonimateusz
ada47439bd drivers/net/{e1000|igc}: fix link status crash
netdev_lower_carrier_xxx API can't be used in interrupt context

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-27 02:46:04 +08:00
p-szafonimateusz
5e48f2a3d8 drivers/net/igc: make Interrupt Throttle configurable
make Interrupt Throttle configurable for igc

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-27 02:46:04 +08:00
p-szafonimateusz
bf4eadf735 drivers/net/{e1000|igc}: configure RX/TX descriptors from Kconfig
configure E1000/IGC RX/TX descriptors from Kconfig

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-27 02:46:04 +08:00
Xiang Xiao
573115734d Revert "drivers/pipes: return after short write if buffer is full"
This reverts commit d0680fd1bc.
2024-11-26 11:08:02 -03:00
hujun5
eb65c5a8cd note: Remove enter_critical_section from the sched_note module to avoid recursive calls.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-26 10:14:02 +08:00
chao an
6ffb001fdf spelling: fix spelling typo premption -> preemption
Signed-off-by: chao an <anchao@lixiang.com>
2024-11-25 22:05:05 +08:00
simbit18
7df0e945ad Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
Remove extra TABs
Add comments
2024-11-20 16:45:40 -03:00
Huang Qi
fd1b52579b Fix some minor style issues
Fix typo and comment style in:
* audio/audio_comp.c
* drivers/drivers_initialize.c
* drivers/pipes/fifo.c

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-11-20 10:51:07 +01:00
liamHowatt
27e587b179 arch/esp32s3: fb add pandisplay
Signed-off-by: liamHowatt <liamjmh0@gmail.com>
2024-11-19 20:51:50 +08:00
YAMAMOTO Takashi
aa8aa444c2 drivers/syslog/syslog_channel.c: remove a duplicated comment 2024-11-18 19:10:24 +08:00
buxiasen
f0185cf4db Revert "drivers/pm: pm_smp remove sched_lock"
Now we already support sched_lock for per cpu/tcb

This reverts commit 731af5b42f.
2024-11-18 19:10:14 +08:00
YAMAMOTO Takashi
637a0f5af2 SYSLOG_DEFAULT: avoid using critical section in certain cases
Note that SYSLOG_DEFAULT can be used in extreme situations,
including very early in the boot.
2024-11-18 13:52:53 +08:00
YAMAMOTO Takashi
b990b25b8e Reapply "SYSLOG_DEFAULT: wrap up_putc/up_nputs calls with critical section"
This reverts commit 35240d77fa.
2024-11-18 13:52:53 +08:00
p-szafonimateusz
1b303c2888 drivers/reset/core.c: fix gcc14 error
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-17 08:31:08 -03:00
Xiang Xiao
50de39acd5 note/noteram_driver: Remove the unused variable j
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-17 08:31:08 -03:00
Xiang Xiao
72fbbbdbf3 sensors/bmi160_uorb.c: Fix the typo error
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-17 08:31:08 -03:00
Xiang Xiao
2c9d412d1c serial/pci: Remove the product specific config
since the driver could detect them automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-17 08:40:26 +01:00
Xiang Xiao
d7209fabf4 pci: Remove igc produt config
to simplify the configuration since the driver could detect the device correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-17 08:40:26 +01:00
yezhonghui
775ff286a4 pci e1000 net delete produce config
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-11-17 08:40:26 +01:00
Bowen Wang
eede50f465 pci_ivshmem: return back to polling mode when interrupt mode invalid
Improve the pci ivshmem device compatibility, do not return error when
irq mode init failed, fallback to the polling mode as mush as possible.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-11-17 08:40:26 +01:00
Xiang Xiao
87d57d283e Fix timers/arch_alarm.c:109:3: error: 'now' may be used uninitialized
and timers/arch_alarm.c:150:51: error: 'ticks' may be used uninitialized

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-16 17:41:15 +01:00
Xiang Xiao
f2693004b8 drivers/adc: Rename up_ads1255initialize to ads1255_initialize
since the common driver shouldn't have the prefix 'up_'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-16 17:39:27 +01:00
chao an
238cddde3a drivers/syslog: remove implement of syslog_putc()
syslog_putc() have a lot of duplicate logic with syslog_write().
remove syslog_putc() and reuse syslog_write() to simplify syslog printing.

Signed-off-by: chao an <anchao@lixiang.com>
2024-11-15 19:46:36 +08:00
chao an
5cc5decd64 can/sja100: leave critical section properly
leave critical section properly before return

Signed-off-by: chao an <anchao@lixiang.com>
2024-11-15 18:24:51 +08:00
buxiasen
f1e1aab3b7 segger/stream_rtt: fix warning after stream update
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-15 15:54:26 +08:00