Commit Graph

47715 Commits

Author SHA1 Message Date
Andrei Emeltchenko ae25a9926c edac: Remove extra logging
Remove unneeded extra logging.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko 064c9fe40f edac: Use helpers to read / write IBECC registers
Use helpers ibecc_{read,write}_reg{32,64}.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko 2dc413aa74 edac: Split EDAC set ctrl to set error_type and error_trigger
Split setting EDAC IBECC ctrl to setting error_type and
error_trigger to make it easier for other platforms.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko f80628ba96 edac: Generalize EDAC API
Replace addr with param1 and addr_mask with param2 for get / set types
of functions. Those names are more general and allow to implement
error injections for other platforms.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko 61409a6d2f CODEOWNERS: Adding drivers/edac owner
Adding myself to the list for drivers/edac.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko e33e5a7b57 edac: tests: Include sample.subsys.edac only for ehl_crb
Fixes twister build.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko 297d2eeb48 samples: edac: Add EDAC shell sample application
Add EDAC shell application demonstrating EDAC API usage. Can be used
for verification of the functionality with error injection mechanism.
Sample is also included in the twister tests.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko 5f06dbaebe edac: tests: Add injection API test
Add test injecting error and getting correct notification about EDAC
error. Since we have logging enabled in the exception handler it does
not work with LOG_MINIMAL.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko f2cd5f753f edac: tests: Add testing EDAC IBECC API
Add testing EDAC API, can be run on device ehl_crb.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko f7f2dd85be edac: shell: Add EDAC shell
Add EDAC shell module which would be included in the EDAC sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko 2b30d04eef edac: ibecc: Add EDAC IBECC driver
Add In-Band ECC driver. Supported in ehl_crb board.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko d4d278da0a edac: Add Zephyr EDAC configuration
Add Kconfig for EDAC.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko 6caec8cb4f edac: Add EDAC API
Add Error Detection And Correction (EDAC) API.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Gerson Fernando Budke f93ee9508b soc: arm: cypress: psoc6: Add Cortex-M0+ int mux support
PSoC-6 SoC needs that user define the nvic interrupt number to bind
with the peripheral interrupt line for the Cortex-M0+ CPU.  It uses
a multiplex before any NVIC interrupt line.  The interrupt vector is
selected using interrupt-parent property with the intmux_chN number
reference.

Note: The PSoC-6 SoC allows that both CPUs receive the same interrupt.
A tipical use is GPIO interrupt handle and user is responsable to
define interrupt line, priority and take care of enable same peripheral
instance on both CPUs only when appropriated.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-01-20 17:54:09 -06:00
Gerson Fernando Budke 04773afffd dts: arm: cypress: psoc6: Drop nvic reference
The psoc6.dtsi file declare a reference to nvic.  Since it was proper
defined at psoc6_cm0/4.dtsi files this entry is redundant.  Drop the
useless entry.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-01-20 17:54:09 -06:00
Gerson Fernando Budke 2ad591f756 soc: arm: cypress: psoc6: Update soc.h includes
Update <soc.h> include files.  This removes the unnecessary
<kernel_includes.h> file.  In addition, add <sys/util.h> to
expose macros and <devicetree.h> following general standards.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-01-20 17:54:09 -06:00
Dawid Niedzwiecki 6ec4ff22e3 emul: Add an emulator for the eSPI Host
This emulator pretends a generic eSPI Host. It supports basic virtual
wires and port80 operations.

There are functions to trigger actions on the host side e.g. for
setting a virtual wire from the host to the eSPI slave, use
emul_espi_host_send_vw. It will prepare data and set a proper event
on the slave side which will trigger callback (if there is any).

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2021-01-20 17:49:19 -05:00
Dawid Niedzwiecki d1948dc164 emul: espi: Add support for eSPI emulators
Add an emulation controller which routes eSPI traffic to attached
emulators depending on the selected chip(mostly host).
This allows drivers for eSPI peripherals to be tested on systems
that don't have that peripheral attached, with the emulator handling
the eSPI traffic.

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2021-01-20 17:49:19 -05:00
Daniel Leung ff720cd9b3 x86: enable soft float support for Zephyr SDK
This adds the correct compiler and linker flags to
support software floating point operations. The flags
need to be added to TOOLCHAIN_*_FLAGS for GCC to find
the correct library (when calling GCC with
--print-libgcc-file-name).

Note that software floating point needs to be turned
on for Newlib. This is due to Newlib having floating
point numbers in its various printf() functions which
results in floating point instructions being emitted
from toolchain. These instructions are placed very
early in the functions which results in them being
executed even though the format string contains
no floating point conversions. Without using CONFIG_FPU
to enable hardware floating point support, any calls to
printf() like functions will result in exceptions
complaining FPU is not available. Although forcing
CONFIG_FPU=y with newlib is an option, and because
the OS doesn't know which threads would call these
printf() functions, Zephyr has to assume all threads
are using FPU and thus incurring performance penalty as
every context switching now needs to save FPU registers.
A compromise here is to use soft float instead. Newlib
with soft float enabled does not have floating point
instructions and yet can still support its printf()
like functions.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-01-20 16:45:31 -05:00
Anas Nashif d0dd2ac5d3 samples: cmsis_rtos_v2: increase stack
Need more stack for some platforms and architectures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 16:45:31 -05:00
Anas Nashif 8b3d9e7285 sparc: do not set cmsis api Kconfigs
Those should be set by applications, not architectures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 16:45:31 -05:00
Anas Nashif 13fdb9e73d doc: update docs with 0.12.1 SDK
Update documentation with new SDK version.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 16:45:31 -05:00
Anas Nashif be00feb6eb ci: switch to 0.12.1 SDK
Move to new SDK.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 16:45:31 -05:00
Peter Bigot 08f4ce4efb samples: boards: nrf: add clock_skew
Provide a demonstration of using the timeutil skew infrastructure to
measure the relative error of the two clock sources on Nordic boards.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-20 16:38:56 -05:00
Peter Bigot 7b3dc4856a doc: add a section for timeutil APIs
Describe the role of these APIs, key concepts that they depend on, and
expose the low-level API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-20 16:38:56 -05:00
Peter A. Bigot f6d7595d4e lib/timeutil: add utilities to manage local/reference clock alignment
Provide data structures to capture a timestamp in two different
clocks, monitor the drift between those clocks, and using a base
instant with estimated drift convert between the clocks.

This provides the core technology to convert between system uptime and
an external continuous time scale like TAI (UTC without applying leap
seconds).

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2021-01-20 16:38:56 -05:00
Spoorthy Priya Yerabolu 513b9f598f zefi.py: Use cross compiler while building zephyr
Currently, zefi.py takes host GCC OBJCOPY as
default. Fixing the script to use CMAKE_C_COMPILER
and CMAKE_OBJCOPY.

Fixes: #27047

Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
2021-01-20 16:38:12 -05:00
Klaus H. Sorensen 8216e320b6 canbus: canopen: program: read flash in 32 byte chunks
Add routine to calculate crc of flash region. Read 32 bytes at a time
from flash instead of 4 bytes, for a significant speed up of the flash
image crc calculation.

Signed-off-by: Klaus H. Sorensen <khso@vestas.com>
2021-01-20 14:18:03 -06:00
Klaus H. Sorensen cb24e3c22e canbus: canopen: program: unlock can od during flash access
The callback function canopen_odf_1f56 is called with the can od lock
held. Release the lock while performing time consuming flash reading and
crc calculations, and reacquire the lock before returning from the
function.

Signed-off-by: Klaus H. Sorensen <khso@vestas.com>
2021-01-20 14:18:03 -06:00
Rajavardhan Gundi 945dc6ea72 drivers: i2c_mchp_xec: Set Default Configuration
The default configuration is made to be "master" at
"standard speed". This makes it possible to use the
driver without having to configure it.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2021-01-20 14:16:27 -05:00
Rajavardhan Gundi ff4e84ba45 tests: i2c_slave_api: Add test for mec1501modular_assy6885 board
This commit adds a DTS overlay file for mec1501modular_assy6885.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2021-01-20 14:16:27 -05:00
Rajavardhan Gundi 8751816745 drivers: i2c_mchp_xec: Enable slave mode support
Enable slave support for I2C device instances. Slave mode is
interrupt based, wheras master mode is still based on polling.

Remove ENI bit in master configuration since it is not needed for
master mode.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2021-01-20 14:16:27 -05:00
Francisco Munoz 7c3504b1c9 dts: bindings: microchip,xec-i2c: Add GIRQ fields
Add the girq and girq-bit fields to the binding. This allows
encoding GIRQ related information inside device tree.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2021-01-20 14:16:27 -05:00
Nicolas Pitre f436315e02 lib/os/heap: guard against arithmetic overflows
Let's do it upfront only once for each entry point and dispense
with overflow checks later to keep the code simple.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-01-20 14:15:44 -05:00
Anas Nashif c92ad609b3 MAINTAINERS: update guidelines
Update guidelines regarding updates to maintainers in the MAINTAINER
file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 12:21:42 -05:00
Anas Nashif ccb236f177 MAINTAINERS: replace CODEOWNERS
The Maintairs file will be used to replace the code owners file and will
be used to add reviewers (collaborators + maintainers of affected
areas).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 12:21:42 -05:00
Anas Nashif 3de9adb0bb MAINTAINERS: MAINTAINERS.yml updates
The changes here are the result of running all open pull-requests
through a script to identify the assignee and findi ng many gaps or old
data. Some of the changes here are coming from pending PRs that were
waiting for some TSC confirm ation, others are done based on pending
maintainer and collaborator changes that were not submitting yet.

Two noteable changes:

- CMake/Build system: This is now limited to just the infrastructure and
not every single Cmake file in the tree.  - Documentation: ditto, this
is just for the doc infrastructure and not for every RST file in the
tree.

The reason for the above two changes is the fact that most PRs would
have some cmake or doc changes and assignees in this case should not be
the owners of the build system or the doc infra, instead we should
assign to the subsystem being changed. (Otherwise majority of PRs would
be assigned to the doc and build system maintainers).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 12:21:42 -05:00
JuHyun Kim a8722a9e65 samples: sensor: sample app of ICM42605 motion sensor
Sample appication of TDK Invensense ICM42605
motion sensor.

Signed-off-by: JuHyun Kim <jkim@invensense.com>
2021-01-20 10:41:04 -06:00
JuHyun Kim cc56fb5247 drivers: sensor: Initial driver of Invensense ICM42605
Initial driver and sample application of
TDK Invensense ICM42605 6-axis motion sensor.
This driver provide DTS for nRF52 DK board DTS setting.

Providing features are below.

Sensor data streaming - Accel, gyro
Tap, Double tap triggering.
Set/Get FSR, ODR by set attr API
Support multi instance feature.

Signed-off-by: JuHyun Kim <jkim@invensense.com>
2021-01-20 10:41:04 -06:00
Kumar Gala 1badf77961 arch: arm: aarch32: Fix syscall inline asm
The inline asm code was not conveying in all cases that registers r1-r3
would get clobbered by the SVC handler code.  In the cases that we can't
list r1-r3 in the clobber list the registers need to show up as outputs
to know that they values are not preserved by the callee.

Fixes #30393

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-01-20 17:02:14 +01:00
Kumar Gala d382868216 i2s: cavs: Fix build issues with driver
Move i2s_cavs_irq_connect_##n up so its available later when used.  This
fixes compile issues with the driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-01-20 09:13:29 -06:00
peng1 chen 35133c8452 spi/qspi: add a testcase to test spi api for microchip board.
test write and read data with flash device using
spi single, dual, quad and octal mode.

Signed-off-by: peng1 chen <peng1.chen@intel.com>
2021-01-20 09:29:48 -05:00
Torsten Rasmussen da3726006b cmake: newlib linking flags -lc and -lgcc circular dependency
Fixes: #28650

Linking with newlib now defines the following linker flags as:
```
${CMAKE_C_LINKER_WRAPPER_FLAG}${CMAKE_LINK_LIBRARY_FLAG}c
${CMAKE_C_LINKER_WRAPPER_FLAG}${CMAKE_LINK_LIBRARY_FLAG}gcc
c
```

This is needed because when linking with newlib on aarch64, then libgcc
has a link dependency to libc (strchr), but libc also has dependencies
to libgcc.

CMake is capable of handling circular link dependencies for CMake
defined static libraries, which can be further controlled using
`LINK_INTERFACE_MULTIPLICITY`.

However, libc and libgcc are not regular CMake libraries, and is seen as
linker flags by CMake, and thus symbol de-duplications will be
performed.

CMake link options cannot be used, as that will place those libs first
on the linker invocation. -Wl,--start-group is problematic as the
placement of -lc and -lgcc is not guaranteed in case later libraries are
also using -lc / -libbgcc as interface linker flags.

Thus, we resort to use
`${CMAKE_C_LINKER_WRAPPER_FLAG}${CMAKE_LINK_LIBRARY_FLAG}`
as this ensures the uniqueness and thus avoids symbol de-duplication
which means libc will be followed by libgcc, which is finally followed
by libc again.

It would have been possible to use `-lc` directly, but there is a risk
that an externally library is also adding `-lc` and thus de-duplication
and re-arrangement of this flag happens. This risk is in theory also
existing with this fix, but the long nature of this link flag with using
`${CMAKE_C_LINKER_WRAPPER_FLAG}` would likely indicate a similar fix and
thus those libraries will stay in order.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-20 09:25:38 -05:00
Artur Lipowski ca61606632 api: add C++ friendly version of Z_TIMEOUT_TICKS.
The designated initializer used in Z_TIMEOUT_TICKS causes problems for
some C++ parsers (at least in Eclipse).
Let's use standard C++ list initialization (C++11 and up) instead.
Designated initializatin is going to C++20,
so it is not neccessary to apply C++ specific code
for that version and up.

Signed-off-by: Artur Lipowski <Artur.Lipowski@hidglobal.com>
2021-01-20 09:23:20 -05:00
Peter Bigot 6ae2374eea samples: drivers: gpio: remove stray board file
Remove UP Squared support for the gpio sample that was merged after
the sample itself was removed.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-20 09:15:53 -05:00
Gustavo Romero ba0c205b56 boards: arm: stm32: Adjust maximum speed for STM32F746G disco board
Currently configuration for STM32F746G Discovery board on reset-start
event is inherited from included files (OpenOCD stm32f7x.cfg), but
contrary to the inherited adapter speed on reset-init event, the speed
inherited for the reset-start event is only 2000 kHz, which is not
available, so a lower speed is picked up automatically generating the
following message several times when flashing the board:

Info : Unable to match requested speed 2000 kHz, using 1800 kHz

That commit overrides that suboptimal speed for reset-start event and
sets it to the same speed as used by reset-init event, i.e. the maximum
speed (4000 kHz), so the noisy messages like the above one disappear.

The change also improves a bit the throughput when writing to the board.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
2021-01-20 08:08:11 -06:00
Henrik Brix Andersen 3860551196 tests: drivers: pwm: loopback: add support for twr_ke18f board
Add support for testing the NXP Kinetis Pulse Width Timer (PWT) on the
NXP TWR-KE18F development board using PWM loopback.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-20 08:05:57 -06:00
Henrik Brix Andersen ab5b13b603 boards: arm: twr_ke18f: add pinmux configuration for PWT testing
Add pinmux configuration for testing the NXP Kinetis Pulse Width Timer
(PWT) in loopback mode.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-20 08:05:57 -06:00
Henrik Brix Andersen 6b285de7aa dts: arm: nxp: ke1xf: add PWT devicetree node
Add devicetree node for the NXP Kinetis Pulse Width Timer (PWT) to the
NXP Kinetis KE1xF Soc.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-20 08:05:57 -06:00
Henrik Brix Andersen 8167134f05 drivers: pwm: add driver for the NXP Kinetis Pulse Width Timer (PWT)
Add PWM capture driver for the NXP Kinetis Pulse Width Timer (PWT).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-20 08:05:57 -06:00