Commit graph

19400 commits

Author SHA1 Message Date
Michael Hope 250588ee63 hid: change the API table to const.
A minor change to put the API function table into flash.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-03-12 21:34:16 +01:00
Ruslan Mstoi 8109bdf8c1 net: ipv6: Drop RA with MTU out of valid range
This commit fixes incorrect Ethernet frame check sequence and ICMPv6
checksum caused by MTU set to zero in RA

Fixes #6342

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2018-03-12 17:26:41 +02:00
Ioannis Glaropoulos c028f88b37 arch: arm: remove redundant asm inline headers
This commit removes the unnecessary asm inline header for ARM.
It also adapts the stack.h and exc.h to use the ARM CMSIS inline
functions to access the IPSR and MSP registers.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-03-12 10:14:12 -05:00
Henrik Brix Andersen 34a38816f6 boards: adafruit_feather_m0_basic_proto: Add USB device support.
USB device support was tested with the cdc_acm sample.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-03-12 10:13:24 -05:00
Ilya Tagunov 0f3286f932 boards: arm: enable CLOCK_STM32_HSE_BYPASS in Nucleo F0/F3 defconfigs
Nucleo-64 boards do not have X3 crystal by default, so HSE is clocked
from MCO output of ST-LINK, and CONFIG_CLOCK_STM32_HSE_BYPASS should be
enabled. STM32F0 HSE somehow magically works even without that, but
to do so is the right thing.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2018-03-12 10:12:21 -05:00
Maureen Helm 66d6b58176 scripts: extract_dts_includes: Fix path handling in Windows
When building in Windows, extract_dts_includes.py failed with an
exception on boards that have dts sensor bindings. This was caused by
path handling to search for i2c-device.yaml that worked in Linux, but
not in Windows.

Affected boards were disco_l475_iot1, frdm_k64f, frdm_kw41z, and
hexiwear_k64.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-03-12 09:44:36 -05:00
Savinay Dharmappa 8d7da51827 drivers: usb: device: code cleanup
include clk.h only for system that use QMSI.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-03-12 09:02:03 -04:00
Ioannis Glaropoulos 10b40ecaba arch: arm: conditionally select FP extension in cortex-m MCUs
This commit conditionally selects the ARMV7_M_ARMV8_M_FP option
in ARMv7-M/ARMv8-M Mainline processors, when the Floating Point
Extension is implemented (CPU_HAS_FPU is selected).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-03-11 21:53:50 -05:00
Kumar Gala 3b78d937e5 usb: ateml: samd21: enable usb controller in board dts not soc
Since not all boards enable all devices, we typically have the SoC dtsi
file have a device marked with status = "disabled" and have the
board.dts explicitly enable with status = "ok".  Update it so USB on
Atmel SAMD21 work this way.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-11 21:53:20 -05:00
Anas Nashif a706a68741 doc: add test coverage and proposal policy
Provide some details about submitting proposals and document that new
major features require tests to be added.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-11 05:11:58 -04:00
Michael Hope dc37f985e9 crc: make crc8_ccitt() match the other CRC functions.
This is a minor change that makes the data pointer const and shifts
the length to a size_t to match the other CRC functions.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-03-10 21:49:07 -05:00
Ramakrishna Pallala d3a6d933f6 tests: subsys: fs: Add test for multiple file systems
Add a new test for testing multiple file systems mounted
simultaneously on Zephyr. The test enables FATFS and NFFS
togeather and uses RAM as backend storage device.

The intention of this test is to demonstrate multiple file systems
support and perform basic file and directory operations. This test
heavily reused the existing fat_fs_api and nffs_fs_api test sources.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-03-10 21:38:04 -05:00
Ramakrishna Pallala 3e83a52781 subsys: fs: Kconfig changes to enable multiple file systems
Kconfig changes to enable or select multiple file systems.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-03-10 21:38:04 -05:00
Ramakrishna Pallala 3228e70bbf tests: subsys: fs: Adapt nffs_fs_api test as per VFS changes
Adapt nffs_fs_api test as per the VFS layer changes.

Add new test for NFFS file system mount.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-03-10 21:38:04 -05:00
Ramakrishna Pallala eb30e80bed tests: subsys: fs: Adapt fat_fs_api test as per VFS changes
Adapt fat_fs_api test as per the VFS layer changes.

Add new test for FatFs file system mount.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-03-10 21:38:04 -05:00
Ramakrishna Pallala 25302b1980 subsys: fs: Add Virtual File system Switch (VFS) support
Add support for Virtual File system Switch (VFS) by
introducing mount point concept to Zephyr. This allows
the applications to mount multiple file systems at
different mount points (ex: "/fatfs" and "/nffs"). The
mount point structure contains all the necessary info
required to instantiate, mount and operate on file system.

Decouple applications from directly accessing individual
file systems API's or internal functions by introducing
file system registration mechanism in VFS.

Move the file system defination and mount responsibility
to application so that application can decide which file system
to use and where to mount.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-03-10 21:38:04 -05:00
Ramakrishna Pallala 9792951570 subsys: fs: Kconfig: Add log level support for fs subsystem
Add SYS_LOG_FS_LEVEL Kconfig option for file system subsystem.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-03-10 21:38:04 -05:00
Rajavardhan Gundi a06cc42d29 tests: kernel: timers: Added a test to check periodicity
Added a test to check for the predictability with which
the timer expires depending on the period configured.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-03-10 21:32:02 -05:00
Punit Vara 9edc7ce490 tests: semaphore: test APIs
Test sem_destroy and sem_trywait.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-03-10 21:30:14 -05:00
Henrik Brix Andersen b31ccd1261 tests: spi_loopback: Fix Arduino Zero SPI device name.
The SAM0 SoC was switched to use DTS for SPI configuration. Adapt the
spi_loopback test configuration for the Arduino Zero to use the
correct device name.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-03-10 17:03:33 -06:00
Ioannis Glaropoulos b75b01050d arch: arm: Stack Overflow Usage Fault log for ARMv8-M Mainline
This commit contributes the Stack Overflow UsageFault dumping
for ARMv8-M implementations that support the Main Extension.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-03-10 16:10:07 -06:00
Ioannis Glaropoulos cfab6e0806 arch: arm: define ARMv8-M Mainline K-option
This commit introduces the ARMV8_M_MAINLINE K-config option. The
option signifies the use of an ARMv8-M CPU supporting the Main
Extension. ARMv8-M Main Extension includes additional features
that are  not present in the ARMv7-M architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-03-10 16:10:07 -06:00
Ioannis Glaropoulos d2e0d975f6 arch: arm: ARMv7-M/ARMv8-M Mainline dependency for programmable prios
This commit forces CPU_CORTEX_M_HAS_PROGRAMMABLE_FAULT_PRIOS to
depend on ARMV7_M_ARMV8_M_MAINLINE. This allows the user to get
a build warning if he manually selects
CPU_CORTEX_M_HAS_PROGRAMMABLE_FAULT_PRIOS for a CPU that does
not implement either ARMv7-M or ARMv8-M Mainline.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-03-10 16:10:07 -06:00
Kumar Gala 97331d1e98 arch: arm: mps2: Remove soc_irq.h
Move IRQ numbers into device tree so we can remove soc_irq.h.  We are
already using IRQ defines generated form the DTS so no point in having
soc_irq.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
Kumar Gala fa0e8fd06d arch: arm: mps2: remove soc_memory_map.h
Further simplify the mps2 SoC code by removing soc_memory_map.h which
now only contains one define for the FPGAIO_BASE_ADDR.  We can just move
this to the once place its used.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
Kumar Gala 40b7be5197 drivers: i2c: Add DTS support to ARM SBCon I2C controller
Added device tree support to the ARM SBCon I2C controller.  We utilize
the compatiable "arm,versatile-i2c" the binding from Linux for the some
peripheral block.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
Kumar Gala 51db7b142c arch: arm: mps2: Remove unused defines and structs
Simplify the mps2 SoC code by removing defines and structs that aren't
used anywhere currently.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
Kumar Gala ad18f84f50 arch: arm: Refactor CONFIG_CORTEX_M
Clean up Kconfig so each SoC just selects the specific Cortex-M
implementaiton rather than having to select both CORTEX_M and
CORTEX_{M0, M3, M4, etc.}.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
Henrik Brix Andersen 679f401fa0 boards: adafruit_feather_m0_basic_proto: Disable legacy SPI API.
The legacy SPI API was turned back on for the Adafruit Feather M0
Basic Proto when the SAM0 SoC was switched to using DTS for SPI. This
commit turns it back off.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-03-10 11:42:25 -06:00
Justin Watson aa7c91d0c2 driver: usart: Added support for interrupt driver USART on SAM E70.
Added interrupt support in the USART SAM serial driver.

Signed-off-by: Justin Watson <jwatson5@gmail.com>
2018-03-10 11:42:25 -06:00
Ioannis Glaropoulos 3b2f4b399d arch: arm: add missing floating-point fault logging
This commit adds the missing fault dumping for MemManage or Bus
fault occuring during floating-point lazy state preservation. In
addition, it introduces a Kconfig option for the ARMv7-M/ARMv8-M
Floating Point Extension.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-03-10 11:42:25 -06:00
Justin Watson b9c65e1882 drivers: GPIO Added GPIO for SAM family.
Added GPIO driver for SAM family of SoCs.

Signed-off-by: Justin Watson <jwatson5@gmail.com>
2018-03-10 11:42:25 -06:00
Ioannis Glaropoulos bd0ff3092a arch: arm: cmsis: cleanup cmsis.h and update error-code macros
This commit removes the macros for ARM fault flags from
include/arch/arm/cortex_m/cmsis.h header, since they are
defined in the respective core_cmXX.h header files. It also
modifies fault.c to use the updated fault macros taken directly
from ARM CMSIS headers.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-03-10 11:42:25 -06:00
Philémon Jaermann 74db6bfa73 boards: arm: Add nucleo-f446re board
Add nucleo-f446re board support and documentation

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2018-03-10 11:42:25 -06:00
Philémon Jaermann 8834a8d47b arm: stm32f446: Add support for stm32f446 SoC
Support for stm32f446xe SoC

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2018-03-10 11:42:25 -06:00
Endre Karlson cc1a0f72de boards: arm: Add Dragino LSN50 LoRA node
Add dts, kconfig and other necessary code for LSN50 board from Dragino
to work with Zephyr.

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2018-03-10 11:42:25 -06:00
Endre Karlson baae89f27b driver: pinmux: Add pinmux driver for stm32l0x
Add driver header files for the stm32l0x pinmux

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2018-03-10 11:42:25 -06:00
Endre Karlson 8e401e505e driver: interrupt_controller: Add support for stm32l0x
Add kconfig and c code for stm32l0x interrupt controller driver

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2018-03-10 11:42:25 -06:00
Endre Karlson ef1d32b8ef drivers: gpio: Provide GPIO driver for stm32l0x
Add necessary GPIO defines for the stm32l0x series soc

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2018-03-10 11:42:25 -06:00
Endre Karlson e99a79a9b1 drivers: clock_control: Provide support for stm32l0x
Add Clock Control support for the stm32l0x based on reference manuals

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2018-03-10 11:42:25 -06:00
Endre Karlson bbb4b402b2 dts: arm: provider support for the stm32l0
Add necessary DTS files for stm32l0x and stm32l0x72

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2018-03-10 11:42:25 -06:00
Endre Karlson deeb74651b arm: stm32l0: Add support for stm32l0 soc
Add necessary kconfig and minimal device tree support for
the stm32l072xz variants.

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2018-03-10 11:42:25 -06:00
Endre Karlson 3c789e6ae7 hal: stm32l0x: Add HAL for the STM32L0x series
This adds the HAL code needed for the SoC in a later patch for
the stm32l0 series.

Origin: ST Microelectronics
License: BSD-3-Clause
URL: http://www.st.com/en/embedded-software/stm32cubel0.html
Commit: 1.10.0
Purpose: HAL layer for stm32l0
Maintained-by: External

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2018-03-10 11:42:25 -06:00
Armando Visconti 2bf1fe2035 boards: arm: Add support for 96Boards Argonkey Board
ArgonKey board is a 96boards sensor hub platform for all 96Boards
compliant family products. The ArgonKey packs a Cortex-M4 chip
together with a set of motion, environmental and ambiental sensors
and can be used as a development platform for many different
applications.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-03-10 11:42:25 -06:00
Armando Visconti 12b5ef0e06 drivers: pinmux: stm32f4: Added configuration macro for I2C2 on PB9
Added configuration macro for I2C2 multiplexing on PB9.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-03-10 11:42:25 -06:00
Yannis Damigos efbb7c61a1 arch/arm/soc/stm32f4: Add STM32F412CG MCU support
Add STM32F412CG MCU support.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-03-10 11:42:25 -06:00
Michael Hope a8a36a23fc spi: sam0: use Device Tree for configuration.
Switch the SoC device tree to define a single entry per SERCOM instead
of one per mode.

Define a Device Tree binding for the SAM0 SPI and use it instead of
Kconfig for enabling / disabaling instances

Switch the Arduino Zero, Adafruit Feather M0 Basic Proto, and
Trinket M0 to use the new defintion.

Add the APA102 LED that's on the Trinket as a test.

Signed-off-by: Michael Hope <mlhx@google.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
Michael Hope c83f0782b6 gpio: sam0: add pull up/pull down support.
Also trim back the headers.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-03-10 11:42:25 -06:00
Michael Hope f7c1903418 tests: gpio: add a configuration for the Arduino Zero.
Allows testing the new interrupt support.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-03-10 11:42:25 -06:00
Justin Watson ff7fd44a57 boards: sam4s_xplained: Changed the sample to use USB on debug port
Changed the default UART used for the console. You used to have to
use wires on the J4 header. Now you can use the UART provided by the
Segger USB composite device.

Signed-off-by: Justin Watson <jwatson5@gmail.com>
2018-03-10 11:42:25 -06:00