Commit Graph

68938 Commits

Author SHA1 Message Date
Gerard Marull-Paretas 4504e04ce0 dts: gigadevice: gd32f403: fix dma0/1 reg address
The address did not match the one specified in the node.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 09:09:51 +00:00
Gerard Marull-Paretas e03d28edeb dts: gigadevice: gd32f403: remove non-existing flash property
The peripheral-id is not a valid property for gd,gd32-flash-controller.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 09:09:51 +00:00
Gerard Marull-Paretas d7f08249bc dts: gigadevice: gd32e10x: fix flash controller issues
- nodelabel was uppercase
- peripheral-id was not a valid property

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 09:09:51 +00:00
Gerard Marull-Paretas 57c5261f53 dts: bindings: add missing gd32 flash controller binding
Despite being used in GD32 dts files, the compatible did not exist. Note
that there is no GD32 flash driver yet.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 09:09:51 +00:00
Gerard Marull-Paretas 4bd872e875 dts: gigadevice: gd32vf103: remove redundant riscv compatible
The compatible has no known meaning, so remove it.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 09:09:51 +00:00
Gerard Marull-Paretas a40c4c74da dts: gigadevice: gd32vf103: remove redundant soc compatible
The gd,gd32vf103-soc compatible is redundant, drop it.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 09:09:51 +00:00
Gerard Marull-Paretas e7b9c8c955 dts: gigadevice: gd32vf103: move interrupt-parent to soc node
There's no need to specify the interrupt parent on each node, it can be
defined at soc level node instead (same as in ARM parts with NVIC).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 09:09:51 +00:00
Flavio Ceolin 180f50feda intel_adsp: gpdma: Fix driver initialiaziation
cavs15 does not need to request ownership of the dma controller.

Fixes #49203

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-08-24 18:08:39 -04:00
Stephanos Ioannidis 3fc1ccd8e5 arch: arm64: Include GOT in RODATA
GCC 12 and above may emit "GOT indirections" for the weak symbol
references, and this requires the Global Offset Table (GOT) to be
included in the output.

This commit places the `.got` section in the RODATA section so that
the addresses of the weak symbols can be resolved at run-time. Note
that the GOT is populated with the symbol addresses at the default
linking address by the linker.

The `.got.plt` section, although unused, is also placed in the RODATA
section because the linker refuses to allow discarding this section
even when the `.plt` section is discarded.

In case of the GCC releases prior to 12, the weak symbol addresses are
placed in the literal pool and the `.got` section is not created at
all; therefore, this patch will be no-op.

For more details, refer to the following GitHub issue:
zephyrproject-rtos/sdk-ng#547.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-25 07:06:09 +09:00
Kumar Gala 7b1a8f4b89 tests: timer: timer_behavior: Fix compile issues
Includes need to be <zephyr/tc_util.h> and <zephyr/ztest.h> otherwise
we get build errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-24 15:53:50 -05:00
Gerard Marull-Paretas 6edcee886c doc: release-notes: inform about __ZEPHYR__ removal from zephyr.h
zephyr.h header no longer defines __ZEPHYR__, add some details on the
release notes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-24 14:59:01 -04:00
Gerard Marull-Paretas 6091091103 include: zephyr: remove __ZEPHYR__
CMake always injects __ZEPHYR__ to any code being built on Zephyr (e.g.
a module, an application, etc.). Requiring an include that defines
__ZEPHYR__ to determine if I'm on Zephyr is problematic as well: it
requires to include a Zephyr header (which will exist if building for...
Zephyr!).

Note that this change leaves <zephyr/zephyr.h> in a questionable
position: why shouldn't I just include <zephyr/kernel.h>?

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-24 14:59:01 -04:00
Tom Burdick fafb4d70b5 kernel: Timer behavioral testing
Test and validate the behavior of a timer driver.

Takes a number of absolute timer cycle samples of a periodic timer then
calculates statistical mean, variance, stddev along with total drift over
the entire test time. Ensures standard deviation and drift are within
a given configurable bound.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-08-24 13:59:24 -04:00
Jeremy Herbert 379ca18a93 kernel: allow k_poll to wait on pipes
k_poll does not currently allow polling on pipes. This adds support
for doing so on buffered pipes.

Signed-off-by: Jeremy Herbert <jeremy.006@gmail.com>
2022-08-24 17:49:20 +00:00
Krzysztof Chruscinski 7303ac135d lib: os: spsc_pbuf: Minor code cleanup
Minor cleanup in allocation function. Using define instead of
sizeof(uint32_t) to better explain the purpose. Adding few
comments.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-08-24 17:48:50 +00:00
Krzysztof Chruscinski 716fa446cd tests: lib: spsc_pbuf: Improve stress test
Improve stress tests to be more robust and demanding. Previous
implementation did not reveal race condition.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-08-24 17:48:50 +00:00
Krzysztof Chruscinski 6928c4a546 lib: os: spsc_pbuf: Fix race condition
Allocator is adding padding in 2 steps. First padding mark is written
to the buffer and then write index is reset to 0. Consumer may interrupt
this operation (another thread or core) and fail since it was only checking
padding marker and that alone was enough to consume the padding. If that
happen before write index got updated, buffer reading become corrupted.
Fixing it by adding write index check when padding is found.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-08-24 17:48:50 +00:00
Krzysztof Chruscinski 4b5ff413f5 lib: os: spsc_pbuf: Fix miscalculation in the allocation
Wrong value was used for free space calculation. Updating test which
previously was hiding this bug.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-08-24 17:48:50 +00:00
NingX Zhao f02c528aab tests: kernel: workq: migrate user work testcases
Move test cases to new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-24 17:48:26 +00:00
NingX Zhao b2c64dee27 tests: kernel: workq: migrate work_queue test cases
Move work_queue testcases to new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-24 17:48:26 +00:00
NingX Zhao d4e2e883d7 tests: kernel: workq: migrate workq testcases.
Move test cases to new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-24 17:48:26 +00:00
NingX Zhao 69c89b1acd tests: kernel: workq: move critical test cases to new ZTEST
Move critical test cases to new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-24 17:48:26 +00:00
Carles Cufi 7743b6da85 doc: Require Python 3.8
Given that 3.6 is now several years old and the current and previous
 Ubuntu LTS ship with 3.8 or later, upgrade the minimum required Python
version from 3.6 to 3.8.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 18:35:57 +02:00
Carles Cufi 5fd3cbf9a7 actions: Make Python 3.8 the minimum required version
Change the matrix so that we now start testing 3.8+. No need to exclude
any particular OS/Python version combinations.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 18:35:57 +02:00
Carles Cufi 33211b3fb4 cmake: Bump the minimum required Python version to 3.8
Given that 3.6 is now several years old and the current and previous
Ubuntu LTS ship with 3.8 or later, upgrade the minimum required Python
version from 3.6 to 3.8.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 18:35:57 +02:00
Carles Cufi 25db534a07 west: blobs: Finally fix the --format option handling
Turns out that `Namespace.format` was not a good fix to the issue
described in f033040812, it was returning
the default format even when the user specified -f/--format.

Replace "getattr" with a simple logical operation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 17:31:24 +02:00
Carles Cufi f033040812 west: blobs: Fix --format handling
There were two issues with the original commit
e04487cad2b98385c850fa478e1d1ca97bf0e836:

- getattr() doesn't seem to work properly with args
- Comparison between bound methods with "is" seems not to work, so
  replace it with a simpler string comparison

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:38:42 -07:00
Carles Cufi 8f0af41fd8 scripts: compliance: Add commit range info output
Log at the info level the commit range that the script is acting upon.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi 0082dbfbd5 scripts: compliance: Remove unused command-line args
There were a bunch of old command-line arguments that haven't been used
in a while, remove them.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi 73598db4db scripts: compliance: Tiny cleanup for -c
Use a common source for default and doc.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi c10a0f28b4 scripts: compliance: Clean up logging
- Add a choice in the cmd-line param
- Use the logger object everywhere
- Remove stale todo

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi d160d0c20c scripts: compliance: Complete transition to junitparser v2
Follow-up to b187477fe7.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi 5ee76c97ab scripts: compliance: Remove unused variable
EDIT_TIP has not been used for a while now, remove it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Vinayak Kariappa Chettimada 689bf9b015 Bluetooth: Controller: Fix uninitialized adv mode in scan rsp PDU
Fix uninitialized adv mode value in the scan response PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-24 12:41:21 +02:00
Thomas Stranger 24594cf7ce dts/arm: stm32f105: enable master can gating clock for can2
The can2 only works if gating clock of the master can (can1)
is enabled, therefore also set that bit for can2.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-08-24 10:37:40 +00:00
Henri Xavier dfededeadf cache: Fix build warning 'No SOURCES given to Zephyr library'
Following 4806e1087e ,
the following warning appears for some boards (e.g. `qemu_cortex_a53`)
```
CMake Warning at /zephyr/CMakeLists.txt:798 (message):
  No SOURCES given to Zephyr library: drivers__cache

  Excluding target from build.
```

Allow this driver to have no sources.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-08-24 10:36:40 +00:00
Dinh Nguyen 62b7dc2a7f dts: arm64: agilex: add additional cpu nodes
Add CPU1 - CPU3 nodes and add the cpu0 label.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2022-08-24 11:41:23 +02:00
TLIG Dhaou 546218ad2b drivers: sensor: stm32_temp add the ts cal resolution to the driver
Add the ts cal resolution in the driver in order to calculate temperature
value.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou 7b102a9993 drivers: adc: stm32 init the Regular group for stm32wl
The stm32wl mcu requires the REG group of the ADC
to be initialized before starting the conversion.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou df364cc372 drivers: adc: stm32 init the Regular group for stm32u5
The stm32u5 mcu requires the REG group of the ADC
to be initialized before starting the conversion.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou 366a32bccf Samples: sensor: stm32_temp_sensor: Edit the yaml file of the sample
-Edit the yaml file of the sample in order to execute tests.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou d97b51d248 boards: arm: Enable the die-temp capabilities of ADC
-Enable the die-temp capabilities of ADC in each dts file of stm32
 boards where it is available.
-Execute the testcase running the samples/sensor/stm32_temp_sensor on each
 available target board.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou 93b4fcc611 dts: arm: st: Add adc support of the temperature sensor on stm32
Add the support of the temperature sensor in the ADC device-tree node of
each stm32 where it is available.
- Check all the ADC of the stm32 mcus where the temp and VrefInt monitoring
is available (based on the Ref Man).
- Check that has-temp-channel; and has-vref-channel; in the corresponding
ADC node of the DTS of each stm32 mcu is correctly set.
- Verify the VTEMP/ VREFINT activation in the in adc_stm32.c for example).
-Add the die-temp node (based on the ref man/ datasheet).

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou 6778393ce3 dts: binding: sensor: stm32-temp add temp sensor calibration property
The TS_CAL values for the temperature sensor are measured on 12, 14 and
16 bit resolution depends on the STM32 series. Because the drivers
operates at 12 bit resolution the TS_CAL1 and TS_CAL2 must be divided.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
Mahesh Mahadevan 32e2e1cb79 dts: lpc55S6x: Add back the USB SRAM region
USB SRAM region was accidentally deleted by an earlier
commit. Rename the memory region used by USB to USB_SRAM instead
of SRAM4. SRAM4 was the wrong name for this region.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-08-24 10:08:40 +02:00
Peter Marheine d400b8135c arch/riscv: support CONFIG_CODE_DATA_RELOCATION
This implements support for relocating code to chosen memory regions via
the `zephyr_code_relocate` CMake function for RISC-V SoCs. ARM-specific
assumptions that were made by gen_relocate_app.py need to be corrected,
in particular not assuming any particular name for the default RAM
section (which is 'SRAM' for most ARM pltaforms) and not assuming 32-bit
pointers (so the test works on RV64).

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-08-24 10:08:06 +02:00
Peter Marheine c30833da3a arch: move CODE_DATA_RELOCATION to top level
Support for CODE_DATA_RELOCATION is not inherently limited to ARM, so
move the Kconfig definition to top-level so it can be used by other
architectures. Since support is opt-in (requiring linker script
support), add a helper symbol enabled by architecture config that gates
whether CODE_DATA_RELOCATION is available instead of listing all
supported systems inline.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-08-24 10:08:06 +02:00
Peter Marheine 9bd46852a3 build: don't assume FLASH is the ROM region
Most ARM platforms name their ROM region `FLASH`, but this assumption is
not portable. Have gen_relocate_app refer to ROMABLE_REGION instead of
hard-coding the platform-specific memory region name.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-08-24 10:08:06 +02:00
Peter Marheine 3a8c20d849 build: don't assume .symtab section type
Only the elftools SymbolTableSection section type provides an
iter_symbols() method, and compilers are free to emit sections that
include the substring '.symtab' in their name which causes errors if
gen_relocate_app examines only the section name. Instead check whether a
section is a symbol table to skip attempting to inspect sections that
are not actually symbol tables.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-08-24 10:08:06 +02:00
Martí Bolívar 0c198f97a1 drivers: entropy: fail mcux CAAM init on error
Commit d556a0c8a6
("drivers: entropy: Add entropy driver for MCUX CAAM")
added a shim entropy driver whose initialization function
always returns 0, even when the underlying HAL API fails.

This is wrong; if the device initialization function fails, it must
return nonzero by contract. Papering this over with an assert is not
enough. Fix it by returning -ENODEV on error.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-08-24 10:07:28 +02:00