Commit Graph

48805 Commits

Author SHA1 Message Date
Andrei Emeltchenko 4bbcd1433e edac: shell: Update shell commands comments
Correct commands descriptions in comments

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-19 16:06:29 +02:00
Carlo Caione 3f055058dc aarch64: Remove QEMU 'wfi' issue workaround
The problem is not reproducible when CONFIG_QEMU_ICOUNT=n. We can now
revert the commit aebb9d8a45.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-02-19 16:26:38 +03:00
Carlo Caione 1be06335fa qemu_cortex_a53: Unset QEMU icount to enable MTTCG
Quoting from the QEMU manual "MTTCG is not compatible with -icount and
enabling icount will force a single threaded run.". Given that for
Cortex-A53 we haven't seen any particular problem when disabling icount
try to disable it.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-02-19 16:26:38 +03:00
Carlo Caione 13118acb15 arch: aarch64: Remove useless ISB
Quoting from the reference manual "Writes to PSTATE.{PAN, D, A, I, F}
occur in program order without the need for additional synchronization."
so we can remove the ISB for arch_irq_lock() and arch_irq_unlock().

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-02-19 16:26:38 +03:00
Laczen JMS decf521660 drivers: eeprom: add emulated eeprom in flash
Modifications to incorporate latest write to new flash area
Modification to avoid writing garbage to new flash area when compactor
is called during init.
Modifications to allow erase at partition size instead of eeprom
pagesize.
Modifications to better separate rambuf usage from flash usage.
Corrected some errors in compactor

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2021-02-19 14:06:15 +01:00
Laczen JMS 232272cff8 drivers: eeprom: EEPROM emulation in flash memory
This driver emulates a EEPROM device in flash.

Reworked implementation with modified flash layout.

The emulation represents the EEPROM in flash as a region that is a
direct map of the eeprom data followed by a region where changes to
the eeprom data is stored. Changes are written as address-data
combinations. The size of such a combination is determined by the
flash write block size and the size of the eeprom (required address
space), with a minimum of 4 byte.
The eeprom page needs to be a multiple of the flash page. Multiple
eeprom pages is also so supported and increases the number of writes
that can be performed.

The eeprom size, pagesize and the flash partition used for the eeprom
are defined in the dts. The flash partition should allow at least two
eeprom pages. For fast read access a rambuffer can be enabled for the
eeprom (by setting the option rambuf in the dts).

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2021-02-19 14:06:15 +01:00
Nicolas Pitre 7a91cf0176 Revert "lib/os/heap: introduce option to force big heap mode"
This reverts commit b6b6d39bb6.

With both commit 4690b8d5ec ("libc/minimal: fix malloc() allocated
memory alignment") and commit c822e0abbd ("libc/minimal: fix
realloc() allocated memory alignment") in place, there is no longer
a need for enforcing the big heap mode on every allocations.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-02-19 07:32:22 -05:00
Wolfgang Puffitsch 1a7157d316 Bluetooth: controller: Add missing compilation guard
Add missing compilation guard for initialization of "force" flag in
ull_slave.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2021-02-19 07:32:01 -05:00
Ioannis Glaropoulos 286757e3df soc: arm: nrf5340: remove handling for Erratum 19
Erratum 19 applies to earlier revisions of nRF5340 DK,
which are no longer supported in the tree, so we can
remove the code that handles it.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-19 15:12:28 +03:00
Kumar Gala dd58d5e47f drivers: eth: mcux: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-19 05:36:35 -06:00
Flavio Ceolin 155a06a1c9 scripts: Update paths on tags.sh
Update source paths.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-19 05:28:09 -06:00
Ioannis Glaropoulos ab1600de00 tests: arch: arm: move arm_psci to arm64 directory
arm_psci test suite is specific to ARM64, while
all other test suites in tests/arch/arm directory
are supported in Cortex-M architecture only. We
move arm_psci to arm64 directory, effectively,
separating tests suites for AARCH32 and AARCH64.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-19 05:27:31 -06:00
Thomas Stranger b13ecb5ceb west.yml: hal_stm32: update g0 from v1.3.0 to v1.4.0
Adds hal dependencies necessary to introduces STM32G050xx, STM32G051xx,
STM32G061xx, STM32G0C1xx, STM32G0B1xx, and STM32G0B0xx devices.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-02-19 05:26:31 -06:00
Erwan Gouriou 2179e068ea samples/driver: watchdog: wwdg sample should run with west
A different configuration is applied when running this test
using west or using twister.
Both will use the disco_l475_iot1 overlay, but the extra config
for clock bus tunning is applied only when using twister and
samples is failed when run with west.
Move this extra config from sample.yaml to board .conf file so
it is applied in both cases.

Fixes #32376

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-02-19 05:25:52 -06:00
Erwan Gouriou d31ae99025 boards: stm32f1: Remove useless CONFIG_CLOCK_STM32_PLL_XTPRE=n
CLOCK_STM32_PLL_XTPRE Kconfig symbol default value is n.
Then there is no need to explicitly set it to 'n' in stm32f1 boards



Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-02-19 05:22:36 -06:00
Erwan Gouriou 832a0ec049 drivers/clock_control: stm32f1: Reinstanciate CLOCK_STM32_PLL_XTPRE
This reverts commit "drivers/clock_control: Remove useless
CLOCK_STM32_PLL_XTPRE config" 9be1f7e22f.

Fixes #32382

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-02-19 05:22:36 -06:00
Peter Bigot 2aab687270 device: introduce device_usable_check
As we add support for devices that are powered down, or are present
but have not yet been started, we need more precise information about
why a device isn't ready, so callers can take appropriate steps to
make it ready.

Add a new function that determines readiness and indicates the reason
for not being ready in a defined unique error code per condition.
Expose this in both a syscall form to be invoked from applications,
and a unchecked form that can be used from supervisor contexts
including syscall implementation functions.

Anticipated future conditions include:
* device is powered down and needs to be brought back up;
* device was installed disabled and has not been started.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 05:17:37 -06:00
Kumar Gala c9bfb25184 drivers: counter: mcux: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-19 05:03:11 -06:00
Kumar Gala 99d1b292cc drivers: watchdog: NXP: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-19 05:02:52 -06:00
Vinayak Kariappa Chettimada 8e75fff580 Bluetooth: controller: Move auto variables closer to local reference
Move auto variables closer to their locality of reference.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-02-19 10:29:10 +01:00
Vinayak Kariappa Chettimada 69869d1834 Bluetooth: controller: Move ull_adv_sync_pdu_set_clear
Move ull_adv_sync_pdu_set_clear function after LL interface
functions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-02-19 10:28:55 +01:00
Vinayak Kariappa Chettimada b230d23938 Bluetooth: controller: Rename pdu_biginfo to pdu_big_info
Rename struct pdu_biginfo to struct pdu_big_info.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-02-19 10:28:41 +01:00
Vinayak Kariappa Chettimada 4b4267fa09 Bluetooth: controller: Rearrange LL interface functions
Rearrange the LL interface functions in the ll.h file to
group functions use by HCI separate from other buffer and
control flow related functions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-02-19 10:28:11 +01:00
Vinayak Kariappa Chettimada cba60c56bd Bluetooth: controller: Minor rearrange LLL Adv structures
Minor refactoring/rearranging of LLL adv structures.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-02-19 10:27:48 +01:00
Vinayak Kariappa Chettimada 9527c04c60 Bluetooth: controller: Move version define to ll_feat.h file
Move the controller version define into ll_feat.h file to
keep the version number and featureset bitmaps together.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-02-19 10:26:48 +01:00
Thomas LE ROUX 37dca20444 net: lwm2m: Utility functions added to LWM2M Engine
Added 3 utility functions :
- lwm2m_engine_update_period_service() which updates the period of a
given service.
- lwm2m_engine_update_period_min_observer() which updates the
min_period_sec for a given observe node.
- lwm2m_engine_update_period_max_observer() which updates the
max_period_sec for a given observe node.

Signed-off-by: Thomas LE ROUX <thomas.leroux@smile.fr>
2021-02-19 10:52:08 +02:00
Torsten Rasmussen fa8912d9f4 cmake: remove duplicated ZEPHYR_BASE append to BOARD_ROOT
The following two lines are duplicated in boilerplate.cmake
```
zephyr_file(APPLICATION_ROOT BOARD_ROOT)
list(APPEND BOARD_ROOT ${ZEPHYR_BASE})
```

This commit removes one set of the duplicated lines.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-02-19 10:24:13 +03:00
Thomas LE ROUX 3fe33fe388 boards: arm:Added Arduino's nexus node on the board's devicetree.
Also added various joystick aliases.

Signed-off-by: Thomas LE ROUX <thomas.leroux@smile.fr>
2021-02-18 13:35:22 -06:00
Kumar Gala 9dfd87b931 device: esp32: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 12:42:53 -06:00
Kumar Gala 2a69690823 drivers: i2c: NXP: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 12:27:59 -06:00
Kumar Gala de57449407 disk: sdhc: NXP: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 12:27:48 -06:00
Andy Ross 686b9fff5e samples/synchronization: Clean up SMP CPU pinning example
There was some code to demonstrate the cpu_mask API here, but it was
asymmetric (only thread B was pinned) and assumed exactly two CPUs.

Start both threads pinned to CPUs 0 and 1 from an external main, and
predicate the pinning on there actually being more than one SMP CPU.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-02-18 12:04:49 -05:00
Andriy Gelman c348a05d5a drivers: can: Fix sample point calculation
CAN_SYNC_SEG and ts1 are in common units. Both need to be scaled by 1000
to calculate the sample point.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-02-18 12:04:09 -05:00
Wolfgang Puffitsch 9b3c0572cb Bluetooth: controller: Align include paths in hci.c
Align include paths for LLL include files in hci.c.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2021-02-18 12:03:13 -05:00
Wolfgang Puffitsch cfa668fd51 Bluetooth: controller: Restructure LLL include files
Move LLL header files for all roles to common folder. Move
vendor-specific content to internal header files, in particular ADV
buffer handling. Define the vendor-specific type lll_adv_pdu in a
separate header file lll_adv_pdu.h to avoid cyclic dependency when
moving ADV buffer handling to internal header file. Make sure all
internal header files are in vendor-specific folders.

The goal is to have a more consistent structure for LLL header files
and allow unconditional inclusion of non-internal LLL header files.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2021-02-18 12:03:13 -05:00
Kumar Gala 7ee312ec57 drivers: spi: NXP: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 10:53:27 -06:00
Kumar Gala 2dd696f544 sdk: Move to SDK 0.12.3
Update ci and docs to reference SDK 0.12.3.  Update to SDK 0.12.3 as
it includes fixes for support ARM Cortex-M55.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 11:52:48 -05:00
Kumar Gala 2aae5a56e3 drivers: can: mcux: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 10:48:47 -06:00
Kumar Gala 0eead3aab6 drivers: pwm: NXP: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 10:47:15 -06:00
Kumar Gala 09c054b13c drivers: serial: NXP: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 10:39:07 -06:00
Kamil Kasperczyk 7b26544547 net: openthread: added heap related otPlat methods implementation
* Added implementations of otPlatCAlloc and otPlatFree methods
necessary for the OpenThread in case of using EXTERNAL_HEAP.
* Added CONFIG_OPENTHREAD_DNSSD_SERVER option to allow enabling
OT_DNSS_SERVER feature.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
2021-02-18 18:23:06 +02:00
Kumar Gala 3a8fffb9c3 device: rv32m1: Convert clock control to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the clock controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 09:26:39 -06:00
Mulin Chao ff3fd6dc37 driver: i2c: npcx: fix a glitch on SCL before stop condition.
In the npcx i2c FIFO mechanism, the hardware will release SCL bus
immediately after the driver reads data from FIFO. That's why we need
to hold SCL bus before configuring the next transaction. Once it was
done, the driver release the bus for the next transaction.

But during the last transaction, the driver releases SCL first then
starts a STOP condition. At this moment, the SCL is pulled high by PU
resistance and driven to low for generating STOP condition later. This
additional clock might influence some i2c devices if they don't reset
their state machine after receiving STOP.

This CL fixes this issue by two steps:
1. Distinguish that it's the last read transaction with STOP condition?
2. If so, issue STOP condition before reading FIFO instead of holding
   SCL bus. Then the hardware will generate it immediately after reading
   FIFO.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-02-18 08:54:48 -06:00
Joakim Andersson a4f0ca8649 Bluetooth: host: Refactor host ECC handling to own source file
Move the host ECC handling under BT_ECC to its own source file.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-02-18 13:50:22 +01:00
Joakim Andersson 4a25fb7136 Bluetooth: host: Remove dependency on host emulation for debug ECC keys
Remove the depency on host emulation of ECC for the Use debug keys
option.
This allows the application to use debug keys without shifting the
ECC from the controller to the host, which could potentially alter
the behavior of the application and make debugging this way less useful.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-02-18 13:50:22 +01:00
Joakim Andersson e0787bf31b Bluetooth: host: Add definitions for generate DHKey v2 commands
Add definitions for the HCI command LE Generate DHKey v2.
This command includes the option to use the debug private key.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-02-18 13:50:22 +01:00
Joakim Andersson 9235b1b8b3 Bluetooth: Refactor ECC emulation supported commands bits
Refactor the ECC emulation setting the supported command bits in order
to group the supported commands together with the implementation of
these commands.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-02-18 13:50:22 +01:00
Morten Priess 5412f61ac6 Bluetooth: controller: Introduce separate done memq
In order to avoid stalling LLCP procedures blocking done event
processing, done events are now put in a separate memory queue,
and processed by own mayfly function.
This ensures prepare/done refcount balancing and prevents assertion
due to lack of done events.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-02-18 13:42:43 +01:00
Andrzej Kaczmarek def2d7cf4e Bluetooth: controller: Fix reset with ext adv enabled
We need to make sure aux is cleared on reset, otherwise we may end up
with legacy advertising with aux.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-02-18 13:29:37 +01:00
Andrzej Kaczmarek 74d6b9fae9 Bluetooth: controller: Improve readability
Create shortcuts to set and lll to make code easier to read.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-02-18 13:29:37 +01:00