Commit graph

41120 commits

Author SHA1 Message Date
Andy Ross
a2f6826f9c kernel/thread: Don't clobber arch initialization of switch_handle
The recent synchronization work required that the kernel guarantee
switch_handle is non-null, but it did it in a way that works for ARC
and x86_64 but would clobber the work xtensa had already done to
populate that field.

There's no point: just make this an assert, as it's always been the
arch layer's job.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-02-19 08:29:35 -05:00
Romit Dasgupta
b6154be163 boards: arm: Replaces a non-working web link
The web link for the Attribution units is broken.
Replacing it with a working version.

Signed-off-by: Romit Dasgupta <romlinux@gmail.com>
2020-02-19 12:40:54 +01:00
Ioannis Glaropoulos
7544823731 tests: arch: arm_irq_vector_table: minor inline comment updates
Distinguish between nRF51/nRF52 and nRF53 platforms in the
inline comments when definining the built-time asserts for
the test.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-19 12:40:46 +02:00
Ioannis Glaropoulos
ca4ca081ef tests: arch: arm_irq_vector_table: fix test for nRF53-based platforms
The commit fixes the test for nRF5340-based platforms by
customizing the ISR offset and the IRQ vector table.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-19 12:40:46 +02:00
Yihui Xiong
281c7cb1e2 usb: Set USB version to 2.1 when using BOS
BOS (Binary Device Object Store) Descriptor is included
since USB 2.1.
fixed #22774

Signed-off-by: Yihui Xiong <yihui.xiong@hotmail.com>
2020-02-19 12:30:35 +02:00
Aurelien Jarno
28b7953eb9 usb: cdc_acm: do not send ZLP for IN transactions
When the length of the transfer is an exact multiple of IN endpoint MPS
in the ring buffer, transfer one byte less to avoid zero-length packet.
Otherwise the application running on the host may conclude that there
is no more data to be received (i.e. the transaction has completed),
hence not triggering another I/O Request Packet (IRP).

Fixes #21713.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-02-19 12:29:50 +02:00
Aurelien Jarno
01a19a6129 usb: cdc_acm: do not call usb_transfer if there is nothing to transfer
In case the ring buffer is empty, ring_buf_get_claim() returns a zero
length. Exit the function in that case as calling usb_transfer() with a
zero length will send a ZLP.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-02-19 12:29:50 +02:00
Aurelien Jarno
b0e3a5fb9f usb: cdc_acm: TX memory and performance improvements
Currently the cdc_acm implementation pass the data to usb_transfer() by
a chunk of IN endpoint MPS. This has 2 drawbacks:
- at higher throughput, each transfer needs 2 packets due to the need of
  an extra ZLP;
- a temporary buffer of size USB MPS is needed.

This patch improves the memory consumption and performances by passing
the ring buffer directly to usb_transfer(). It only has a small
performance degradation when the ring buffer wraps and less than a IN
endpoint MPS has to be sent.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-02-19 12:29:50 +02:00
Anas Nashif
28298fa06a test: object_tracing: account for pre-existing threads
Count existing threads before the test has started to deal with
platforms that have some existing services.

Remove hard-coded accounting for IPM, this is now counted before the
test starts.

Fixes #21756

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-19 00:45:29 -05:00
Martí Bolívar
3ddc2da64d doc: remove 'Creating redirect:' build output
This is noisy and getting in the way when I try to read the actual
warnings and errors in the output.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-18 23:09:31 -05:00
Francisco Munoz
3f50ed2e6f boards: mec1501modular_assy6885: Disable KSCAN to avoid test case issues
This change also addresses issue# 21756 tests/obj_tracin where the
expected thread count does not match because kscan module is enabled
in this board. The Microchip kscan driver is contributing to the total
thread count, therefore interfering with the expected test result.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2020-02-18 19:10:47 -05:00
Francisco Munoz
f488d4d1f4 boards: mec15xxevb_assy6853: Disable KSCAN to avoid test case issues
This change addresses issue# 21756 where the expected thread
count does not match because kscan module is enabled in this board.
The Microchip kscan driver is contributing to the total thread count,
therefore interfering with the expected test result.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2020-02-18 19:10:47 -05:00
Daniel Leung
55afe00195 interrupt_controller: dw: fix base address not defined in config
During driver rewrite, the field to specify the base address of
the interrupt controller was dropped, which results in error in
device initialization due to accessing random address (or null).
Fix it by specifying the base address.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-18 15:31:19 -06:00
Ulf Magnusson
47963cae3f doc: dts: Add lots of documentation for generated macros
Add detailed documentation for macros that get generated by
gen_defines.py. Covers properties, interrupts, phandle-arrays, clocks,
buses, flash partitions, SPI, etc.

Should be relatively complete now, though there might be overlooked
details.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Co-Authored-By: Kumar Gala <kumar.gala@linaro.org>
Co-Authored-By: Marti Bolivar <marti.bolivar@nordicsemi.no>
2020-02-18 15:24:59 -06:00
Stephanos Ioannidis
354f2bbf1e sanitycheck: Update section names for memory size calculation
This commit updates the section names for memory size calculation in
the sanitycheck script as follows:

1. Remove `_TEXT_SECTION_NAME_2` section, which no longer exists, from
  the `rw_sections`.

2. Add `rom_start` section, which mostly contains read-only data such
  as the exception vector table, to the `ro_sections`.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-18 12:59:25 -05:00
Jukka Rissanen
24abb19f41 doc: net: Add information about GSM modem support
General information about GSM modem added.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-18 18:52:43 +02:00
Jukka Rissanen
48a1a2ef81 samples: net: gsm_modem: Add README file
Add documentation to the GSM modem sample application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-18 18:52:43 +02:00
Nathaniel Graff
eedf4d7043 doc: release notes: RISC-V release notes for 2.2
Adds 2.2 release notes for the RISC-V architecture.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2020-02-18 18:48:34 +02:00
Erwan Gouriou
557d263354 dts: stm32f3: Remap USB IRQ to avoid conflict with CAN
On stm32f302/3 series, USB and CAN_1 share same IRQ lines.
To use USB and CAN_1 together, USB IRQ could be remap to other
line numbers, on which there is no conflict.
Remap the USB IRQ lines by default:
-Assign remap number in matching dtsi files
-Perform remap before usb driver init

Additionally, fix compilation issue in usb driver.

Fixes #22343

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-02-18 18:44:42 +02:00
Henrik Brix Andersen
b21ad92a53 doc: release-notes-2.2: add EEPROM release notes for v2.2
Add EEPROM release notes for version 2.2.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-02-18 18:43:29 +02:00
Alexey Brodkin
9c6a6c4e68 boards: arc: Load Elf with OpenOCD by default
Now when ARC development boards are switched to generic OpenOCD
runner we need to explicitly instruct the runner to load Elf but not
binary image (which is a default for OpenOCD runner).

This might be done either manually adding "--use-elf" option to
west's command line or that might be added by default fro affected
boards, which we do exactly now.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/22888.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-18 09:58:47 -05:00
Joakim Andersson
2e6983c0f5 Bluetooth: GATT: Fix invalid DB hast written to settings storage
Fix issue where an invalid (all zeroes) hash was written to settings
storage on reset. This caused the old value to written to zeroes, before
being written back to it's original value again immediately after.
This causes excessive flash wear.

This happens because the check if (k_delayed_work_remaining) returns the
amount of time until the work will execute. When that time has run out
the time is zero, but the work has not yet been executed.
We then write the invalid hash to flash, and then once the work-item
executes it will write the correct value.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-18 13:55:33 +02:00
Joakim Andersson
ee3f634cf7 Bluetooth: GATT: Document settings_load and service register requirement
Document that all services that should be included in the initial
database hash should be registered before calling settings load. All
services added after settings_load will trigger a new hash calculation
and a new value stored. This would result in the database hash always
being rewritten.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-18 13:55:33 +02:00
George Stefan
c864615f8e boards: riscv: rv32m1_vega: remove no MESH limitation
Now the VEGABoard BLE supports MESH,
so the docs need to be updated accordingly.

Signed-off-by: George Stefan <george.stefan@nxp.com>
2020-02-18 13:48:12 +02:00
George Stefan
f8293807da bluetooth: controller: openisa/RV32M1: fix LL scheduling
- avoid spourious radio interrupts by fixing ISR set,
    waiting for idle, command configuration
- adjust counter to account for missing increment
- change preemption instant to avoid missing the deadline in LLL
- decrese EVENT_JITTER_US and
    EVENT_TICKER_RES_MARGIN_US (same as Nordic)

Continuous scanning and connections are working fine now.

Signed-off-by: George Stefan <george.stefan@nxp.com>
2020-02-18 13:48:12 +02:00
Cristi Caciuloiu
9f7cccc90f bluetooth: controller: openisa: update west.yml to point to HAL
Encryption support for Vega board needs updated HAL/openisa
3b54187649

Signed-off-by: Cristi Caciuloiu <cristian.caciuloiu@nxp.com>
2020-02-18 12:34:27 +02:00
Cristi Caciuloiu
2a2f84256c bluetooth: controller: openisa: encryption and decryption using CAUv3
Created unit tests for the encryption and decryption functions.
Tested with the peripheral and with central_hr samples.
Due to latency of CAUv3 when used as CCM inline accelerator
only one of the PDU can be encrypted/decrypted within an
bilateral exchange M->S + S->M in a connection event.
If the RXed PDU is encrypted, the TXed PDU must be empty
with More Data if there is data in the LLL queue.
The TXed PDU will be encrypted when an empty PDU is RXed.

Signed-off-by: Cristi Caciuloiu <cristian.caciuloiu@nxp.com>
2020-02-18 12:34:27 +02:00
Vincent Wan
a9bfd28a39 drivers: gpio_cc32xx: disable interrupts before changing interrupt type
Disabling gpio interrupts on the pin prior to changing its interrupt
type to level-based helps prevent spurious interrupts that would be
otherwise observed, if gpio interrupts were originally enabled when
gpio_cc32xx_pin_interrupt_configure() is invoked.

Fixes #22847

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-02-17 18:14:57 -06:00
Vincent Wan
ce5c6843d3 drivers: gpio_cc32xx: avoid unnecessarily disabling interrupts in isr
In the gpio isr, gpio interrupts are disabled when invoking the
registered callbacks. This is unnecessary, and causes a problem if the
callback attempts to disable gpio interrupts by reconfiguring the pin
as in the test gpio_basic_api.

Fixes #22847

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-02-17 18:14:57 -06:00
Andrzej Puzdrowski
ead335cb40 settings: Include entire API into doxygen
The Runtime API and the name processing API were omitted in
the documentation as were not included in any doxygen group.

This patch includes them in dedicated settings API doxygen
sub-groups.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-02-17 15:34:33 -06:00
Göran Weinholt
d3ff59d383 drivers: gpio_pca95xx: add missing gpio_utils.h include
Include gpio_utils.h to fix a build failure:

gpio_pca95xx.c:490:20: warning: implicit declaration of
 function 'GPIO_PORT_PIN_MASK_FROM_NGPIOS'
 [-Wimplicit-function-declaration]
gpio_pca95xx.c:490:20: error: initializer element is not constant
   .port_pin_mask = GPIO_PORT_PIN_MASK_FROM_NGPIOS(
    DT_INST_##inst##_NXP_PCA95XX_NGPIOS), \

Signed-off-by: Göran Weinholt <goran.weinholt@endian.se>
2020-02-17 16:27:19 -05:00
Luiz Augusto von Dentz
3e4ac40149 tests: work_q: Add tests for resubmit from handler
This adds tests to resubmission from work handler.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-02-17 22:37:26 +02:00
Luiz Augusto von Dentz
038d727c18 kernel: work: Return error if timeout cannot be aborted
This is aligned with the documentation which states that an error shall
be returned if the work has been completed:

  '-EINVAL Work item is being processed or has completed its work.'

Though in order to be able to resubmit from the handler itself it needs
to be able to distinct when the work is already completed so instead of
-EINVAL it return -EALREADY when the work is considered to be completed.

Fixes #22803

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-02-17 22:37:26 +02:00
Anas Nashif
ef486b2c50 cmake: report extra version (rcX)
Right now when building a release candidate in master cmake reports the
version wrongly as the final version, for example:

-- Zephyr version: 2.2.0

This is misleading and confusing. Cmake does not like the rcX suffix and
internally we indeed use 2.2.0 as the version.

This patch just changes the output of the status message and adds the
extra version field:

-- Zephyr version: 2.2.0-rc1

and continues to use the cmake compatible version internally.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-17 14:34:39 -05:00
Anas Nashif
223826179c ci: do not run Documentation/License for ci-tools
Those checks are now being run using GH actions. ci-tools was changes to
support excluding modules and stopping them from reporting pending
status.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-17 12:42:27 -05:00
Alberto Escolar Piedras
0e95b9fe28 manifest: EDTT: Update to latest version with HCI command fixes
Includes fixes to HCI commands,
which are necessary for
https://github.com/zephyrproject-rtos/zephyr/issues/22085
see:
https://github.com/EDTTool/EDTT/pull/11

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-02-17 19:03:12 +02:00
Joakim Andersson
b5c02d0649 Bluetooth: EDTT: Remove ncmd and opcode from EDTT command response
Encode all types of EDTT command response with similar structure to how
it is generated from command complete when it is generated from the
command status.
This structure will be:
2 byte EDTT command response code
2 byte EDTT length field
1 byte HCI status
N bytes of command output parameters

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-17 19:03:12 +02:00
Joakim Andersson
a581443028 Bluetooth: EDTT: Enable disabled tests
Enable tests that was disabled due to test failure. Test have been
updated and are now passing.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-17 19:03:12 +02:00
Joakim Andersson
2c857f9f69 Bluetooth: EDTT: Replace printk with logging
Replace printk with logging, add additional log statements for command
handling.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-17 19:03:12 +02:00
Joakim Andersson
1c551e4835 Bluetooth: EDTT: Remove use of deprecated defines
Remove the use of BT_BUF_USER_DATA_MIN which has been deprecated.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-17 19:03:12 +02:00
Kumar Gala
93b78b7bf8 drivers: spi: sifive: Fix comment to match ifdef
The endif comment didn't match the actual ifdef define.  Fix the comment
to match.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-17 09:05:32 +01:00
Stephen Pliaskin
84e381e0a7 Bluetooth: Mesh: typo in condition in comp_add_elem of cfg_srv
Vendor model IDs take up four (not two) bytes in the composition

Fixes #22822

Signed-off-by: Stephen Pliaskin <strelok@e-kirov.ru>
2020-02-16 23:28:51 +03:00
Kumar Gala
8469ae6c87 github: doc-publish: remove debug flag
Now that we found the permission issue that was causing the aws s3 sync
to fail we can remove the debug flag.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-16 12:08:48 -06:00
Kumar Gala
c6fc36f7cc Revert "github: For now limit doc publish to master"
This branch filter doesn't work as expected with tag.  Need to test this
more on testing tree to find a combo or solution that works properly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-15 17:35:58 -06:00
Kumar Gala
ac484f2f39 github: add more debug to see why aws sync is failing
For some reason the aws s3 sync fails, but not sure exactly why.  Adding
more debug to see if we can understand what's going on.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-15 16:43:18 -06:00
Kumar Gala
9e075e5e8c github: For now limit doc publish to master
Limit doc publish workflow to master branch.  Need to see if we can
seperate out 'latest' to be on master only and release branches to
publish to the proper location.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-15 16:43:18 -06:00
Gerson Fernando Budke
4541b5711e boards: arm: sam4e_xpro: Fix SAM-BA link on doc
Update Atmel SAM-BA link address to MHCP SAM-BA web page. Now user will
navigate to right page instead be at MHCP home page.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-02-15 16:35:01 -06:00
Gerson Fernando Budke
6ea8ae7a9a soc: arm: atmel: sam4e: Fix USART1 soc_pinmap
The USART1 soc_pinmap have wrong TXD1 pin definition. This fix port and
function definition.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-02-15 16:35:01 -06:00
Gerson Fernando Budke
09eab93889 soc: arm: atmel: sam4e: Add missing usart dts_fixup
Add mising dts_fixups symbols to allow enable usart driver. This fix
align code on dts_fixups too.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-02-15 16:35:01 -06:00
Nick Ward
1e503b5ca7 lib: posix: clock: Fix nanosecond rollover logic
It was out by one count.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2020-02-15 23:09:43 +03:00