Commit Graph

360 Commits

Author SHA1 Message Date
Diego Sueiro 05c3c1ec11 ext: Silabs Gecko use a different config for uart
Use CONFIG_UART_GECKO instead of CONFIG_SERIAL_HAS_DRIVER to compile
the low level uart driver.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-10-16 15:59:37 -05:00
Andy Ross 317178b88f sys_clock: Fix unsafe tick count usage
The system tick count is a 64 bit quantity that gets updated from
interrupt context, meaning that it's dangerously non-atomic and has to
be locked.  The core kernel clock code did this right.

But the value was also exposed to the rest of the universe as a global
variable, and virtually nothing else was doing this correctly.  Even
in the timer ISRs themselves, the interrupts may be themselves
preempted (most of our architectures support nested interrupts) by
code that wants to set timeouts and inspect system uptime.

Define a z_tick_{get,set}() API, eliminate the old variable, and make
sure everyone uses the right mechanism.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-10-16 15:03:10 -04:00
Savinay Dharmappa ea07658a4f drivers: wdt: Migrate qmsi wdt driver api to new wdt api interface.
patch migrates the wdt qmsi driver to new wdt interfaces.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-10-14 14:16:03 -04:00
Paweł Zadrożniak 0a3f6f0a58 ext: hal: nordic: Add kconfig / CMakeLists entries for nrfx_usbd
Adds entries for USBD driver (nrfx_usbd) for kconfig / CMake.
Updates nrf52840 configuration header to enable USBD.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2018-10-12 13:14:12 +02:00
Paul Sokolovsky a0c0b2b43e ext: hal: altera: Don't depend on NEWLIB_LIBC
Contrary to what was written in its Kconfig, hal/altera depends not
on Newlib, but on a baseline POSIXish define like O_NONBLOCK. Minimal
libc now provides them, so there're no issues with building Altera
for either minimal on newlib libc.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-10-10 13:31:00 -04:00
Marcio Montenegro f0ee23885a ext: gecko: Remove arm_math stuff from efm32hg*.h
Header include "arm_math.h" causes duplicate symbol error on build.

Signed-off-by: Marcio Montenegro <mtuxpe@gmail.com>
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-10-10 12:00:06 -05:00
Marcio Montenegro 6bdfc98ea9 ext: Integrate Silabs EFM32HG into Gecko SDK into Zephyr
This patch integrates EFM32HG support into the build
infrastructure of Zephyr.

Signed-off-by: Marcio Montenegro <mtuxpe@gmail.com>
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-10-10 12:00:06 -05:00
Marcio Montenegro 5faeb27e17 ext: gecko: Add Silabs Gecko SDK for EFM32 Happy Gecko SoCs
This includes:
* the Gecko SDK files for the EFM32HG SoCs

Origin: Silicon Labs Gecko SDK
URL: https://github.com/SiliconLabs/Gecko_SDK
Version: v5.1.2 (SHA: 938464c68e6c3b2237388a692f767bb0767ec010)
Purpose: Add support for Silicon Labs EFM32 Happy Gecko SoCs
License: Zlib
Maintained-by: External

To update the Gecko SDK, download the current version from the given URL
and replace the following folders:
* Gecko_SDK/platform/Device/ should replace ext/hal/silabs/gecko/Device/

Signed-off-by: Marcio Montenegro <mtuxpe@gmail.com>
2018-10-10 12:00:06 -05:00
Erwan Gouriou b1798721cc ext/hal/st: stm32f3: Disable new API and enable Legacy
A new CAN API is now provided in stm32cube packages.
STM32 can driver is implemented on top of initial CAN API which
is now legacy API.
Disable new API and enable legacy.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-09 12:03:17 -04:00
Erwan Gouriou 5d362411c7 ext/hal/st: update stm32f7 stm32cube package from v1.11.0 to v1.12.0
Update STM32F7 series stm32cube package from V1.11.0 to V1.12.0.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-09 12:03:17 -04:00
Erwan Gouriou aa1cd0cfc2 ext/hal/st: update stm32f3 stm32cube package from v1.9.0 to v1.10.0
Update STM32F3 series stm32cube package from V1.9.0 to V1.10.0.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-09 12:03:17 -04:00
Erwan Gouriou 3a84551f5f ext/hal/st: stm32l4: dos2unix and remove trailing white spaces
Format all cube packages to the same format before update to new
versions:
-Apply dos2unix
-Remove trailing white spaces

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-09 12:03:17 -04:00
Erwan Gouriou 1661e00334 ext/hal/st: stm32l0: dos2unix and remove trailing white spaces
Format all cube packages to the same format before update to new
versions:
-Apply dos2unix
-Remove trailing white spaces

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-09 12:03:17 -04:00
Erwan Gouriou db2307fb92 ext/hal/st: stm32f4: dos2unix and remove trailing white spaces
Format all cube packages to the same format before update to new
versions:
-Apply dos2unix
-Remove trailing white spaces

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-09 12:03:17 -04:00
Erwan Gouriou a429104095 ext/hal/st: stm32f2: dos2unix and remove trailing white spaces
Format all cube packages to the same format before update to new
versions:
-Apply dos2unix
-Remove trailing white spaces

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-09 12:03:17 -04:00
Erwan Gouriou 027aac6869 ext/hal/st: stm32f0: dos2unix and remove trailing white spaces
Format all cube packages to the same format before update to new
versions:
-Apply dos2unix
-Remove trailing white spaces

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-09 12:03:17 -04:00
Kamil Piszczek add09c72ee ext: hal: nrfx: adding nfct driver to Kconfig
Added configuration option for NFCT driver to Kconfig.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2018-10-02 14:05:27 -07:00
Kamil Piszczek 21bfea667e ext: hal: nrfx: adding timer driver to Kconfig
Added configuration option for TIMER driver to Kconfig.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2018-10-02 14:05:27 -07:00
Kamil Piszczek 307a84771a ext: hal: nrfx: adding clock driver to Kconfig
Added configuration option for CLOCK driver to Kconfig.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2018-10-02 14:05:27 -07:00
Andrzej Głąbek b45fcc6b9e ext: hal: nordic: Update nrfx to version 1.3.1
Updates nrfx to the recently released version that corrects a few
imperfections in NFCT and USBD drivers.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.3.1
commit: d4ebe15f58de1442e3eed93b40d13930e7785903
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-09-28 09:22:04 -05:00
Mark Ruvald Pedersen 6a3552433a ext: libmetal: Update import of libmetal from b4b5bea to a4f7630
Pull in a more recent version of libmetal, motivated by the void
pointer fixes in efc33fe.

libmetal's b4b5bea to a4f7630 spans:

a4f7630 linux: device: fix max chars to copy for the dev name
10a0d5b lib: system: freertos: mutex: change to use atomic_int ...
4e670c5 ci: Zephyr env var for toolchain
3bef6f0 cmake: Fix Zephyr library integration
13158c3 compiler: add IAR compiler file
0820a2e microblaze: suppress io 64-bit R/W access if 64 bit atomic ...
e2e5608 io: suppress io 64 bit R/W access if 64 bit atomic not ...
efc33fe io: fix compilation error for void pointers.
32ad1d2 cache: fix compilation issue
c1ade0d travis CI: update Zephyr SDK version to 0.9.3
c49d7cd travis CI: updated arm compiler ubuntu package
d279a6a travis ci: Update FreeRTOS download path
5c70105 irq: update sys_irq_restore_enable and sys_irq_save_disable
05f0cd4 cmake: Only look for doxygen package if docs enabled
b4b5bea zephyr: Introduce WITH_ZEPHYR_LIB option

At current time of writing, libmetal's HEAD is 5bc2106641.
However this failed to build in their Travis CI.
The latest passing commit is a4f7630.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2018-09-28 07:57:28 +05:30
Ryan QIAN a4633da9f5 ext: hal: nxp: mcux: Add device files for RT1060
Add mcux 2.4.0 drivers and device header files for mimxrt1061 and
mimxrt1060. Updates several drivers that were already imported for
other SoCs but also apply to mimxrt1061 and mimxrt1062.

Origins: NXP MCUxpresso SDK 2.4.0
URL: mcuxpresso.nxp.com
Maintained-by: External

Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
2018-09-26 18:14:22 -05:00
Andrzej Głąbek c632d25a9f ext: hal: nrfx: Update README after upgrading to version 1.3.0
This complements the commit 836cb5b76a.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-09-24 06:53:26 -05:00
Bryan O'Donoghue 343c48f7d0 arch: atmel_sam0: sam21j18a: Convert _U to __U to fix compile warning
Fix compilation of sam0 serial driver on sam21dj18a by converting _U()
to __U() and _L() to __L() in sam21dj18a.h.

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
2018-09-21 17:52:32 -07:00
Kumar Gala 4d6b662149 ext: hal: cypress: Protect floating point code with CONFIG_FLOAT
There is a little bit of floating point code in cy_sysclk.c.  For now
add compile protection for this code using CONFIG_FLOAT.  This code
utilizes some libm functions like ceil().  So if / when the functions
Cy_SysClk_EcoConfigure & Cy_SysClk_FllConfigure are needed we'll also
new to probably pull in newlib.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-21 18:50:59 -04:00
Nazar Chornenkyy 2aa3815a09 ext: hal: cypress: Integrate Cypress PDL into Zephyr Build system
Add initial support for building Cypress PDL as part of Zephyr.

Signed-off-by: Nazar Chornenkyy <nazar.chornenkyy@cypress.com>
Signed-off-by: Oleg Kapshii <oleg.kapshii@cypress.com>
2018-09-21 18:50:59 -04:00
Nazar Chornenkyy 650852703e ext: hal: cypress: Import Cypress PDL for PSoC6 SoC Support
This includes:
* the Cypress Peripheral Driver Library (PDL) For PSoC6 SoC.

Origin: Cypress PDL for PSoC6
URL: https://github.com/cypress/pdl
Version: 3.1.0 (SHA: 2af49fe057320981c11117462a0962d956fc3056)
Purpose: Add support for Cypress PSoC SoC
License: Apache
Maintained-by: External

Signed-off-by: Oleg Kapshii <oleg.kapshii@cypress.com>
Signed-off-by: Nazar Chornenkyy <nazar.chornenkyy@cypress.com>
2018-09-21 18:50:59 -04:00
Andrzej Głąbek 11716e4664 ext: hal: nordic: Update nrfx adaptation layer
Adds new entries needed by nrfx in version 1.3.0 so that it is
properly adapted for being used in Zephyr.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-09-21 09:12:14 -07:00
Andrzej Głąbek 836cb5b76a ext: hal: nordic: Update nrfx to version 1.3.0
Updates nrfx to the recently released version containing new drivers
for NFCT and USBD peripherals and enhanced SAADC HAL.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.3.0
commit: 67710e47c7313cc56a15748e485079831ee6a3af
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-09-21 09:12:14 -07:00
Maureen Helm 45d3d8e441 spi: Introduce mcux lpspi shim driver
Introduces a new mcux lpspi shim driver to be used on the imxrt soc.
This shim driver leverages heavily from the mcux dspi shim driver
because the MCUXpresso SDK provides similar APIs for the lpspi and dspi
peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-19 09:15:29 -04:00
Andrzej Głąbek 1a8ac641d7 ext: hal: nordic: Update nrfx to version 1.2.0
Updates nrfx to the recently released version containing needed
enhancements of GPIOTE and PPI HALs.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.2.0
commit: d19018ed334c26f0d9eb35cf7f5a622df8d54346
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-09-11 12:55:07 -04:00
Andrzej Głąbek aad21ecb31 drivers: adc: Add shims for nrfx ADC and SAADC drivers
This commit adds translation layers to make nrfx drivers for the nRF
ADC (nRF51 series) and SAADC (nRF52 series) peripherals accessible via
the Zephyr's API. The SAADC peripheral is accessed using nrfx HAL only
as it turns out that usage of the nrfx driver in this case would be
inconvenient and would unnecessarily complicate the shim.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-08-29 13:46:57 -04:00
Diego Sueiro 636d5451a0 ext/hal/nxp/imx: Add all UARTs clock frequency information
Adds support for retrieving all possible UARTs clock.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-08-21 18:54:41 -05:00
Anas Nashif ac47070d10 tests: qmsi: remove soc watch sample
Remove this feature specific to QMSI and available through samples only
to allow for migration to tracing hooks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-21 05:45:47 -07:00
Istvan Bisz 8bb0e7a504 hal: stm32f2x: usbotg_fs: fix VBUS sensing deactivation
The error is detected if USART1 TX configured to PA9 and RX to PA10.
The serial cable removal stops the USB communication.
In case of VBUS sensing deactivation, erroneously
both USB_OTG_GCCFG_VBUSBSEN and
USB_OTG_GCCFG_NOVBUSSENS are set in GCCFG.
Correct handling is:
 - VBUS sensing deactivation: set USB_OTG_GCCFG_NOVBUSSENS in GCCFG.
 - VBUS sensing activation:   set USB_OTG_GCCFG_VBUSBSEN in GCCFG.
ST Bug Tracker ID: 34714

Signed-off-by: Istvan Bisz <istvan.bisz@t-online.hu>
2018-08-15 08:22:41 -05:00
Ulf Magnusson 8cf8db3a73 Kconfig: Use a short, consistent style for prompts
Consistently use

    config FOO
            bool/int/hex/string "Prompt text"

instead of

    config FOO
            bool/int/hex/string
            prompt "Prompt text"

(...and a bunch of other variations that e.g. swapped the order of the
type and the 'prompt', or put other properties between them).

The shorthand is fully equivalent to using 'prompt'. It saves lines and
avoids tricking people into thinking there is some semantic difference.

Most of the grunt work was done by a modified version of
https://unix.stackexchange.com/questions/26284/
how-can-i-use-sed-to-replace-a-multi-line-string/26290#26290, but some
of the rarer variations had to be converted manually.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-15 04:10:10 -07:00
Erwan Gouriou ee29e60325 ext/hal: stm32cube: STM32L4: Enable legacy CAN API
A new CAN API has been delivered on recent L4 stm32cube.
This new API breaks current CAN driver. Disable the new API and
enable the legacy API.

Fixes #8931

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-08-13 18:46:20 -07:00
Erwan Gouriou 6409f9a944 ext/hal: stm32cube: STM32F7: Enable legacy CAN API
A new CAN API has been delivered on recent F7 stm32cube.
This new API breaks current CAN driver. Disable the new API and
enable the legacy API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-08-13 18:46:20 -07:00
Erwan Gouriou 57fda14f97 ext/hal: stm32cube: STM32F4: Enable legacy CAN API
A new CAN API has been delivered on recent F4 stm32cube.
This new API breaks current CAN driver. Disable the new API and
enable the legacy API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-08-13 18:46:20 -07:00
Tomasz Gorochowik ba8d83508a ext: hal: atmel: sam: Add README for Atmel SAM E70 HAL
This README is based on the commit that added the HAL:
 * b94d572a6 (Import Atmel SAM E70 header files from ASF library)

And documents all the patches that were applied so far:
 * 133306152 (Add missing header files symbols for Atmel SAM E70)
 * 9670dc582 (Remove unused and broken preprocesor macros)
 * e5e99d199 (Add missing interrupt number definitions)

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2018-07-27 20:29:15 +03:00
Tomasz Gorochowik 4dcfc8706d ext: Atmel ASF: Add missing interrupt number definitions
This commit adds missing interrupt definitions for SAM GMAC Priority
Queues.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2018-07-27 20:29:15 +03:00
Kumar Gala 5f92b3b740 ext: hal: cmsis: Remove headers from old CMSIS import
When we imported CMSIS_5 we forgot to remove some files from the older
version.

Fixes: #9019

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-20 08:59:13 -05:00
Jukka Rissanen 5d5d02b1ec ext: hal: nxp: mcux: Update README file
Add information about patches and changes done to MCUX HAL.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-18 07:37:41 -04:00
Jukka Rissanen 8e304696e4 ext: hal: nxp: mcux: Enable enhanced buffer desc mode if needed
If the mcux driver has PTP support, then enable
ENET_ENHANCEDBUFFERDESCRIPTOR_MODE in HAL.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-18 07:37:41 -04:00
Jukka Rissanen 7715019679 ext: hal: nxp: mcux: Fix PTP event packet type check
We need to use only four low order bits from first byte of PTP message
as that contains the message type value.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-18 07:37:41 -04:00
Julien Chevrier b7a68fbbe5 ext: hal: nxp: mcux: Fix ethernet timestamping driver
Fix timestamping in MCUX external library. The nanosecond part of the
frame timestamp wasn't saved.

Signed-off-by: Julien Chevrier <julien.chevrier@intel.com>
2018-07-18 07:37:41 -04:00
Kumar Gala 57fbc66882 ext: hal: altera: Add ifdef protection for __LINUX_ERRNO_EXTENSIONS__
__LINUX_ERRNO_EXTENSIONS__ gets defined in HAL/inc/sys/alt_errno.h,
however we also need to define this if we are building with newlib.  So
add a simple ifdef guard to only define __LINUX_ERRNO_EXTENSIONS__ if
its not defined already.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-16 11:32:42 -05:00
Maureen Helm 3161617840 ext: mcux: Add a script to import new versions of mcux
NXP periodically releases new versions of the MCUXpresso SDK (mcux).
Automate the process of importing mcux into zephyr with a python script.

Example usage:

$ import_mcux_sdk.py -f SDK_2.3.0_EVK-MIMXRT1050.tar.gz

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-13 11:32:55 -05:00
Sean Nyekjaer cee31be6ff ext: Import Atmel SAMD20 header files from ASF library
Atmel Software Framework (ASF) provides a set of low-level header
files that give access to different hardware peripherals of Atmel's
ICs.

Origin: Atmel SAMD20 Series Device Support (1.2.91)
License: Apache-2.0
URL: http://packs.download.atmel.com/Atmel.SAMD20_DFP.1.2.91.atpack
Purpose: Introduction of ASF for the SAM0 series.
Maintained-by: External

Signed-off-by: Sean Nyekjaer <sean@nyekjaer.dk>
2018-07-10 12:56:44 -05:00
Christian Taedcke 7689e9dc3e ext: Integrate Silabs EFR32FG1P Gecko SDK into Zephyr
This patch integrates EFR32FG1P support into the build
infrastructure of Zephyr.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-07-10 12:53:50 -05:00