Commit graph

65 commits

Author SHA1 Message Date
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
Adithya Baglody b0db28b512 drivers: Cmake: Add __ZEPHYR_SUPERVISOR__ macro for driver files.
Normally a syscall would check the current privilege level and then
decide to go to _impl_<syscall> directly or go through a
_handler_<syscall>.
__ZEPHYR_SUPERVISOR__ is a compiler optimization flag which will
make all the system calls from the driver files directly link
to the _impl_<syscall>. Thereby reducing the overhead of checking the
privileges.

In the previous implementation all the source files would be compiled
by zephyr_source() rule. This means that zephyr_* is a catchall CMake
library for source files that can be built purely with the include
paths, defines, and other compiler flags that all zephyr source
files uses. This states that adding one extra compiler flag for only
one complete directory would fail.
This limitation can be overcome by using zephyr_libray* APIs. This
creates a library for the required directories and it also supports
directory level properties.
Hence we use zephyr_library* to create a new library with
macro _ZEPHYR_SUPERVISOR_ for the optimization.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-05-15 17:48:18 +03:00
Andrzej Głąbek ecd081115a drivers: spi: Add shim for nrfx SPIS driver
This adds a translation layer to make the nrfx driver for the nRF SPIS
(SPI Slave with EasyDMA) peripheral accessible via the Zephyr's API.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-13 17:04:16 +02:00
Andrzej Głąbek 998c79d09b drivers: spi: Add shim for nrfx SPIM driver
This adds a translation layer to make the nrfx driver for the nRF SPIM
(SPI Master with EasyDMA) peripheral accessible via the Zephyr's API.
The shim is provided only for nRF52840 because of a hardware anomaly
present in nRF52832. See Anomaly 58 (SPIM: An additional byte is clocked
out when RXD.MAXCNT = 1) in Errata for this chip.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-12 14:19:53 -04:00
Tomasz Bursztyka 13dba12b9a drivers/spi: Remove legacy NRF5 master and slave drivers
As legacy SPI API is being removed.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Andrzej Głąbek 00397c65bc drivers: spi: Add shim for nrfx SPI driver
This adds a translation layer to make the nrfx driver for the legacy
(i.e. without EasyDMA) nRF SPI peripheral accessible via the updated
Zephyr's API of the SPI driver.
Configuration files are already prepared for adding support for SPIM
(Master with EasyDMA) and SPIS (Slave with EasyDMA) peripherals.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 09dd5e9b22 drivers/spi: Remove legacy API support from mcux dspi driver
Now that MCR20A supports the new API, legacy support from mcux dspi
driver can be safely removed.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Maureen Helm ef5152ab22 spi: Implement new spi api in the mcux dspi driver
Adds support for the new spi api to the mcux dspi shim driver. Does not
remove support for the legacy spi api since there are still consumers of
that api, particularly the mcr20a 802.15.4 driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 65f6c96736 drivers/spi: Switch Intel driver to new SPI API
Ditch any legacy API support altogether.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 0a43cac3bb drivers/spi: Removing QMSI driver as it does not support new API
Native DW driver is relevantly used instead.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 44d4de5105 drivers/spi: Remove legacy DesignWare SPI driver
Nothing requires this driver anymore.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Kumar Gala f06a1d84ed spi: sort drivers into legacy or not in CMakeLists.txt
Sort the drivers to make it explicit of which drivers are supporting
the legacy API vs the new API.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-24 18:27:27 +05:30
Kumar Gala 80c4985342 spi: cleanup whitespace in CMakeLists.txt
Use tabs everywhere instead of spaces and tabs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-24 18:27:27 +05:30
Michael Hope 73d045e281 spi: add a SPI driver for the SAM0 series.
Impleentation is master only and uses polling to read and write.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-13 07:39:05 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00