This commit updates the `xilinx_zynqmp` platform to use the refactored
AArch32 interrupt system.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The current AArch32 (Cortex-R and to-be-added Cortex-A) interrupt
system relies on the multi-level interrupt mechanism and the
`irq_nextlevel` public interface to invoke the Generic Interrupt
Controller (GIC) driver functions.
Since the GIC driver has been refactored to provide a direct interface,
in order to resolve various implementation issues described in the GIC
driver refactoring commit, the architecture interrupt control functions
are updated to directly invoke the GIC driver functions.
This commit also adds support for the Cortex-R cores (Cortex-R4 and R5)
that allow interfacing to a custom external interrupt controller
(i.e. non-GIC) by introducing the `ARM_CUSTOM_INTERRUPT_CONTROLLER`
configuration that maps the architecture interrupt control functions to
the SoC layer interrupt control functions.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The current Generic Interrupt Controller (GIC) driver makes use of the
multi-level interrupt mechanism and `irq_nextlevel` public interface.
This is a less-than-ideal implementation for the following reasons:
1. The GIC is often used as the main interrupt controller for the
Cortex-A and Cortex-R family SoCs and, in this case, it is not a 2nd
level interrupt controller; in fact, it is the root interrupt
controller and therefore should be treated as such.
2. The only reason for using `irq_nextlevel` here is to interface the
architecture implementation to the interrupt controller functions.
Since there is no nesting or multiple instances of an interrupt
controller involved, there is really no point in adding such an
abstraction.
3. 2nd level topology adds many unnecessary abstractions and results
in strange coding artefacts as well as performance penalty due to
additional branching.
This commit refactors the GIC driver interface as follows:
1. Remove the current GIC driver interface based on the multi-level
interrupt mechanism and the `irq_nextlevel` public interface.
2. Define the GIC driver interface in
`include/drivers/interrupt_controller/gic.h` and allow the arch
implementation to directly invoke this interface.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Using MQTT_UTF8_LITERAL() allows to reduce code and make it less error
prone, since utf8 length is calculated automatically by the macro.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Contents of mqtt_3_1_0_proto_desc and mqtt_3_1_1_proto_desc were logged
with following code:
MQTT_TRC("Encoding Protocol Description. Str:%s Size:%08x.",
mqtt_proto_desc->utf8, mqtt_proto_desc->size);
This resulted in invalid log, since they were not NULL-terminated
strings. Use MQTT_UTF8_LITERAL() to initialize both utf8 strings to make
sure they are NULL-terminated now and valid to print and
log. Additionally this makes the code a bit shorter.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This macro allows to easily initialize utf8 strings (struct mqtt_utf8)
from C literals, as it automatically calculates string length.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Add support for sleep states. Sleep state 1 corresponds to idle mode,
and Sleep state 2 corresponds to standby mode, as per the Technical
Reference Manual.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Create a residency-based system power policy function for TI
CC13X2/CC26X2 that uses TI's Power module.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
MEC15xx eSPI OOB RX length register holds received message length
and receive buffer length, need to extract rcvd msg length.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Sample code that demonstrates power management features on
MEC15xx-based boards.
It showcases how an app can enter into light and deep sleep.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Point to zephyr/sdk release pages instead of non-existent downloads page
on project website.
Fixes#21706
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
tests/drivers/spi/spi_loopback provides configurations for boards
nrf51_pca10028 and nrf52840_pca10056, thus indicate spi as supported
on them, so that they are included in sanitycheck builds of this test.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This sample has nrf51_pca10028 on its platform_whitelist but lacks
configuration and overlay files that would make it possible to build
this sample for that board. This commit provides such files.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Since commit 22326f6d99 got in, this test
requires that so-called NOP frames (bytes of value 0) are sent when no
TX data is provided. For nRF SoCs, the over-read character (ORC) that
is sent in such case is by default configured to the value of 0xFF.
Alter configurations for nRF boards so that 0x00 is used instead.
On the occasion, remove redundant selections of driver type in those
configurations (CONFIG_SPI_x_NRF_SPI[M]=y), as such selections must
be aligned with the value of "compatible" property in corresponding
nodes in dts, so there's no much sense in having them separately here.
Correct also the SPI instance to be used for nrf51_pca10028.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
We rename the z_arm_int_lib_init() function to
z_arm_interrupt_init(), aligning to how other
ARCHes name their IRQ initialization function.
There is nothing about 'library' in this
functionality, so we remove the 'lib' in-fix.
The commit does not introduce any behavior changes.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
i2c_slave_register/unregister must not be syscalls since it provides
callbacks that will run in supervisor mode. Nonetheless, verification
functions were missing which means that these functions never worked
from usermode.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
the old codes just work for single core, we need to consider
the case of SMP.
In SMP, it's not easy to get current thread of current cpu in
assembly, so we'd better do it in C.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
* update comments to match latest codes
* add extra comments for some assembly, macros
* use macro to replace duplcated codes
* remove unused codes, lables, symobols
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
overhaul the thread switch code in epilogue of irq and
exception handling:
* add z_arch_get_next_switch_handle to call z_get_next_switch_handle,
let the scheduler to decide the switch thread. This will also cover
the case of SMP.
* put lots of common codes in macros for thread switch to improve
the maintainablity, readability.
* clean up of some lables to make codes easier to understand
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
for smp target, there is a case where just one core is running, then:
* during init, the master core will run, others cores will halt/sleep
* use timer driver for single core
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Add CAP_NO_IV_PREFIX capability support to the STM32 CRYP crypto driver,
so the initialization vector does not have to be prefixed to the
plaintext/ciphertext buffer.
Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
Added the functions to turn on/off the radio from LLL.
Added WAKE_IRQ to start radio after it's out of DSM.
Signed-off-by: George Stefan <george.stefan@nxp.com>
Added the functions to turn on/off the radio.
Deep Sleep Mode (DSM)
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
Signed-off-by: George Stefan <george.stefan@nxp.com>
z_swap_unlocked() does the same construction of using a
dummy spinlock; just use that and make the code simpler.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
z_reschedule_unlocked() is a no-op if the caller is
cooperative, because the logic that maintains the ready queue
ensures that the co-op thread is always at the front unless
some special handling is done like in k_yield(), which does
not happen here.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The loopback driver is a simple driver that can be used to
test CAN subsystems. The actual implementation sends frames
in the same thread that calls the send function.
Some libraries have problems with that behavior.
This PR implements a dedicated thread that calls the callback
for the receiving functions and a msgq in between the sender
and the TX thread.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
This commit adds an option to configure the frequency
in Hz for the HFRCO clock source. The default value
for this option is 0 which skips the configuration of the HFRCO.
This feature is supported for efm32gg, efm32jg, efm32pg, efm32fg
and efm32mg SOCs currently.
Signed-off-by: Pooja Karanjekar <pooja.karanjekar@lemonbeat.com>
Attempt to deinitialize an nrfx driver that is not initialized results
in an assertion failure reported by the driver. And such attempt could
happen in SPI shims when the power state was switched between states
other than ACTIVE.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Ring buffer in memory backend does not depends on xtensa adsp board,
so make it general: remove to log_backend_rb and remove dependency on
up_squared_adsp.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Now the VEGABoard BLE support includes the support for
the 2 Mbps BLE PHY, so the docs need to be updated
accordingly.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This patch adds the selection of the necessary CONFIG_*
options for allowing the use of the 2Mbps BLE PHY on
VEGA platform.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
The radio on the VEGA platform supports both 1Mbps, as well
as 2Mbps BLE PHYs. It does not support coded BLE PHY. This patch
adds the necessary callback, as well as timings to enable the 2 Mbps
PHY support in the SW LL HAL for VEGA.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>