The struct video_buffer are currently used with `struct k_fifo`, which
require them to preserve the first word of data for use by the kernel.
Move the first fields to make it possible to keep using video buffers in
FIFO safely.
Fixes#92526
Signed-off-by: Josuah Demangeon <me@josuah.net>
Rename and clarify the @defgroup SENSOR_AXIS_ALIGN to better reflect its
purpose. Replace the vague "DT Options" title with a more descriptive
name: "Sensor axis alignment DT options".
This improves documentation clarity for developers configuring sensor
orientation via Device Tree.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
This commit fixes the content of the log messages that appear when an
error occurs while applying the pinctrl.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
IRQ 1 is used by the LiteX timer, so we can't use it for the test:
gen_isr_tables.py: error: multiple registrations at table_index 1 for
irq 1 (0x1)
Existing section
['.irq.WEST_TOPDIR/zephyr/tests/kernel/gen_isr_table/src/main.c.0'],
new section .irq.WEST_TOPDIR/zephyr/drivers/timer/litex_timer.c.0
Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the
same irq multiple times?
Issue #92194
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Some boards fail to build arch.interrupt.gen_isr_table_local.riscv test
since this region is too small:
riscv64-zephyr-elf/bin/ld.bfd: zephyr/zephyr_pre0.elf section `.intList'
will not fit in region `IDT_LIST'
riscv64-zephyr-elf/bin/ld.bfd: region `IDT_LIST' overflowed by 239 bytes
This is a bogus memory region, so increasing it has no effect on the
final binary size.
Issue #92194
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Move the IronSide APIs to soc/nordic from drivers/firmware since
these are vendor specific APIs. The header files are now included
from <nrf_ironside/*.h>. Adjust code that uses these APIs accordingly.
Also move the DT binding for "nordic,ironside-call" from
bindings/firmware to bindings/misc.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
nordic,entropy-prng does not exist in Zephyr (it is part of NCS)
but we have in both the nordic,nrf-cracen-ctrdrbg which is
an actual source of true entropy and works with this SOC.
Let's use that instead.
Fixes failures to build targeting the nrf54lm20dk any test/sample
which uses the entropy driver.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
By default west looks at the parents directory to find Zephyr base
directory. However, in the case the build directory is not a subdirectory
of zephyr base and the user run "ninja flash" directly from the build
directory, west fails to detect Zephyr base.
So, this patch explicitly add ZEPHYR_BASE in the environment.
Implementation notes:
* ZEPHYR_BASE is already set for ninja menuconfig in
cmake/modules/kconfig.cmake:201
* ZEPHYR_BASE seems better than --zephyr-base since the environment in
inherited
* BTW, --zephyr-base seems to not have any impact and seems broken
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
htons() takes uint16_t as argument. Add the 'u' suffix to the
TTL constants to ensure the correct unsigned type is used and to avoid
undefined behavior if these functions are implemented as macros using
bit shifts.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Refactored the code to use the standard struct in_addr for
representing IPv4 addresses instead of a uint32_t combined
with the custom IP_ADDR macro.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Verify if the block number isn't negative before processing it, to
prevent potentially undefined behavior. This was reported by the
undefined behavior sanitizer.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Replace i2s_write invocation with i2s_buf_write invocation for test sine
wave playback.
When CONFIG_USE_DMIC=n, this sample attempts to play back a test sine
wave encoded in sine.h. As the i2s_write treats the given buffer as a
memory slab, it overwrites parts of it, resulting in data corruption and
improper playback. i2s_buf_write accepts a buffer existing outside the
playback queue (heap).
Manually tested on mimxrt595_evk/mimxrt595s/cm33 where it was first
observed.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
SonarQube reports: cast from 'const struct _snode *' to 'struct _snode *'
drops const qualifier. Fix it by removing the const.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 7982ee0df13b7f9e54595f799e32f38c464b0f9e)
1. bt_sdp_discover may be called in two tasks at the same time:
(1) If the 2 calls are for 2 acl conns,
the same session may be new allocated to two acl conns.
(2) If the 2 calls are for the same acl conn, the same session should be
used.
Use the bt_conn_index to map acl conn with session to fix it.
2. fix that bt_sdp_discover may use one session that is disconnecting,
put req to reqs_next and process it after disconnected.
3. remove memset of session, reset each members individually.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit dcbe5d7dc5d72ce0d2915cf2b291cc84a916a536)
Defaults cannot be overidden (even with configdefault extension), they
only work if the original symbol is defined after the override e.g.,
"drivers and then subsys/net" but for kernel symbols,the default value
overrides don't work due "kernel and drivers" order, the kernel defines
the original symbol with the default and then it cannot be overridden.
Move the kernel symbol override to the original definition to make it
affect. Else any sample that uses nRF70 but doesn't enable WPA
supplicant ends up with 1024 and crashes.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Using ms and converting to us is a bad idea as we still get ms
granualrity in us units. Use the proper API to get us granularity.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Fix a null pointer dereference in akm09918c_submit(), where writeByte_sqe
was dereferenced before checking if it was NULL.
Coverity reported this as CID 516247: the pointer returned by
i2c_rtio_copy_reg_write_byte() may be NULL, and accessing its `flags`
field before checking leads to undefined behavior.
Move the access to writeByte_sqe->flags after confirming both
writeByte_sqe and cb_sqe are valid.
Fixes: CID 516247
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
In case the dmic had previous been run and stopped,
make sure active_buf_idx is initialized to 0 when
setting up dma on start, otherwise the dma callback
can return the wrong buffer.
Also purge the rx_queue before freeing the slab buffers,
to minimize risk of any async read request getting
back a slab buffer that is freed.
Signed-off-by: Mike J. Chen <mjchen@google.com>
Include all supported Espressif SoC variants in the MCUboot
test suite to ensure proper CI coverage.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The interrupt handling was not deterministic before because it relied
on "guessing" if the lpspi was a v1 type that was stalling due to design
errata. This obviously ended up being wrong in some cases. So we really
need to fix this so that it is deterministic, and my idea to do that is
to explicitly count how many words we have written to the TX fifo
throughout the whole transfer.
As a side effect of making the IRQ more deterministic, we can't support
the SPI_HOLD_ON_CS flag for v1 LPSPI anymore. It is fundamentally
impossible due to the fact that the transfer can only complete in
hardware as a result of CS deasserting. If this is absolutely a
requirement to support this flag in the future, my recommendation is to
update the driver so that it muxes the pin to a gpio before ending the
transfer, but that would kind of defeat the point of having a native CS,
at least at the end of the xfer.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This early exit section is only reached if there is an error.
In the case of not supported, the ret variable will be 0 and zassert
won't happen. This is because the test was meant to be skipped, not
passed or failed, in this case. So add the skip call.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The two collaborators, Casper-Bonde-Bose and MariuszSkamra,
are not actively collaborating on Zephyr anymore.
Remove to avoid assigning them as reviewer for PRs which
gives a false sense of who may actually review PRs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Update the driver to handle -ENOSYS from phy_configure_link(), which is
now returned when the cfg_link callback is missing (e.g., in fixed-link
PHYs).
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `soc` and `subsys` directory.
Additionally, incorporates a fix recommended by the reviewer.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `arch`, `boards`, `kernel`, `modules`,
`samples`, and `share` directory.
Additionally, incorporates a fix recommended by the reviewer.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `drivers` directory.
Additionally, incorporates a fix recommended by the reviewer.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `doc` directory.
In `dsa_txrx_process.svg`, correct the typo `Tansmit` to `Transmit`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Ensure that the BR/EDR L2CAP RX MTU is limited to the configured
BT_L2CAP_RX_MTU value during channel configuration.
This change prevent potential buffer overflow issues when receiving
data larger than the configured buffer size.
Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
The MTU calculation in rfcomm_connected() was incorrectly adding the FCS
size instead of subtracting it.
This could lead to buffer overflows when sending data that exceeds
the actual available space.
Fix the calculation by properly subtracting both the RFCOMM header size and
the FCS size from the L2CAP MTU to get the correct RFCOMM session MTU.
Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
Some of the Kconfig options did not reflect the actual
requirements from the TMAP spec. Relying on the AUDIO_TX
and AUDIO_RX was misleading, as they could be set by
broadcast configurations when the features required
unicast features.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The marking procedures can be reverted, since at this stage
it is already allowed to use the stack.
The MSP is temporairly set to interrupt stack in `reset.S` file before
calling s2ram procedures..
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
This reverts commit e68d110f7c.