Commit graph

41120 commits

Author SHA1 Message Date
Kumar Gala
5a31ee2175 soc: riscv: openisa_rv32m1: Convert to new dts macros
Convert from DT_OPENISA_RV32M1_INTMUX_INTMUX_LABEL to
DT_LABEL(DT_INST(0, openisa_rv32m1_intmux)).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 08:03:24 -05:00
Kumar Gala
a918d301fe drivers: adc: adc_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks from devicetree.

We add a property ('calib-offset') for the SAM{D,E}5x family of SoCs
that is the bit position offset from ADC0 BIASCOMP in the NVM Software
Calibration Area Mapping.  For ADC0 this is typically 0 and for ADC1
this will be 14.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 08:02:36 -05:00
David Brown
b8dec4805a release: Update security section for 1.14.2
Add information on security vulnerabilities fixed in this release.
These CVEs are under embargo, and vulnerabilities page will be updated
when the embargo ends.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-04-29 09:01:44 -04:00
Anas Nashif
7ab8995932 release: v1.14.2 release notes
Release notes for 1.14.2 with a list of all fixed bugs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-29 09:01:44 -04:00
Anas Nashif
051602f4f3 sanitycheck: support coverage with unit tests
Fix setting coverage for unit tests and link against gcov when coverage
is enabled.

Fixes #24674

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-29 09:01:06 -04:00
Carles Cufi
1ed6a3889b include: sys: Add SYS_FOREVER_MS and SYS_TIMEOUT_MS macros
Add a macro that represents a system-wide forever wait for millisecond
timeouts, and a second one that converts from ms to kernel timeout
units.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-29 15:28:02 +03:00
Kumar Gala
614d82aa95 boards: arm: mec2016evb_assy6797: Use new dts macros
Convert old style ifdef(DT_NS16550_400F2400_BASE_ADDRESS) to
if DT_HAS_NODE(DT_NODELABEL(uart0)) to decide to config pins for UART0
and similarly for UART1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 11:21:52 +02:00
Stephanos Ioannidis
6829323036 tests: drivers: hwinfo: Remove unnecessary filter
The hwinfo driver test currently filters for `CONFIG_HWINFO`, but this
symbol is set to `y` by the `prj.conf` and therefore will always be
selected.

This commit removes the unnecessary `CONFIG_HWINFO` filter.

Note that the hwinfo driver test `ifdef`s `CONFIG_HWINFO_HAS_DRIVER`,
and having an actual hwinfo driver implementation is not a requirement
(if no hwinfo driver is available, the test validates that -ENOTSUP is
returned by `hwinfo_get_device_id`).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-29 11:07:37 +02:00
Paul Sokolovsky
af3defd34e net: sntp: Namespace private SNTP definitions
SNTP implementation defined symbols like "MODE_MASK", which can easily
conflict with similary laxly defined symbols in other modules, and
indeed, we hit a case like that (below). So, prefix these symbols
consistently with "SNTP_", until more clear private namespacing
convention are made pervasive in Zephyr.

subsys/net/lib/sntp/sntp_pkt.h:14: error: "MODE_MASK" redefined
include/arch/arm/aarch32/cortex_a_r/cpu.h:17: note: this is the
  location of the previous definition

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-04-29 09:09:04 +03:00
Kumar Gala
b7626df483 drivers: timer: arm: Convert to new DTS macros
Convert old style defines for IRQ numbers to using DT_IRQN and
DT_INST to extract IRQ numbers.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 20:40:35 -04:00
Kumar Gala
b810b4d452 Revert "tests: no need long busy_wait to waste cycles"
This reverts commit 315cba1c40 as it was
causing CI failures for qemu_cortex_m0.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 20:34:57 -04:00
Kumar Gala
aef3cfc332 soc: nxp_imx-rt: Convert to new dt macros in linker.ld
Convert ocram and sdram regions to use new macro DT_REG_ADDR() and
DT_REG_SIZE() with DT_NODELABEL to determine the various memories size
and base address.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 18:23:40 -05:00
Jose Alberto Meza
53c8bea659 samples: drivers: espi: Fix coverity issue
Update variable according to new gpio API.
Fixes #23575

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-04-29 00:11:48 +02:00
Kumar Gala
d73ffa3855 drivers: uart: mcux_flexcomm: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  Removed per
instance Kconfig symbols and replaced with DT_NODELABEL references
where needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 16:54:30 -05:00
Kumar Gala
fd021da59a drivers: uart: mcux_lpsci: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  Removed per
instance Kconfig symbols and replaced with DT_NODELABEL references
where needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 16:54:30 -05:00
Andrei Emeltchenko
7770d182c1 boards: up_squared_adsp: Update logtool tool
Update logtool tool to be able to read logs from xtensa qemu.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-04-28 16:14:47 -04:00
Erwan Gouriou
46649f9224 dts/bindings: st,stm32-can: Add optional master-can property
In STM32 can driver CAN2 instance need to know the base address
of CAN1 instance which is referenced as master can.
Add this information as an optional property to stm32 can binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 14:49:55 -05:00
Erwan Gouriou
c9135686b2 drivers/can: stm32: Convert to DT macros
Use DT macros to configure stm32 can device instances.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 14:49:55 -05:00
Erwan Gouriou
fe244040d1 boards: stm32: Replace CAN Kconfig symbols by dt instances
Replace use of CAN_X Kconfig symbols by access to dt instances

Control of enabled instances is now done using dts nodes status
field ('okay'/'disabled'). For boards supporting only can2,
can1 instance is disabled.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 14:49:55 -05:00
Erwan Gouriou
826e24ca58 drivers/can: stm32: configure driver thanks to compatible
Remove need to configure from soc/

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 14:49:55 -05:00
Peter Bigot
82d4fcc1bf drivers: hwinfo: fix ESP32 implementation
Add the missing prefix z_ required to make the ESP32 version override
the weak implementation.

General practice in ESP32 seems to be to use the MAC address, so
extract that in its canonical byte order.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-28 15:32:53 -04:00
Peter Bigot
a09f6ad54c json: fix buffer overrun in encoding helper
The bounds check failed to account for the additional space required
for the terminating NUL after the encoded value was written.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-28 15:06:45 -04:00
Wayne Ren
315cba1c40 tests: no need long busy_wait to waste cycles
* no need long busy_wait to waste cycles, especially in
 CI.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-04-28 10:48:01 -07:00
Kiril Petrov
ea072341d5 net: lwm2m: init pendings and replies on lwm2m_engine_start
On OT network with poor coverage, very often request/observe packets
doesn't get it's ACK and consumes from pendings/replies/message stacks.
In such cases when LWM2M engine tries to recover by resetting its state,
it fails because of lack of free messages.

Signed-off-by: Kiril Petrov <retfie@gmail.com>
2020-04-28 20:46:35 +03:00
Kiril Petrov
7305e7b4a2 net: coap: add coap_pendings_clear and coap_replies_clear
Clears whole stack of pendins and replies.

Signed-off-by: Kiril Petrov <retfie@gmail.com>
2020-04-28 20:46:35 +03:00
Sandeep Tripathy
d4f1f2a07e arch: arm64: add public header for asm macros
Move generic macros to exported assembly header file
'macro.inc'. Rename the existing 'macro.inc' to 'macro_priv.inc'.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
2020-04-28 10:44:42 -07:00
Sandeep Tripathy
3dface77ae arch: arm64: basic synchronization barriers
Add __DSB system wide berrier.
Move the barrier macros to inline function header.

TODO: add more granular oneway barriers.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
2020-04-28 10:44:42 -07:00
Sandeep Tripathy
c4e0b28bb5 arch: arm64: add GIC ICC system register accessors
-Add GIC system register defines.
-Add sysreg read write macros.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
2020-04-28 10:44:42 -07:00
Kumar Gala
9eebda6038 soc: arm: beetle: Convert to new dt macros
Convert to using DT_HAS_NODE(DT_NODELABEL()) to determine if a given ip
block is available.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 12:22:17 -05:00
Martí Bolívar
07044c621b drivers: ethernet: clean up sam_gmac Kconfig
Use the new path access helpers to avoid hard-coding devicetree paths
in Kconfig, which is a bit messy.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-28 12:11:14 -05:00
Martí Bolívar
7ff3ebcbb9 kconfig: add dt_chosen_path() helper
This helper allows setting default Kconfig values based on devicetree
node properties without giving the full path to the node.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-28 12:11:14 -05:00
Martí Bolívar
1fff2358db kconfig: add dt_nodelabel_path() helper
This helper allows setting default Kconfig values based on devicetree
node properties without giving the full path to the node.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-28 12:11:14 -05:00
Martí Bolívar
0682c46fb9 kconfig: helper function optimizations
Use the compat2enabled and label2node maps in the global edt object to
speed up some functions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-28 12:11:14 -05:00
Martí Bolívar
2707d2a785 edtlib: add EDT.label2node
It's a common operation to want to find a node based on its label. Add
a lookup table to make this easier.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-28 12:11:14 -05:00
Wayne Ren
21e9ee75d9 board: iotdk: disable unused peripherals in dts
By defaut, only one uart is used as console.
Disable unused peripherals in dts to avoid
conflicts (issue #23475), save memory footprint,
and reduce the boot time.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-04-28 11:53:46 -05:00
Henrik Brix Andersen
ac5be4fd08 soc: arm: nxp_kinetis: ke1xf: convert clock ip source code to new DT API
Convert the code for setting the clock IP source of the various IPs
present in the NXP KE1xF SoC series to the new DT API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-04-28 10:59:31 -05:00
Anas Nashif
9ace63e6f0 sanitycheck: keep recording.csv with -M option
Do not delete recordings when invoking sanitycheck with
--runtime-artifact-cleanup

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-28 11:41:08 -04:00
Anas Nashif
227392c732 sanitycheck: kill if terminate does not work
In some cases terminate (SIGTERM) is not enough and we have to kill the
proces (SIGKILL), otherwise the process is stuck forever and taking
hours to complete and finally timeout in CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-28 11:41:08 -04:00
Anas Nashif
b802af8350 sanitycheck: set reason to Failed
In some cases we were missing the reason and reporting 'Unknown',
check for failure and set the reason.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-28 11:41:08 -04:00
Anas Nashif
5ed566dda3 soc: apollo_lake: convert older dts macros for i2c
Convert older DT_INST_ macro use the new include/devicetree.h
DT_INST macro APIs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-28 11:40:38 -04:00
Christopher Friedt
d650f4b494 kernel: pipe: fix !K_NO_WAIT and >= min_xfer bytes transferred
If timeout != K_NO_WAIT, then return immediately when not all
bytes_to_read or bytes_to_write have been transfered, but >=
min_xfer have been transferred.

Fixes #24485

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-04-28 16:14:55 +02:00
Erwan Gouriou
4008960afc boards: nucleo_wb55rg: Update HCI lib to version 1.5
Update STM32WB HCI lib support to version 1.5.0.
Additionally provide a doc section to clarify compatibility
with stm32wb wireless co-processor binaries.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 09:09:40 -05:00
Robert Lubos
7a47ac02c0 CODEOWNERS: Replace lwm2m and lwm2m_client owner
Replace @mike-scott with @rlubos as a code owner for lwm2m library and
sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-28 09:38:36 -04:00
Joakim Andersson
e9375a2814 Bluetooth: Remove bluetooth thread stack size analysis
Remove logging of individual threads spread out throughout the
bluetooth subsystem. The stacks can be analysed by enabling the
following options.

CONFIG_THREAD_ANALYZER=y
CONFIG_THREAD_ANALYZER_AUTO=y
CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
Optional:
CONFIG_THREAD_NAME=y

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-28 09:11:13 -04:00
Joakim Andersson
e0d38bf6a1 Bluetooth: samples: hci_uart: Add debug configuration using RTT
Add debug configuration to easily enable logging through RTT. Required
to use RTT since the UART is otherwise used for the h4 UART driver.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-28 09:11:13 -04:00
Joakim Andersson
27ef15b8f5 debug: thread_analyzer: Implement thread analyzer
Thread analyzer is simple module that helps in printing thread
information, like stacks usage statistics.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Signed-off-by: Bartosz Gentkowski <bartosz.gentkowski@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-28 09:11:13 -04:00
Daniel Leung
13ef99831a drivers: gpio: mchp_xec: Convert to using new device tree macros
Convert driver to use the new device tree macro's instead of
dts_fixup.h based macros. This moves us closer to removing both
dts_fixup.h and per instance Kconfig symbols.

The pinmux_mchp_xec is also being updated since it's using DT
from GPIO.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Daniel Leung
5692702248 drivers: pinmux: mchp_xec: Convert to using new device tree macros
Convert driver to use the new device tree macro's instead of
dts_fixup.h based macros. This moves us closer to removing both
dts_fixup.h and per instance Kconfig symbols.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Daniel Leung
f59d56b534 drivers: spi: xec_qmspi: Convert to using DT_INST macros
Convert driver to use instance macro's instead of dts_fixup.h based
macros.  This moves us closer to removing both dts_fixup.h and per
instance Kconfig symbols.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Daniel Leung
e63f1b278b soc: mec1501: remove ns16550 reg shift macros from dts_fixup.h
These are not used anywhere, so remove them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00