These got dropped by an earlier patch, but are required on SMP systems
so synchronously notify other CPUs of changed scheduler state.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This got clobbered by commit adac4cbafa in what I think was a rebase
mistake. Without it, on SMP systems it's possible to select a new
_current thread and try to return into it before another CPU has
actually finished switching away from it.
Interestingly: the frequency with which this bug got caught once it
was reintroduced was much, much higher than it was when it was fixed
the first time due to the instruction pointer poisoning introduced in
the interrim. Incompletely saved threads now have deliberately broken
state when assertions are enabled and will panic synchronously.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
When building the i2s tests on 96b_argonkey we get the following
warnings:
drivers/dma/dma_stm32.c: In function 'dma_stm32_configure':
drivers/dma/dma_stm32.c:181:2: error: 'periph_addr_adj' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
181 | switch (increment) {
| ^~~~~~
drivers/dma/dma_stm32.c:161:2: error: 'memory_addr_adj' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
161 | switch (increment) {
| ^~~~~~
Fix by initialzing periph_addr_adj and memory_addr_adj to 0.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This board enabled the IEEE802154_RF2XX driver unconditionally. Instead
make it depend on the IEEE802154 subsystem being enabled.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Move conditionals that depend on USB to Kconfig.defconfig so that unmet
dependencies don't issue a warning.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The symbol SPI_SAME70_PORT_0_PIN_CS3 was defined without a type.
A non-whitelisted Kconfig warning is generated which results on a
configuration error. This associate the bool type to symbol.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The current sam spi driver uses soc dependent name which duplicate
configuration to enable other platforms. This refactor current
definitions to a generic way to reuse symbols by multi soc definitions.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
On xtensa we always need to implement the reentrant fs syscall
functions. So remove the #ifndef CONFIG_POSIX_API protection around
them and add needed externs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
spi_context_lock() & spi_context_release() are called in transceive()
function for a better readability.
Signed-off-by: Ismael Fillonneau <ismael.fillonneau@stimio.fr>
Some compilers can't resolve the conditional if/else/else construction
in ull_conn event_len_prep function, and fail with an 'uninitialized
variables' error. The change has no functional impact.
Signed-off-by: Morten Priess <mtpr@oticon.com>
riscv64 CPUs can access full 64-bit memory-mapped register by a single
instruction, so we can directly access these registers.
Signed-off-by: Jim Shu <cwshu@andestech.com>
For USB audio class interface may have alternate interfaces.
Those alternates may have different endpoint configurations.
When Standard Request SET_INTERFACE is served it choses between
alternate interfaces and configuring associated endpoints.
When switching between alternate interfaces, endpoints
associated with them must be disabled/enabled accordingly.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Change the key function used to sort nodes so that unit addresses, if
present, break ties between sibling nodes. This orders siblings in
increasing order by unit-address in any gen_defines output that is
sorted by ordinal.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This makes the results easier to read, since node output appears in
the same order as the top level comment summarizing the tree.
Reorganize how flash partitions are emitted so they also appear in
dependency order, allowing us to extend the comment at the top of the
file to say that nodes are emitted in that order, along with other
useful information.
Print comments even for nodes that are disabled or have no binding,
to make it clearer that the script considered them and decided not to
output anything for them.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
A bug under investigation (issue #22078) limits board operations
to 16MHz. When running at 32MHz, some applications may crash.
In order to enable use of nucleo_l152re with mot of applications,
limit frequency to 16MHz until bug is fixed.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
BT_CTLR_SETTINGS should not depend on BT_SETTINGS as this will prevent
using settings system in the controller in a controller only build.
(BT_SETTINGS depends on BT_HCI_HOST)
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Add option for keeping the watchdog timer of the NXP Kinetis KE1xF SoC
series enabled at boot with a configurable, initial timeout.
This removes the risk of failure from when z_arm_watchdog_init()
disables the watchdog timer until the application code configures a
timeout and re-enables the watchdog timer.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
For various reasons bump the min SDK required to 0.11.1. We need 0.11.x
for xtensa and ARM64 support.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The xcc specific reentrant syscall implementations are actually useful
for xtensa in general. So move that code from being specific to
intel_s1000 / xcc into generic newlib/libc-hooks.c. This is in prep
for the Zephyr SDK dropping -DMISSING_SYSCALL_NAMES which will make
its version of newlib on xtensa match behavior with xcc.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit adds the following:
- EFR32FG1P SoC support for the watchdog
- efr32_slwstk6061a board support for the watchdog
Signed-off-by: Oane Kingma <o.kingma@interay.com>
This commit adds the following:
- EFR32MG SoC support for the watchdog
- efr32mg_sltb004a board support for the watchdog
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
This commit adds the following:
- device tree bindings for Gecko watchdog driver
- EFM32PG SOC support for the watchdog driver
- EFM32PG board support for the watchdog driver
- DTS aliases for testing with default watchdog driver test
Signed-off-by: Oane Kingma <o.kingma@interay.com>
Watchdog type is found on e.g. Pearl/Jade Gecko, often
more than 1 is present.
Driver supports timeout and (minimum) window configuration
and reset or timeout interrupt support for now.
Signed-off-by: Oane Kingma <o.kingma@interay.com>
The contentes of the function has been reduced with use of
sys_slist_append instead of sys_slist_insert.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit adds a new option CONFIG_BT_SMP_USB_HCI_CTLR_WORKAROUND
to support USB HCI controllers that sometimes send out-of-order HCI
events and ACL Data due to using different USB endpoints.
Enabling this option will make the master role not require the
encryption-change event to be received before accepting
key-distribution data.
It opens up for a potential vulnerability as the master cannot detect
if the keys are distributed over an encrypted link.
Fixes: #22086
Signed-off-by: François Delawarde <fnde@oticon.com>
Use the voltage divider devicetree binding to demonstrate measurement
of battery voltage for two Nordic-based boards that have the necessary
circuitry.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Gain values are specified with enumeration values that can't be used
to reverse the effects of scaling the input signal. Provide a
function that reverses the effect of the gain by scaling a measured
value.
Also provide a function that converts a raw measurement captured with
a reference voltage and specific gain and resolution to the
corresponding voltage in millivolts.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Define a binding for a voltage divider circuit with one or more analog
input channels. Add devicetree nodes for several boards that have
battery voltage measurement support.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Similar to the suspend refactoring earlier, this really nees to be
done in an atomic block. There were two confirmable races here,
though it's not completely clear either was being hit in practice:
1. The bit operations in z_mark_thread_as_started() aren't atomic so
it needs to be protected.
2. The intermediate state in z_ready_thread() could result in a dead
or suspended thread being added to the ready queue if another
context tried a simultaneous abort or suspend.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Kernel wait_q's and the thread pended_on backpointer are scheduler
state and need to be modified under the scheduler lock. There was one
spot in pend() where they were not.
Also unpack z_remove_thread_from_ready_q() into an unsynchronized
utility so that it can be called by this process in a single lock
block.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The "alternate thread" test would spawn a thread and then exit the
test, but on SMP that other thread runs asynchronously and it was
possible for the main thread to exit the test entirely before the test
thread had a chance to run (and overflow its stack), leading to
spurious test case failures.
Obviously we can't exactly synchronize to an async crash, so put a
short delay in after spawning the thread.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>