Commit graph

41120 commits

Author SHA1 Message Date
Marcus Shawcroft
213988873b gpio: qmsi: Make driver config_info structure const.
Change-Id: Ia2d840685db19493a0d2eee874b81dd968ee93b3
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:48 +00:00
Marcus Shawcroft
cbbc1c4da2 gpio: pcal9535a: Make driver config_info structure const.
Change-Id: Id484d8d3fd9212b82f6d623201506268759ccfc8
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:48 +00:00
Marcus Shawcroft
4c727dbc10 gpio: nrf5: Make driver config_info structure const.
Change-Id: Ie831403c15f344f6bf83c7b00ca0c73185053f4d
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:47 +00:00
Marcus Shawcroft
589a77f57a gpio: dw: Make driver config_info structure const.
Change-Id: Ib80fa277bba38c05e00817e6e6071c0b4db38a66
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:47 +00:00
Marcus Shawcroft
1653d90cbf gpio: sam3: Make driver config_info structure const.
Change-Id: I366a8096e61f2c9f6481fdbb83ba4257c94bddae
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:46 +00:00
Marcus Shawcroft
b8f0de0e43 eth: enc28j60: Make driver config_info structure const.
Change-Id: Ib36cc9a2a1e72539196803d4a0bf61453d1a4b25
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:46 +00:00
Marcus Shawcroft
df4b8d3915 eth: dw: Make driver config_info structure const.
Change-Id: I4b3a86c29c28cee09547973e85ea55489c5cc489
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:45 +00:00
Marcus Shawcroft
6d97853a6b dma: qmsi: Make driver config_info structure const.
Change-Id: I73f6e5de1de1ec61265cfe697d70ae1441663f41
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:45 +00:00
Marcus Shawcroft
d0a71d8f77 adc: Make driver config_info structure const.
Change-Id: Ide974b66da3b785c676f5bbd4f3f5f248797c4e5
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:45 +00:00
Marcus Shawcroft
aeac8e633b serial/sam3: Make config_info structure const.
Change-Id: I7aa0ea803c00644c84952fcd6e3ddcd3e41607f6
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:44 +00:00
Marcus Shawcroft
24fe3a0b3d gpio: k64: Make driver config_info structure const.
Change-Id: Ib471bbe2de7de232331bba97570655b262bdac81
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-20 16:48:44 +00:00
Kumar Gala
89f71ba0e2 stm32: cleanup how we get external interrupt base addr
Move to utilizing an inline function for getting the base addr of the
external interrupt register region.  This is in prep for support more
than 32 external interrupts.

Change-Id: Ifdaad67703068395a7749543ef68435435e7c9ba
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-20 12:18:41 +02:00
Bogdan Davidoaia
f0bc96ee8c sensor: hdc1008: add missing dependency for I2C address config
The HDC1008_I2C_ADDR config option should be available only if HDC1008
is enabled.

Change-Id: I0d1813512396faefb609527ba5df2a0c4ea159a9
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-10-20 09:44:40 +00:00
Anas Nashif
71d6ad2619 sensors: bmi160: remove unused init priority config
Change-Id: I367d7b084fb93609000066b610e01a802fdd152e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-20 09:39:51 +00:00
Genaro Saucedo Tejada
78316bd8c7 fix: Add missing structure at spi_intel_resume_from_suspend
Change e4b89571aa renamed the variable
to an undeclared one, without breaking verify but daly breaks.

A local variable of type spi_intel_data was missing on this
function.

Jira: ZEP-1095

Change-Id: Ie410933c2472378d4a6f24d6ca932ac203e3b08c
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-10-19 21:22:41 +00:00
Benjamin Walsh
b9c1a067bf unified: doxygen comments for semaphores.
Change-Id: If1a9fa887b07736a70cb26227e147120e5a86f6f
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2016-10-19 18:36:03 +00:00
Allan Stephens
45bfa37f97 unified: Revise timer code to conform to new API specification
Provides users with a more compact and intuitive API for kernel
timers.

Provides legacy support for microkernel timers and nanokernel
timers by building on the new kernel timer infrastructure.
Each timer type requires only a small amount of additional
wrapper code, as well as the addition of a single pointer
field to the underlying timer structure, all of which will be
easily removed when support for the legacy APIs is discontinued.

Change-Id: I282dfaf1ed08681703baabf21e4dbc3516ee7463
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-19 18:14:58 +00:00
Allan Stephens
bf684a10ba unified/doc: Update timing section of Kernel Primer
Revises documentation for the kernel clocks to align it
with the actual behavior of the unified kernel.

Revises documentation for the kernel timer object type
to provide users with a more compact and intuitive API
that supports (directly or indirectly) the capabilities
of the now defunct microkernel timer and nanokernel
timer object types.

Note: A separate commit will be used to implement the
revised timer API described here.

Change-Id: Ifa4306c76e1c3e2aab1c0b55031df4179ac2a6b9
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-19 18:14:58 +00:00
Inaky Perez-Gonzalez
2b52b34eb7 samples/shell: don't run on QEMU, input not supported
This will be reverted once input is supported in QEMU.

Change-Id: I4bc946f1634bf9ebd17b697f0da7ce2f813e5725
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-10-19 17:57:15 +00:00
Inaky Perez-Gonzalez
6ef9c853d1 samples/drivers/spi_lsm9ds0: don't run on QEMUs or FRDMs
These platforms don't have the hardware and will always fail.

Change-Id: I637d39f003bd1d507da0b5bb6fa12118040fcd63
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-10-19 17:56:48 +00:00
Anas Nashif
34ffa15669 checkpatch: complain only about actual leading spaces
Change-Id: Ia591966a35765bfc560bd823be488257537e6530
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-19 16:46:41 +00:00
Inaky Perez-Gonzalez
e03f561588 testcases: catch all fatal faults as failures
Ensure that we catch all fatal faults and report them as such (we were
only catching the ones in fibers).

Change-Id: Id734cdd02f4950d19717467a212032433a7dcc61
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-10-19 15:05:47 +00:00
Peter Mitsis
d7a3750b3c unified: Update msgq doxygen styled function headers
Change-Id: I4648ebcda9e6c3abea05b420584e2bcb112f3ed4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-19 14:54:45 +00:00
Peter Mitsis
1da807e7a8 unified: Tweak msgq API parameters
- Reorders parameters where necessary
 - Adds alignment parameter to K_MSGQ_DEFINE() for buffer alignment
 - Renames parameters where necessary so they are more intuitive

Change-Id: I0b53105c04109127897bf4790e6908082f82da4e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-19 14:54:44 +00:00
Peter Mitsis
67be24909d unified: Add k_msgq_num_free_get() API
Complements existing k_msgq_num_used_get().

Change-Id: If04a540878ae998ccdc14867a022c428947604a6
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-19 14:54:44 +00:00
Peter Mitsis
f925f0f853 unified: Remove unused K_MSGQ_SIZE() macro
Change-Id: Ifabe0615672576834d41b36dfcc121d3de1ac30b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-19 14:54:43 +00:00
Inaky Perez-Gonzalez
7c4584c901 tests/benchmark/latency_measure: use TC_PRINT_RUNID when reporting success
In order to print the proper strings that the test case execution
frameworks expect, use the macros defined in tc_util.h.

Change-Id: I841c5454fbcf4f679e6285538e838f039442b1f8
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-10-19 14:29:09 +00:00
Marcus Shawcroft
87845f3328 drivers: Make drive config info const.
Finally, after numerous, preparation patches...  Make a device drivers
config_info structure 'const'.

Change-Id: Idc4682705da18a18b694d3fb21ba6006f96ac87b
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-19 12:11:00 +00:00
Marcus Shawcroft
58ed60457c pwm/dw: Make config_info pointers const.
Mutable driver state relocated from config_info to driver_info.

This driver is unused by any board, nor can it be compiled for any
board.  Hence this patch reflects the mechanical change that should be
made to the driver in order to support a const config_info, but the
patch has been neither compiled, nor tested.

Change-Id: I28597962e81d6e02f1f4befe48c3a3324691cfeb
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-19 12:10:59 +00:00
Marcus Shawcroft
fded21ab45 eth/dw: Move RW objects from device config_info to device driver_data.
Mutable driver state relocated from config_info to driver_info.  This
driver supports PCI enumeration.  We drop code that attempts to update
irq_num based on PCI enumeration because the interrupt found by PCI
enumeration must always be the same as the statically configured IRQ
number.

Change-Id: I5580b0ba95635696a825fe66dbf16259c54d5ba8
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-19 12:10:59 +00:00
Marcus Shawcroft
8564334254 gpio/dw: Move RW objects in config_info to driver_data
PCI enumeration modifies pci_dev and base_addr at driver
initialization therefore these objects move from config_info to
driver_data in preparation for config_info becoming const.

We drop code that attempts to update irq_num based on PCI enumeration
because the interrupt found by PCI enumeration must always be the same
as the statically configured IRQ number.

Change-Id: Ibfefa851d2836d524b8151ed0108ecf9de2cd3a3
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-19 12:10:58 +00:00
Marcus Shawcroft
beb05f8661 i2c/dw: Move RW objects in config_info to driver_data
PCI enumeration modifies pci_dev, base_addaress at driver
initialization therefore this objects move from config_info to
driver_data in preparation for config_info becoming const..

We drop code that attempts to update irq_num based on PCI enumeration
because the interrupt found by PCI enumeration must always be the same
as the statically configured IRQ number.

Change-Id: Id5af682dac112ec6dc6e4aa14b655e0047972d38
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-19 12:10:58 +00:00
Marcus Shawcroft
e4b89571aa spi/intel: Move RW driver context from config to runtime structure.
Mutable driver state relocated from config_info to driver_info.  This
driver supports PCI enumeration.  We drop code that attempts to update
irq_num based on PCI enumeration because the interrupt found by PCI
enumeration must always be the same as the statically configured IRQ
number.

Change-Id: I97198ae9603505606a872b07824d6c61688f0ced
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-19 12:10:58 +00:00
Ricardo Salveti
b035209080 drivers: exti_stm32: fix clear pending exti
Pending bit gets cleared by writing 1 into it, so don't use the previous
value and just write the line bit offset instead.

Change-Id: I4c88016bf53327b2670a144d3b994945f26fc002
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>¬
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-10-19 11:56:00 +00:00
Ricardo Salveti
17a62dd268 exti: stm32: fix driver data handling
Since dd5e90ec the device_get_binding call returns NULL unless the
driver_api is set by the driver. Since the exti driver only uses an
internal struct to store the callbacks, remove the need for the device
binding call from other drivers (e.g. gpio).

Change-Id: If0b733c27754108118d87ef02640311f0535ab57
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-10-19 11:56:00 +00:00
Amit Kucheria
4c2802d6b7 drivers: serial: uart_stm32: Fix typo in register field name
The field is "NF: Noise detect flag". Given that every other field name is
faithful to the manual, do the same for NF.

Change-Id: I300663e6d5016bf28071d2a1926ec73682ae3d01
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-10-19 11:55:59 +00:00
Genaro Saucedo Tejada
9cb925dc70 filter: exclude sensor tests from assert build
When running sanity with asserts turned on the following tests don't
fit the ROM region of CONFIG_SOC_QUARK_D2000:
- test_build_sensor_triggers
- test_build_sensors
Added filters prevent these test from being executed when asserts are
on.

Jira: ZEP-1063

Change-Id: Ib046bcb227f4a49b524894aa5aea80debe159aae
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-10-18 23:39:30 +00:00
Jesus Sanchez-Palencia
13b5d62625 rtc: Set prescaler to QMSI shim
In QMSI 1.2 API, the RTC divider value for the prescaler can now be set
on runtime. This is done through a config parameter for the qm_rtc
driver.

Fix the rtc shim driver by using the value defined in rtc.h as
RTC_DIVIDER.

Change-Id: I5ab61a5a1a3debca103f2782e0ac584938dc91e1
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-10-18 23:26:02 +00:00
Jesus Sanchez-Palencia
7c0fc99c79 ext qmsi: Update to QMSI 1.2 release
Update the QMSI drop we maintain in Zephyr, and fix the build where
needed:

- QM_USB_BASE is renamed to QM_USB_0_BASE;
- parameter int_en from qm_uart cfg struct was removed;
- driver's folder now has a new structure, fix makefiles accordingly;
- QM_WDT_MODE and related renamed to QM_WDT_CR_RMOD;
- QM_SCSS_AON renamed to QM_AONC.

Change-Id: Iffe9c66b7a3f2fe64418326e20ff0894149b3044
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-10-18 23:26:01 +00:00
Maureen Helm
d5a252cc35 sanitycheck: Add hexiwear board
Enable build tests for the hexiwear board.

Change-Id: If7bf155bc77da0d2571eb617fb1803ece65e3a96
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-10-18 21:42:33 +00:00
Maureen Helm
465e2c345b MAINTAINERS: Add frdm-k64f and hexiwear boards
Change-Id: I919ca5b66f0987466c51a9dbada21711a63cfb62
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-10-18 21:42:32 +00:00
Maureen Helm
56c094570e pinmux: Add hexiwear pinmux table
The hexiwear board has a k64 SoC, so we can reuse the k64 pinmux driver
and just add a new pinmux table for the board.

Jira: ZEP-716
Change-Id: I936691b3578db298014f44fe18433d7943b431f3
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-10-18 21:42:32 +00:00
Maureen Helm
3744d3191c hexiwear: Add support for hexiwear board
The hexiwear board pairs two Kinetis SoCs - k64 and kw40. The k64
already has SoC support in Zephyr, therefore we are adding support for
another board for the same SoC. Note, however, that hexiwear uses a
different SoC package than the Freedom board and therefore has a
different part number and pinout.

The second SoC on the hexiwear board, kw40, runs a BLE controller stack
with HCI; it does not run Zephyr (yet).

Jira: ZEP-716
Change-Id: I206f6ef58010d13075a00432040894392117e3ce
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-10-18 21:42:31 +00:00
Maureen Helm
342e09c463 pinmux: Rename frdm_k64f pinmux driver to k64
The k64 pinmux driver can be used for any k64 board, not just frdm_k64f,
therefore renaming the driver accordingly.

Change-Id: I45e96d4a5ff6aa859d0f57fe098e44a8ae5283d1
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-10-18 21:42:31 +00:00
Chuck Jordan
ff303948d5 arc: Support FIRQ handling when CONFIG_RGF_NUM_BANKS==1
For the EM Starterkit, one SOC I will soon be adding is EM7D.
This SOC has FIRQ, but only has one register bank.
Thus the interrupt handling for FIRQ needs to be different
when CONFIG_RGF_NUM_BANKS==1. The handler must instead push
registers onto the stack in the same stack frame layout that RIRQ uses.
This allows for context switch to be easily done since its compatible.
The common interrupt entry point _isr_enter must save r0 before using
it, because in the FIRQ 1-bank case, it would be destroyed otherwise.
So a global variable named saved_r0 has been added for this reason.
The stack cannot be used to save r0, because it first has to determine
whether its FIRQ or RIRQ here. This change has been tested on the
EM Starterkit with EM7D SOC changes -- coming soon. To make the review
easier, these 3 files are submitted first.

Also, exceptions will no longer use the _firq_stack.
This stack is not needed in the 1-bank case, but an exception stack
is needed. I've added a new stack called _exception_stack,
and made it be 512B, which should be enough for one exception.
See ZEP-966

Change-Id: I6f228b840da7c4db440dd1cfef4ae25336c87f0d
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-10-18 20:26:29 +00:00
Anas Nashif
debf5bfe63 pinmux: k64f: remove unused Kconfig section
Those options are not being used anywhere, so remove them and avoid some
confusion.

Change-Id: Ia3767dbd2432851dfae4b1e996f02ed1b2450505
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-18 20:14:52 +00:00
Justin Watson
b5e9c6d1bb driver: Fixed Atmel SAM3 serial driver.
The Atmel SAM3 serial driver poll in function checked
for new characters incorrectly.

Change-Id: I9024a991404bf949226634c9f6c6ea507577cff1
Signed-off-by: Justin Watson <jwatson5@gmail.com>
2016-10-18 17:46:41 +00:00
Peter Mitsis
578f9111ed unified: Tweak mem_map API parameters
- Reorders parameters where necessary
 - Adds buffer alignment parameter to K_MEM_MAP_DEFINE()

Change-Id: Ifa1a09c62492cd6db8bdd83f31a5ca5ba072b484
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-18 15:31:51 +00:00
Peter Mitsis
c001aa8ef6 unified: Add k_mem_map_num_free_get()
Complements existing k_mem_map_num_used_get().

Change-Id: Ie69c0a8e30007e365820448bde48303718369904
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-18 15:31:50 +00:00
Peter Mitsis
c19dd50093 unified: Remove unused K_MEM_MAP_SIZE() macro
Change-Id: I25673bbeeb5ba188f6e6f52e237494cfeb85a8c6
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-18 15:31:50 +00:00