If `CONFIG_SYS_CLOCK_EXISTS=n`, then
`CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC` will likely not be defined at all.
Fix the compilation by moving the check for it being `== 0` to a
separate preprocessor #if statement.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Remove static struct modifier from SPSC_DECLARE macro.
This solves a warning emitted when compiling for native_sim.
Signed-off-by: Luca Arato <luca.arato@secomind.com>
Introduce work timeout, which is an optional workqueue configuration
which enables monitoring for work items which take longer than
expected. This could be due to long running or deadlocked handlers.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The APIs pm_policy_device_power_lock_get and
pm_policy_device_power_lock_put are not mocked properly as they
should be excluded based on CONFIG_PM_POLICY_DEVICE_CONSTRAINTS,
not CONFIG_PM.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Some applications require loading extensions into the memory which does
not exist during the boot time and cannot be allocated statically. Make
the application responsible for LLEXT heap allocation. Do not allocate
LLEXT heap statically.
Signed-off-by: Alex Ivanov <alexivanov@google.com>
Updates the file summary on the various arch-specific kernel
interfaces to accomplish two things:
1. Fix the path in the comment
2. Standardize on language/format.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Introduce get_startup_time API which allows users to request
clocks specs to be met in time for an event.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Introduce API which allows users to determine what the actual
minimum spec will be resulting from a requested minimum spec. This
is useful for optimizing code as the requested minimum may be
way worse than what will actually be applied.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Added new configuration item to optionally enable APIs for operation
all data cache, by default these APIs are disabled.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
In order to clean and invalidate all D-Cache, so reverts commit:
867ba172b4.
Although no software broadcast between different CPU Cores for D-Cache
maintaining operation, but the hardware bus system should make sure it
is safety for all CPU Cores, because it is common for other SMP OS.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Add driver for the microchip MCP3561/2/4R ADC. Registers lock and
CRCCFG protection mecanism is not implemented. Tested on an MCP3564R.
Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
Basic support: initialization for sending/handling UBX messages and
run-time navigation configurability through GNSS API.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
This change would also solve that according to the C11 standard,
section 6.5, paragraph 4, the usage of bitwise operators on
signed integers is implementation defined.
Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
This feature, fixing a specific corner case, is unilateraly growing
all struct device with a pointer that 99% of the time is not used.
Thus uselessly utilizing ROM.
Making the feature Kconfig controlled.
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
Do not add functions to the high-speed iterable section when high-speed
support is disabled.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Disable the high-speed USB device descriptor if it is not in use.
Add checks to the code where the high-speed descriptor may be used.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Allowing message callback execution from the USBD thread saves about 800
bytes. For small devices, the option can be useful to reduce flash/RAM
usage, those with enough resources should not bother about it.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
When left-shifting '1' by 31, the result is undefined. This is
something ASAN detects.
Solve this by explicitly defining that the integer is unsigned.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit adds virtio section in documentation, describing
virtio-related concepts
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit adds the API for accessing VIRTIO devices, and adds a driver
for a VIRTIO PCIE device based on the newly added API.
This commit is based on the Virtual I/O Device (VIRTIO) Version 1.3
specification:
https://docs.oasis-open.org/virtio/virtio/v1.3/csd01/virtio-v1.3-csd01.pdf
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Add a ctrl VIDEO_CID_LINK_FREQ to indicate to a sink
the frequency at which a device streams data over
CSI2. Since not all source device currently provide the
LINK_FREQ control, add a helper function to retrieve
it, with a fall-back by doing an approximate via the
PIXEL_RATE control.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add standard data-type macros within the video.h in order
to avoid having to redefine them all in each and every CSI
based driver.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Commit 87719828ac introduced FSR definitions
for ARMv7-A/R; however, the value 16 which is documented in the ARM[1] as
a "TLB Conflict Abort", was introduced as "TLB Conflict Fault" instead and
described as a "Table Conflict Fault".
Update all affected files to use the ARM's naming for this error instead.
[1] Architecture Reference Manual (Document ID: ARM DDI 0406C.d)
"ARM Architecture Reference Manual for ARMv7-A and ARMv7-R Edition"
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
When using clang to build a C++ file that includes this file, it warns:
include/zephyr/sw_isr_table.h:195:28: error: invalid suffix on literal;
C++11 requires a space between literal and identifier
[-Wreserved-user-defined-literal]
"." Z_STRINGIFY(prefix)"."file"." Z_STRINGIFY(counter)
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
During testing and code inspection, there were various anti-patterns
on this (and U-Blox driver) codebase(s), including obfuscation, and
lack of data validation. This made it increasingly difficult to
introduce further variants of u-blox GNSS modems.
With this patch, both the UBX modem and the M8 driver have been
refactored to ease the reliability and maintainability of these
codebases. Here are some highlights:
WRT UBX modem:
- Helper macros to easily create UBX frames, (including checksum
calculation), at compile time; thus, making it easier to extend UBX
commands.
- Logic validation by the inclusion of the modem_ubx testsuite, used to
refactor the code through TDD.
- Ability to receive unsolicited messages, in order to enable U-Blox
drivers to rely on modem_ubx to transceive all commands, and avoid
hopping between modem_ubx and modem_chat.
WRT M8 driver:
- Remove GNSS specific protocol header files. Instead, unify them under
modem/ubx/protocol.h. Background: After a survey and looking at ubxlib
SDK I conclude the UBX protocol is by definition a GNSS protocol (there
are non-GNSS u-blox modems, but they're not interfaced through UBX
protocol).
- Establish pattern to create and send/receive commands using new
foundations on modem ubx.
- Remove dependency of Modem chat, and instead use UBX unsolicited
messages to get Navigation and Satellites data.
- Switch from the auto-baudrate detection pattern to a pattern of
transitioning between an initial known baudrate to a desired baudrate,
in order to improve initialization time.
- Add dts property to configure default fix-rate.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Following the new feature in the flexcomm driver to be able to wake up
from low power mode, the clock control drivers have to handle the
platform specific details, so this commit adds to the already ugly mess
that is the LPC syscon driver which is used by RW currently and makes
the required devicetree changes.
Make the console/shell uart on the FRDM_RW612 take advantage of this by
default.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add the ability to block and process a work queue by invoking
`k_work_queue_run` from an existing thread. This can be particularly useful
for using the main thread to process work items, in the same vein as the
system work queue, but from a lower priority/preemptible thread.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
The current ENOSYS check code can proceed for a driver that
hypothetically implements the on() but not the off() function of
vice versa, which would result in a null pointer dereference.
This would be a weird use case but Coverity catches the situation, no
harm in changing the ENOSYS check to fail if the on/off is half
implemented, so let's change it to do that.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The boot report is used to pass information from IRONside to a CPU
being booted.
Integrate the boot report to the update service sample.
Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
add uhc related items to dts.
add clock initialization
add BM4 if CONFIG_USB_UHC_NXP_KHCI is enabled
add pin mux
update board related CMakeLists.txt
update sdk-ng CMake to include NXP controller drivers
update west.yml to contain the hal_nxp pr
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
It's possible for newlib/picolib libc libraries to
internally call sysconf() which would execute zephyr's
implementation. However, if the _SC* defines do not have
matching values, then the incorrect switch case executes.
This issue arises when using newlib/picolib libc that includes
sysconf implementation for ARM. With current defaults, the
zephyr sysconf() overrides the original libc sysconf() so
we must ensure proper operation.
We will switch to the #define list just like newlib/picolib.
We can't currently use their unistd.h directly due to a domino
of declaration conflicts.
For the "small" macro implementation, we have to drop using
CONCAT to prevent pre-expansion of the new #defines
Signed-off-by: Nicholas Lowell <Nicholas.Lowell@lexmark.com>
static inline gethostname() in unistd.h can cause declaration collisions.
we should just move it to a normal function definition like the
rest of the network functions.
Signed-off-by: Nicholas Lowell <Nicholas.Lowell@lexmark.com>