Commit Graph

70884 Commits

Author SHA1 Message Date
Gerard Marull-Paretas 81e23c2758 soc: arm: nxp_imx: add missing section_tags.h include
Include required for __imx_boot_ivt_section.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 343e900799 soc: arc: add missing aux_regs.h include
It is required for z_arc_v2_core_id()  or register read/write functions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 3200a1ffeb manifest: update lvgl
Update lvgl to fix missing includes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 27845886a1 kernel: device: add missing kobject.h include
The module references a function declared in kobject.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas e4fdc2761a drivers: pinctrl: it8xxx2: add missing chip_chipregs.h
Include was missing for some register definitions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 1992699e07 drivers: gpio: it8xxx2: add missing chip_chipregs.h/soc_common.h
Register definition header was missing, SoC common header as well (for
ite_intc_get_irq_num).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas ac63bca423 include: add missing sys_clock.h include
Some headers made use of types defined in sys_clock.h (e.g. k_timeout_t)
without including it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 98272b324b include: add missing sys/util.h include
Some files were using macros defined in sys/util.h without including it,
e.g. for MHZ().

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 357b362824 include: add missing sys/time_units.h include
Some files using time_units.h API did not include it, e.g. for
sys_clock_hw_cycles_per_sec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas b959ab25a9 include: add missing sys/slist.h include
Some headers makes use of slists w/o including sys/slist.h

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 3976ccd5f7 include: add missing sys/printk.h include
Some files were using the printk API without including sys/printk.h

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas edfa4f1324 include: add missing sys/arch_interface.h include
Some files were using arch interfaces (e.g. arch_curr_cpu) without
including necessary headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas aea8dae691 include: add missing stdint.h include
Some files are using integer types (e.g. uint32_t) without including
stdint.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 597dd5901c include: add missing spinlock.h include
Some files are using the spinlock API without including the necessary
headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 4649e2347e include: add missing soc.h include
Some SoCs define stuff in soc.h, used in drivers or SoC code. Note that
soc.h is not introduced here as a catch-all header. soc.h optimizations
or removal is out of the scope of this patch.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 8a6cf41016 include: add missing nmi.h include
Some files make use of NMI API (NMI_INIT()) without including the
appropriate headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 4ba74c2ec9 include: add missing limits.h include
Some files used definitions found in limits.h (e.g. INT_MAX) without
including it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 6a0f554ffa include: add missing kernel.h include
Some files make use of Kernel APIs without including kernel.h, fix this
problem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas acc8cb4bc8 include: add missing irq.h include
Some modules use the IRQ API without including the necessary headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas e63b0bb3fe include: add missing errno.h include
With the incoming removal of kernel.h/types.h from init.h, lots of files
start to show compile errors because they relied on indirect
definitions, including errno.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas f7a5b47dff include: add missing devicetree.h include
Some files make use of DT APIs without including devicetree.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 4d953bd1fb include: add missing cmsis.h include
Some files make use of CMSIS APIs/definitions without explicitely
including CMSIS headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 34a6848887 include: add missing arch/cpu.h include
The sys* ops like sys_clear_bit are indirectly included via arch CPU
header. Other stuff like find_msb_set end up included via this header as
well.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas fe32c4e273 arch: x86: core: include kernel.h first
There seems to be an unresolved dependency chain in some x86 arch
headers, this file needs kernel.h to be included before arch_data/func.
This patch is a workaround, but problem should be fixed properly at some
point.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas 5754070e64 arch: arm: aarch32: fix irq.h include sequence
It turns out we could end up with a circular include dependency through
the following sequences:

zephyr/arch/arm/aarch32/irq.h:19 -> zephyr/irq.h
zephyr/arch/arm/aarch32/arch.h:27
zephyr/arch/cpu.h:19
zephyr/sys/arch_interface.h:33
zephyr/timing/timing.h:10

or

zephyr/arch/arm/aarch32/asm_inline_gcc.h:23 -> zephyr/irq.h
zephyr/arch/arm/aarch32/asm_inline.h
zephyr/arch/arm/aarch32/irq.h:19
zephyr/arch/arm/aarch32/arch.h:27
zephyr/arch/cpu.h:19
zephyr/sys/arch_interface.h:33
zephyr/timing/timing.h:10

The problem is that both aarch32 irq.h/asm_inline_gcc.h include
zephyr/irq.h (which in turn depends on the arch specific header, as it
should be). So arch_irq_connect_dynamic ended up being used before its
declaration.

This patch removes zephyr/irq.h from the aarch32 headers, as it makes no
sense to have such _reverse dependency_.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Anas Nashif 8e99222114 doc: document ARCH initialization level
document new initialization level ARCH, used to init drivers/services
very early in the ARCH code and before z_cstart().

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 17:54:59 +02:00
Tomasz Moń 0b32870838 doc: Use Markdown syntax instead of html tt blocks
Doxygen comment containing <tt>__VA_ARGS__</tt> does not render
correctly, i.e. __VA_ARGS__ is completely missing from the html
output. The Markdown syntax `__VA_ARGS__` renders as expected.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-11 16:22:35 +02:00
David Leach 9e5ee5d998 drivers: gpio: remove pinmux dependency in lpc11u6x Kconfig
Previous commit removed pinmux from the platform but neglected to
remove the dependency in this Kconfig resulting in build failures
when target application configures GPIO support.

Fixes #51144

Signed-off-by: David Leach <david.leach@nxp.com>
2022-10-11 08:25:46 -05:00
Mahesh Mahadevan 245ef22d5f soc: nxp: Fix the clock setup for RT595
The core clock was incorrectly divided down.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-10-11 08:25:14 -05:00
Pieter De Gendt 1694c0d60d arch: posix: Add defaults for recommended stack sizes
The CONFIG_STACK_SENTINEL adds 4 bytes to the stack. Take these
into account for CONFIG_ARCH_POSIX_RECOMMENDED_STACK_SIZE.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-11 15:22:57 +02:00
Anas Nashif 3db1c59f44 ipm: intel_adsp: use memory window from DTS
Use memory window setup from DTS.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif 63ff07e913 intel_adsp: move ipc command out of mem window setup
Do FW communication outside of memory window setup to accomodate for
additional IPC commands and headers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif f33fb23810 intel_adsp: mem_window: do not depend on instance numbering from DT
This is not guaranteed to match the physical layout of the memory, so
get them individually based on node label.

For initialization, use bbzero.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif d148ea1d7f intel_adsp: mem_window: support read-only flag
Some windows might need to be set as writtable, so add a flag read-only
to DTS bindings which is set to true for all windows right now. This can
be set to false where needed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif 9cd53958ce intel_adsp: mem_window: rename defines CAVS_ -> ADSP_
Fix namespacing of memory window defines. Not all platforms are CAVS
based anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif 46af0620b3 console: move winstream console to drivers/
This was all done as part of the soc and called from the soc. Define
this type of console under drivers/console and use it in the SoCs
supporting that via SYS_INIT instead of calling the console code
directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif d038eb5dc7 intel_adsp: move memory windows to DTS proper
Instead of just declaring the memory window register in DTS and have
everything else all over the place (headers, Kconfig, etc.) this change
defines the memory window instances in DTS and uses the device model to
initialize the windows. Code is still part of the SoC, given that we do
not have a driver subsystem suitable for this type of device yet.

Move FW status to own workflow and separate from window setup.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif e8395351e6 kernel: init: introduce a new init level: ARCH
We have cases where some devices needs to be initialized very early and
before c_start is call, i.e. to setup very early console or to setup
memory. Traditionally this would be hardcoded as part of the soc layer
and not using device model or the init levels.

This patch adds a new level ARCH, which will be called in early
architecture code and before we jump to the kernel code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Evgeniy Paltsev d9a64b7b23 twister: fix UnicodeDecodeError on input handling in BinaryHandler
In BinaryHandler we process input from simulator with decode('utf-8')
to convert it to string. decode has strict error handling by default -
so it raises UnicodeDecodeError exception if it can't decode input
binary sequence.

So if test start to print some junk to uart console we get
UnicodeDecodeError exception which cause the whole twister crash.

To fix that switch decode to less strict error handling when it
just replace undecoded binary sequence with unicode replacement
character.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-10-11 08:25:39 -04:00
Anas Nashif b2a95831eb Revert "twister: temporarily disable mec15xx boards"
This reverts commit b3ead37efa.

This is no longer needed, pinmux was removed and deprecated.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 07:46:39 -04:00
Jackson Cooper-Driver 2f84326e15 tests: ipc_service: Add ipc_service test of deregistered endpoint
This adds an additional test to the ipc_service test suite whereby the
test attempts to deregister the endpoint from the ipc_service instance
and then send a message to that endpoint - this should fail with
-ENOENT.

Signed-off-by: Jackson Cooper-Driver <jackson.cooper---driver@amd.com>
2022-10-11 13:03:29 +02:00
Ahmed Moheb 385527bdd6 tests: bluetooth: Remove deprecated definitions
Remove ZTest deprecated definitions that aren't used anymore.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-10-11 11:29:42 +02:00
Ahmed Moheb b8d5aaccd2 tests: bluetooth: Use ZTest new APIs with bt_buf_get_cmd_complete() UT
Migrate bt_buf_get_cmd_complete() UT to use the new APIs of ZTest
framework.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-10-11 11:29:42 +02:00
Ahmed Moheb c7c0e2d654 tests: bluetooth: Use ZTest new APIs with bt_buf_get_evt() UT
Migrate bt_buf_get_evt() UT to use the new APIs of ZTest framework.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-10-11 11:29:42 +02:00
Ahmed Moheb 8c9235c2b0 tests: bluetooth: Use ZTest new APIs with bt_buf_get_rx() UT
Migrate bt_buf_get_rx() UT to use the new APIs of ZTest framework.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-10-11 11:29:42 +02:00
Ahmed Moheb ea67890fdc tests: bluetooth: Use ZTest new APIs with bt_buf_get_type() UT
Migrate bt_buf_get_type() UT to use the new APIs of ZTest framework.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-10-11 11:29:42 +02:00
Ahmed Moheb 2254fab332 tests: bluetooth: host: Add UT for bt_foreach_bond()
Unit test project for bt_foreach_bond().
This part of subsys/bluetooth/host/keys.c unit testing.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-10-11 11:29:29 +02:00
Immo Birnbaum 29a9ffe777 drivers: ethernet: xlnx_gem: fix dev data access missed by #41918
Fixes a compiler error in eth_xlnx_gem_stats() caused by the
automated replacement of device run-time data pointer accesses
by #41918. The device run-time data access in eth_xlnx_gem_stats()
was likely missed as this function is not usually compiled - its
existance depends on CONFIG_NET_STATISTICS_ETHERNET being set.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2022-10-11 11:15:20 +02:00
Jamie McCrae b03de36195 doc: release: 3.3: Add mcumgr fs_mgmt workaround issue note
Adds a note about a workaround for an issue with mcumgr whereby a
file write command is sent to the same UART used for logging.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-11 11:15:02 +02:00
Jamie McCrae cfd657fcec mgmt: mcumgr: Add fs_mgmt log output workaround on file write
If a file write was attempted with a file that does not exist, over
the shell/UART when logging was enabled, it would output a fs_unlink
error, this works around the issue by checking if the file exists and
needs truncating before performing that action. It also imrproves
flash endurance slightly by performing a truncate operation instead
of a delete, but will fall back to a delete if the truncation
operation fails. This issue can be also be mitigated by altering
logging settings or adjusting the SMP thread priority.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-11 11:15:02 +02:00