Add `ing` to the `BT_L2CAP_CONNECT` and `BT_L2CAP_DISCONNECT`
states, so that the name better matches the actual state.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This adds a utility function to check if an address is within
read only section. This is extracted from logging subsys so
use the new func in logging. The one is cbprintf_packaged is
also replaced.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
XCC is based on GCC 4.2.0 which doesn't support auto type.
So force CONFIG_LOG2_ALWAYS_RUNTIME to be enabled if XCC is
being used.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
For GCC < 4.9.0 and Clang < 3.8.0, auto type is not supported.
But the previous behavior to depend on CONFIG_LOG2_ALWAYS_RUNTIME
to be enabled doesn't work because this kconfig is not available
when CONFIG_LOG is not enabled, as LOG_*() are still being
expanded when CONFIG_LOG=n, resulting in toolchain complaining
about unknown keyword. So when CONFIG_LOG=n and old toolchains,
force it to use runtime packaging to avoid the issue.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This introduces the macro TOOLCHAIN_HAS_C_AUTO_TYPE to
indicate that the toolchain supports __auto_type. This is
supported since GCC 4.9.0 and Clang 3.8.0.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This introduces the macro TOOLCHAIN_HAS_C_GENERIC to indicate
that the toolchain supports C Generic (i.e. _Generic keyword).
This is introduced in C11, and is also supported since GCC 4.9.0
and Clang 3.8.0.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This introduces the macro TOOLCHAIN_HAS_PRAGMA_DIAG to indicate
that the toolchain supports #pragma diagnostics. This is
supported since GCC 4.6.0 and, AFAIK, all Clang.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Make it possible to "finish" with fewer bytes than what was "claimed".
This was possible before on the get side, but the put side was
cummulative wrt finish. The revamp made it cummulative on both sides.
Turns out that existing users rely on the opposite behavior which is
more logical and useful. So make both sides that way.
Adjust documentation, test case and users accordingly.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Instantiate the values of `sx126x` GPIO's when they are present in
devicetree. This was missed in #42230.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
spi_dt_spec structure initialization should not be done
in the runtime during spi bus initialization because it
caues kernel panic.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/43046
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
No SoCs are re-implementing the constraints API. This _feature_ was
mostly put in place to cover TI platform needs, but it is no longer
needed. Refer to previous commit for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The constraints API offered by TI HAL is meant to be used externally,
for example, when implementing a policy using their policy mechanism
(not used on Zephyr). The API is likely designed for systems where a
thin RTOS is used (e.g., FreeRTOS, TI-RTOS?), places where you basically
get a Kernel and a few services around, but not a system like Zephyr
where you also get, for example, a power management subsystem. This
means that it gets difficult for an RTOS like Zephyr to use such HAL
APIs while using its own constraints API. The first question is why we
allowed such kind of HAL code to be part of upstream Zephyr. It
certainly does useful things, but it is also uses a HAL infrastructure
which is hardly exportable to an RTOS like Zephyr. Part of the
Power_init() code, for example, should likely be in a clock controller
driver, where Zephyr APIs can be used.
The _solution_ that was done to workaround this case was allowing custom
full re-implementations of the constraints API. So we are basically
overwriting a functional API with custom HAL code because of poor HAL
designs. This is in general a bad design principle. If we allow this, we
can hardly offer any guarantees to the API users. For example, is
re-implemented as thread-safe? What is the API behavior then? ...
Platforms like TI that have incomplete support in Zephyr tend to leverage
to HAL code certain functions that should be proper Zephyr
drivers. Such platforms should not influence the design of APIs because
they lack solid foundations.
This patch removes the custom implementation since the HAL has been
patched so that it forwards PM state constraints to Zephyr.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
It turns out XCC didn't like this change as it doesn't have a
__COUNTER__ builtin. Bummer.
This reverts commit e8389f2f53.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Currently xenvm board/soc is configured to use GICv2 and there
is no clean way(without modifying the source code) to alter this
configuration to use GICv3.
Due to the increasing number of users wishing to use GICv3, add
a new configuration called xenvm_gicv3 that enables GICv3.
Create a Kconfig file and add a config XENVM_USE_GIC_V3 that,
if set, will cause SOC_XENVM to select GICv3 instead of GICv2.
Update documentation accordingly.
Take the opportunity to remove the unnecessary config options
from the defconfig files.
Signed-off-by: Michal Orzel <michal.orzel@arm.com>
This test uses k_yield() to "sync" between threads, so it's implicitly
supposed to run on a single CPU. Make it explicit, to avoid issues on
platforms with more cores.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
FIXKFLOATDISABLE
Use CLINT to send interrupts to another CPU. SMP support is kinda
incomplete without it.
This patch only enables it for riscv-privilege platforms - specifically,
"virt" one.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Secondary CPUs are now initialised and made available to the system. If
the system has more CPUs than configured via CONFIG_MP_NUM_CPUS, those
are still left looping as before.
Some implementations of `soc_interrupt_init` also changed to use
`arch_irq_lock` instead of `irq_lock`.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Enable `arch_switch()` as preparation for SMP support. This patch
doesn't try to keep support for old style context swap - only switch
based swap is supported, to keep things simple.
A fair amount of refactoring was done in this patch, specially regarding
the code that decides what to do about the ISR. In RISC-V, ECALL
instructions are used to signalize several events, such as user space
system calls, forced syscall, IRQ offload, return from syscall and
context switch. All those handled by the ISR - which also handles
interrupts. After refactor, this "dispatching" step is done at the
beginning of ISR (just after saving generic registers).
As with other platforms, the thread object itself is used as the thread
"switch handle" for the context swap.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
isr.S code currently gets CPU information from global `_kernel` assuming
there's only one CPU. In order to prepare for upcoming SMP support,
change code to actually get current CPU information.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Add a new board to support Intel Tiger Lake H PCH variant of cAVS2.5.
Move common Kconfig options for cavs25 to soc level. No need to
replicate these for every board.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1. Rename device data to dev_data to fix variable
name clash
2. Use Device Tree properties to setup the display
3. Delete unused Kconfigs
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Fixes: #43099
The CMake 3.22.1 / 3.22.2 PyPI version suffers a bug in the
`cmake_path(... PARENT_PATH)` implementation.
Therefore, when CMake version 3.22.1 / 3.22.2 is detected, test if the
CMake version is suffering from the bug, and in case the bug is present,
fail with an error regarding the issue.
The reason for failing, and not implementing work arounds is that Zephyr
already uses `cmake_path()` at two locations, and we cannot prevent
contributors from adding code which uses this function.
Secondly, Zephyr modules may also use `cmake_path()`, and thus be
affected by said bug.
It is impractical to implement work arounds at all possible locations
for something that is a CMake bug.
Therefore the safest solution is to test CMake itself, to check if the
version in use suffers said bug, and fail with a proper error message
if an affected CMake version is used.
See more here:
https://gitlab.kitware.com/cmake/cmake/-/issues/23187https://github.com/scikit-build/cmake-python-distributions/issues/221
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Makes possible to read a single resource instance at a time with
plaint text, JSON and TLV content formats.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
Use CTS input to monitor HL7800 sleep state
when in SLEEP mode.
When CTS is high, shutdown the UART to
save power.
Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
Set board flasher, so twister can run tests on ITE(it8xxx2_evb) board.
Add supported drivers of it8xxx2_evb board, so twister could run these
driver tests without skipping.
Signed-off-by: Fu Haolei <haolei.fu@intel.com>
The L2CAP channels were removed from the bt_conn channels list. They
were thus not found in the ecred connection response handler.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
We keep the behavior for legacy advertising data as the controller will
ignore such scenarios when using legacy advertising commands.
Extended non-scannable advertising sets don't support scan response
data. Extended scannable advertising sets don't support advertising
data.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>