Commit graph

41120 commits

Author SHA1 Message Date
Pawel Czarnecki
51b009d045 dts: litex: add LiteX SoC builder vendor
Add LiteX SoC builder vendor with prefix "litex".

Signed-off-by: Pawel Czarnecki <pczarnecki@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-10-21 08:40:09 -05:00
Mateusz Holenko
9a54a60def samples: spi_fujitsu_fram: fix dependencies
This sample will not compile for boards
not supporting GPIO.

Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-10-21 08:40:09 -05:00
Ioannis Glaropoulos
14fc43d675 boards: arm: arduino_due: add option to use jlink tool
With this commit we add the option to use jlink for
flashing and running samples & tests on Arduino Due
using jlink. Bossac remains the default option.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-21 08:35:27 -05:00
Ulf Magnusson
a9759d2cab drivers: lsm6dsl: kconfig: Remove unused internal pull-up symbol
Added in commit 180b139786 ("drivers: sensor: lsm6dsl: Adding sensorhub
support"), then never used.

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-21 08:20:59 -05:00
Ulf Magnusson
4310babed8 drivers: sensor: lis2mdl: kconfig: Remove unused fixed ODR symbols
After commit 44f373e806 ("driver/sensor: lis2mdl: make use of STdC
definitions"), the code only looks at LIS2MDL_MAG_ODR_RUNTIME, and not
at the LIS2MDL_MAG_ODR_<frequency> symbols.

LIS2MDL_MAG_ODR_RUNTIME is now a yes/no thing in practice, so remove the
choice and turn it into a regular bool symbol.

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-21 08:20:23 -05:00
Ulf Magnusson
38866eb3f1 drivers: spi_nor: Remove unused SPI_NOR_{PAGE,SECTOR}_SIZE symbols
Unused since commit 2a590d3fa5 ("drivers/spi_nor: remove configurability
of page/sector/block sizes"). The help texts already say they're unused,
but it probably doesn't hurt to remove them as well.

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-21 08:17:50 -05:00
Ulf Magnusson
ca43e023bf drivers: adc: kconfig: Remove unused ADC_INIT_PRIORITY symbol
Unused after commit a8d0e5af07 ("adc: ti_adc108s102: Remove driver as
its bit-rotted").

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-21 08:17:05 -05:00
Ulf Magnusson
b222cf67f1 drivers: console: kconfig: Remove unused NATIVE_STDIN_PRIO symbol
Unused since commit 140a8d0c8a ("console: Remove deprecated function
console_register_line_input").

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-21 08:16:42 -05:00
Radoslaw Koppel
daff5e93f9 Test: Settings: Fix FCB delete test
This commit fixes the FCB delete test after PR #19541.
Now the entity callback is not called on deleted element.

Issue: #19963

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-10-21 08:51:57 -04:00
Johann Fischer
2011f73718 drivers: eth: initialize ethernet stack in enc424j600 and enc28j60
Initialize ethernet stack in drivers enc424j600 and enc28j60.

Fixes: #19398

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-10-21 14:01:52 +03:00
Vinayak Kariappa Chettimada
fcd9612016 Bluetooth: controller: split: Fix incorrect MD bit value
MD bit was set based on whether a memq link's next pointer
being NULL, instead the check should be that the  memq has
more elements.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-10-21 13:01:26 +02:00
Vinayak Kariappa Chettimada
8ada121b68 Bluetooth: controller: split: Fix slave latency enable
Fix regression in porting slave latency, slave latency
enabled was not used, cause slave latency to be applied
before first packet being acknowledged by the master.

Regression in commit 5dff214d57 ("Bluetooth: controller:
split: Fix missing slave latency impl.").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-10-21 10:21:30 +02:00
Jukka Rissanen
feb6cf56f4 tests: net: shell: Increase the main stack size
Stack size might be too small when running the test in real
board like sam-e70.

Fixes #19914

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-21 09:58:56 +03:00
Ulf Magnusson
616f9bd825 drivers: net: kconfig: Remove unused SLIP_MTU symbol
Added in commit 184e251fdb ("slip: Add driver for host to qemu
connectivity"), then moved to drivers/net/Kconfig in commit 0612651deb
("drivers: slip: Consolidate under drivers/net/"). Never used.

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-21 09:58:23 +03:00
Ulf Magnusson
f9d2added7 drivers: net: kconfig: Remove unused NET_PPP_MTU symbol
Added in commit aa46bac54c ("drivers: net: ppp: Driver for
point-to-point protocol"). Never used.

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-21 09:58:07 +03:00
Ulf Magnusson
af7aa3fd28 drivers: net: kconfig: Remove unused NET_PPP_CALC_FCS symbol
Added in commit aa46bac54c ("drivers: net: ppp: Driver for
point-to-point protocol"). Never used.

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-21 09:57:47 +03:00
Ulf Magnusson
7e8cb3c591 drivers: console: kconfig: Remove unused IPM_CONSOLE_INIT_PRIORITY sym
Unused after commit 578ae40761 ("boards: remove quarl_se_c1000").

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-20 08:43:59 -05:00
Andrew Boie
f82beb984d x86: remove unused thread arch member
The PDPT was moved to the stack area since it has alignment
requirements, but never removed from here.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-19 20:40:26 -07:00
Andy Ross
8bc3b6f673 arch/x86/intel64: Fix assumption with dummy threads
The intel64 switch implementation doesn't actually use a switch handle
per se, just the raw thread struct pointers which get stored into the
handle field.  This works fine for normally initialized threads, but
when switching out of a dummy thread at initialization, nothing has
initialized that field and the code was dumping registers into the
bottom of memory through the resulting NULL pointer.

Fix this by skipping the load of the field value and just using an
offset instead to get the struct address, which is actually slightly
faster anyway (a SUB immediate instruction vs. the load).

Actually for extra credit we could even move the switch_handle field
to the top of the thread struct and eliminate the instruction
entirely, though if we did that it's probably worth adding some
conditional code to make the switch_handle field disappear entirely.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-10-19 12:09:32 -07:00
Andrew Boie
beb81885c2 qemu_x86_long: don't munge to elf32 in-place
Instead, use the QEMU_KERNEL_FILE facility to perform the
change in a new file zephyr-qemu.elf. This is what will
be sent to the emulator.

Fixes an issue where opening zephyr.elf in GDB would treat
it as a 32-bit binary instead of what it actually is,
forcing the user to override the arch setting.

Fixes: #19734

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-19 12:08:00 -07:00
Ulf Magnusson
d5633bc395 boards: xtensa: kconfig: Remove unused XTENSA_XTSC_INC symbol
Unused since commit 0829ddfe9a ("kbuild: Removed KBuild").

This symbol is the only thing in boards/xtensa/xt-sim/Kconfig,
which gets included via

    osource "$(BOARD_DIR)/Kconfig"

in boards/Kconfig, so just remove the entire file.

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-18 17:51:53 -07:00
Ioannis Glaropoulos
684f5ec12e arch: arm: userspace: add ip and sp to clobber
We should be adding a compiler barrier for IP and SP
registers when we are doing syscall generation on
ARMv6-M architecture. The syscall generation itself
only does an SVC trigger; the execution returns to
thread mode and ARM does not guarantee that IP
register is preserved, when we finally get back to
the point where the syscall was invoked. The SP
also needs to be preserved for syscalls returning
64-bit results. In that case the r0 may hold a
pointer to the stack where the 64-bit result was
pushed, That is, the stack pointer may have been
changed due to the syscall, and C code needs to
know that.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-18 14:20:32 -05:00
Stephanos Ioannidis
5eb71b45b4 soc: arm: Clean up HAS_CMSIS_CORE usage.
For nordic_nrf, this commit relocates HAS_CMSIS_CORE selection from
SoC Kconfig to the HAL module Kconfig, as done for other SoCs.

For nxp_kinetis, remove redundant HAS_CMSIS_CORE selection in SoC
Kconfig, as it is already selected by the HAL Kconfig.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-18 14:01:07 -05:00
Stephanos Ioannidis
5dadcff946 ext: hal: cmsis: Fix version information in README.
This commit fixes the incorrect CMSIS version information in the
README file.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-18 14:01:07 -05:00
Stephanos Ioannidis
bb14d8c5e5 ext: hal: cmsis: Update references to HAS_CMSIS to HAS_CMSIS_CORE.
This commit updates all references to HAS_CMSIS to use HAS_CMSIS_CORE
instead. With the changes introduced to allow multiple CMSIS variants
to be specified, the latter is semantically equivalent to the former.

For more details, see issue #19717.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-18 14:01:07 -05:00
Stephanos Ioannidis
ad05b79a89 ext: hal: cmsis: Add HAS_CMSIS_CORE configuration.
The existing implementation used HAS_CMSIS configuration to specify
that CMSIS-Core(M) is used; when, in fact, there are other CMSIS
variants available such as CMSIS-Core(A) and CMSIS-DSP available.

This commit replaces the existing HAS_CMSIS configuration with
HAS_CMSIS_CORE to clarify that CMSIS-Core is used. It also introduces
the CMSIS-Core variant configuration, HAS_CMSIS_CORE_M, that is
automatically selected when HAS_CMSIS_CORE is enabled.

For more details, see issue #19717.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-18 14:01:07 -05:00
Stephanos Ioannidis
ee9e0ac580 ext: hal: cmsis: Relocate CMSIS-Core(M) files to its own directory.
This commit relocates the CMSIS-Core(M) Include directory that
currently resides directly under ext/hal/cmsis directory to its own
directory, Core, in order to allow other CMSIS variants to be added.

The name of CMSIS-Core(M) directory, Core, is following the original
name used by the upstream CMSIS repository.

For more details, see issue #19717.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-18 14:01:07 -05:00
Ulf Magnusson
e3b84137f3 disk: kconfig: Remove unused DISK_ACCESS_MAX_VOLUMES symbol
Added in commit 2b5b7da9f3 ("subsys: disk: Add support for multiple disk
interfaces"), then never used.

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-18 13:58:34 -05:00
Ulf Magnusson
91dc62949e Bluetooth: Settings: Fix broken CONFIG_BT_SETTINGS_USE_PRINTK check
The CONFIG_* prefix was missing, making the #ifdef always false.

Found with a script (CONFIG_BT_SETTINGS_USE_PRINTK was unused).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-18 21:52:03 +03:00
Joakim Andersson
d0481f6d7f Bluetooth: GATT: Fix gatt buffer leak for write commands and notify
Fix GATT buffer leak when bt_att_send returns error the allocated
buffer is never freed. Discovered case where the link was disconnected
during the function call, so when GATT checkd the link was still
connected, but ATT checkd the link was disconnected.

Fixes: #19889

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-10-18 21:22:18 +03:00
Ulf Magnusson
72fb847a25 bluetooth: kconfig: Remove unused BT_CTLR_LOWEST_PRIO symbol
Added in commit 1475402d41 ("Bluetooth: controller: Introduce ULL LLL
architecture"), then never used.

Found with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-18 19:43:47 +02:00
Manivannan Sadhasivam
56ed28e60f boards: arm: 96b_wistrio: Fix the SoC used on this board
The RAK811 module used on this board incorporates STM32L151CB-A SoC,
which has more RAM (32 KiB) compared to its companion STM32L151CB.
Hence, fix the doc, dts and Kconfig to include correct part number.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-10-18 10:40:45 -05:00
Manivannan Sadhasivam
bf949409b8 soc: arm: stm32: Add support for STM32L151XB-A SoC
STM32L151XB-A SoC is almost similar to the STM32L151XB SoC except that
it has more RAM (32KiB). Hence add devicetree and Kconfig support.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-10-18 10:40:45 -05:00
Manivannan Sadhasivam
a2760b7b92 boards: arm: 96b_wistrio: Enable on-chip RTC driver
Enable on-chip RTC driver for 96Boards Wistrio board.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-10-18 10:40:45 -05:00
Manivannan Sadhasivam
4f79e31566 soc: arm: st_stm32: stm32l1: Add RTC/Counter support
Add RTC/Counter support for STM32L1 SoCs.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-10-18 10:40:45 -05:00
Manivannan Sadhasivam
8f7441b58d boards: arm: 96b_wistrio: Enable SPI1
Enable SPI1 available on the expansion header of 96Boards
Wistrio board.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-10-18 10:40:45 -05:00
Ioannis Glaropoulos
cfe1b1de1a arch: arm: userspace: adapt assembly code for Cortex-M Baseline
In this commit we implement the assembly functions in userspace.S
- z_arm_userspace_enter()
- z_arm_do_syscall()
- z_arch_user_string_nlen()
for ARMv6-M and ARMv8-M Baseline architecture. We "inline" the
implementation for Baseline, along with the Mainline (ARMv7-M)
implementation, i.e. we rework only what is required to build
for Baseline Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-18 08:46:03 -05:00
Ioannis Glaropoulos
2d6bb624d6 arch: arm: swap_helper: adapt assembly code for Cortex-M Baseline
In this commit we implement the assembly functions in
swap_helper.S, namely
  - z_arm_pendsv()
  - z_arm_svc()
for ARMv6-M and ARMv8-M Baseline architecture. We "inline" the
implementation for Baseline, along with the Mainline (ARMv7-M)
implementation, i.e. we rework only what is required to build
for Baseline Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-18 08:46:03 -05:00
Ioannis Glaropoulos
b689700326 arch: arm: no HW stack protection capabilities in Cortex-M Baseline
We do not support HW Stack protection capabilities in
Cortex-M Baseline CPUs (unless they have built-in stack
overflow detection capability). We adapt the Kconfig
option to reflect this.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-18 08:46:03 -05:00
Ioannis Glaropoulos
2a13f91597 arch: arm: update minimum MPU region alignment for ARMv6-M
ARMv6-M architecture has an MPU that requires minimum region
size of 256 bytes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-18 08:46:03 -05:00
Ioannis Glaropoulos
761bb8b1f3 soc: arm: stm32g071: remove kernel header inclusions in soc.h
Remove the inclusion of kernel_includes.h from soc.h and replace
it with including the board-specific auto-generated headers. This
aligns the soc.h header with the current policy not to include
kernel headers in soc.h.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-18 08:46:03 -05:00
Ioannis Glaropoulos
0f7fe2406c boards: arm: nucleo_g071rb: enable ARM MPU
We enable Memory Protection on stm32 nucleo_g071rb board,
since the respective SoC series implements the ARM MPU.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-18 08:46:03 -05:00
Pavlo Hamov
3674d3343f drivers: hci: stm32_ipm: disable proper LSI
LSI1 is used for RTC, LTC2 for RF.
Disable LSI2 instead of LSI1 on BLE with LSE start

Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
2019-10-18 08:24:42 -05:00
Pavlo Hamov
535bfeb784 drivers: hci: stm32_ipm: Add possibility to work on LSI
Use CLOCK_STM32_LSE as switch for the RF low speed clock source

Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
2019-10-18 08:24:42 -05:00
Carlo Caione
1c4626d324 kconfig: uart_pl011: Do not limit PL011 driver to ARM family
The driver is not specific to 32bit ARM family. For example it is
currently used by the QEMU ARM64 virt machine.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-10-18 08:11:48 -05:00
Carlo Caione
6148b5bd9e drivers: uart_pl011: Fix unused variable warning
Fix GCC complain when CONFIG_UART_INTERRUPT_DRIVEN=n

  warning: unused variable ‘config’ [-Wunused-variable]

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-10-18 08:11:48 -05:00
Flavio Ceolin
063ab90dd8 sanitycheck: Making child thread exits when main thread dies
Set threads spawned by BinaryHandler dameon, so when the main thread
exits for some unusual reason (e.g SIGINT) the child threads are
automatically killed.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-10-18 08:09:09 -05:00
Peter Bigot
fff0cfc32d tests/drivers/build_all: add FLAG definition for all gpios
Work in topic-gpio to convert drivers to properly use devicetree flag
settings requires that these be defined so sanitycheck can find them.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-18 08:07:00 -05:00
Ulf Magnusson
f065eb4271 kconfig: Fix wrong partition size by changing type of FLASH_LOAD_SIZE
FLASH_LOAD_SIZE gets its default from the $(dt_chosen_reg_size)
function, which is defined in scripts/kconfig/kconfigfunctions.py.
$(dt_chosen_reg_size) returns a decimal value rather than a hex value.

Previously, FLASH_LOAD_SIZE was declared as hex, which made Kconfiglib
automatically prepend 0x to its value (the same logic is in the C
Kconfig tools). This gave an incorrect size in .config, e.g.
CONFIG_FLASH_LOAD_SIZE=0x374784 where CONFIG_FLASH_LOAD_SIZE=374784 was
intended.

Fix it by changing the type of FLASH_LOAD_SIZE to int. All other symbols
that use $(dt_node_reg_size) and $(dt_chosen_reg_size) are int too
(FLASH_SIZE and SRAM_SIZE, plus BOOTLOADER_SRAM_SIZE is also int).

This has some subtle breakage potential in that FLASH_LOAD_SIZE has a
prompt (is user-configurable in the menuconfig or by changing .config
files). Nothing seems to directly assign in Zephyr at least.

Fixes: #19877

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-18 08:05:39 -05:00
Ulf Magnusson
cfd3d4b935 kconfig: Remove long-unused LINK_WHOLE_ARCHIVE symbol
Seems to have been unused since commit 06e78de681 ("build: do not use
link-zephyr"), committed in 2015.

Discovered with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-18 08:03:48 -05:00