Commit graph

41120 commits

Author SHA1 Message Date
Anas Nashif
5e5981234f quark_se: x86 core does not support ADC
ADC is available on the sensor subsystem only.

Change-Id: I3242108eb1f39a9509e30cc7ff440e02811ba4e6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-10 21:26:31 +00:00
Anas Nashif
e05fa64f4c frdm_k64: spi: fixed wrong kconfig used in driver
Change-Id: I43f31562cdfa0b722907e5c6018e3e56d141ed4f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-10 21:26:30 +00:00
Anas Nashif
37d2fdce13 quark: dma: enable qmsi driver if DMA is selected
Change-Id: I413dc28da562a7899c5271a36eca9a6d8d84221a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-10 21:26:29 +00:00
Kumar Gala
d12d8af186 unified: move code from nanokernel into unified kernel
As the unified kernel should replace the nanokernel and microkernel
lets go ahead and move code shared between the nanonkernel and unified
kernel into the unified kernel.

Change-Id: I8931efa5d67025381d5d0d9563e7c6632cece87f
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-10 00:46:40 +00:00
Allan Stephens
55745dbb3d unified/doc: Minor updates to event section of Kernel Primer
Change-Id: I4fec3439f930228a6bf94ee3aab49e3f65ecd043
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-09 18:55:48 +00:00
Allan Stephens
ddf7bb5eb3 unified/doc: Minor updates to message queues in Kernel Primer
Change-Id: I4e691f97818874d594ac1d9225c14f6af3c0101d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-09 18:55:47 +00:00
Rohit Grover
f809c84de2 net: fix a potential refcount leak of SYN buffers
net_send() is meant to release the refcount for the SYN buffer once
a connection is established, but this assumes that the application
uses net_send() for all outgoing buffers. It is possible to setup a
connection (and therefore generate an outgoing SYN) by calling
net_context_tcp_init(), which has the side-effect of overwriting
connection_status . Using such an API would then break the
assumption around net_send() reclaiming the refcount of the SYN buf.

A test case which exposes the problem:
* As a client, setup a connection with an HTTP server.
* Send an HTTP request contained in a buf using net_send()
* The server responds, and then tears down the connection.
* The test client then re-establishes another connection using
  net_context_tcp_init()--this overwrites connection_status, causing
  a refcount leak.

With this change, we remove the dependency on net_send() being called.

Change-Id: I96516cbca3e231ed7fb509a7c03c0ceebf80e03a
Signed-off-by: Rohit Grover <rohit.grover@arm.com>
2016-10-08 21:20:28 +00:00
Rohit Grover
627feb92d4 net: fetch valid conn. to determine MSS in data_is_sent_and_acked()
Packets sent out through net_tx_fiber go through psock_send() where
they wait for data_is_sent_and_acked() to process them.
data_is_sent_and_acked() looks at the underlying connection's
MSS (maximum segment size) before putting them on the wire through
uip_send(). The trouble is that that linkage between the outgoing
buffer and the connection hasn't been established at the point
data_is_sent_and_acked() is called--this normally happens through
a call to uip_set_conn().
So data_is_sent_and_acked() fetches an invalid connection handle
and makes its choice using an arbitrary MSS. In my particular case,
this arbitrary value was 0, and so packets weren't being sent out.

Change-Id: I42e8ae104ac20f8df8780c8aee6964ed37113ba0
Signed-off-by: Rohit Grover <rohit.grover@arm.com>
2016-10-08 21:20:28 +00:00
Marcus Shawcroft
02dcceef29 clock/quark: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I0337cb574d8bac0877643b2116920d4a0c08c8f3
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-08 11:40:15 +00:00
Marcus Shawcroft
0a83707410 tests: Add build test for quark clock driver.
Change-Id: I2863d5dc481aedf8015777dbd022f34a7f2c1070
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-08 11:40:14 +00:00
Marcus Shawcroft
ec7d259fa3 eth/enc28j60: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I75e51f396ce9dbe5d9f2339b551c142a5afcbfce
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-08 11:40:13 +00:00
Marcus Shawcroft
bf49fee348 tests: Add build test for enc28j60 SPI standalone ethernet driver.
Change-Id: Ieba53e625b2231ef9c492dbe6bfb8b01a5371226
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-08 11:40:12 +00:00
Marcus Shawcroft
3316cb3898 serial/uart_nsim: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: Ide7c5cae8c57e3b30c7bb6611b574b86562c241d
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-08 11:40:12 +00:00
Marcus Shawcroft
5e95f11afe spi/qmsi: Make config_info pointers const.
Make pointers to struct config_info const in prepration for a const
config_info.

Change-Id: I1ca9e999840a6ad81dc369b56b1da554f3c1cb49
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-08 11:40:11 +00:00
Marcus Shawcroft
9b131c7f2d tests: Build test for nsim uart.
Change-Id: Iacfee9cc21b4f4e58d525bde11cdf6feb5a79d30
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-08 11:40:10 +00:00
Benjamin Walsh
fc59e5b584 unified/arm: fix saving of registers in __pendsv()
The unified kernel calls a function (_get_next_ready_thread) to fetch
the next thread to run: it thus must save caller-saved registers that
are expected to hold a value before calling such function.

The callee-saved registers are available after saving them in the
outgoing thread's stack, so use some of those instead to reduce the
number of registers to save before calling _get_next_ready_thread. Also,
save caller-saved registers in callee-saved registers instead of on the
stack to reduce memory accesses.

This issue did not show up previously, probably because
_get_next_ready_thread did not use the regsiters that had to be saved,
but an upcoming optimization to that function stomps on them.

Change-Id: I27dcededace846e623c3870d907f0d4c464173bf
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-07 22:51:11 +00:00
Anas Nashif
33118f9212 sensor: grove: use global sensor init priority
Change-Id: Ie56ee7e4b267b4dc67026be4531834f550134969
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 20:53:29 +00:00
Chuck Jordan
df4c0acd2d arc: Fix comment about IRQ call stack
The code density registers are NOT saved on the stack.
This is controlled by bit 13 in AUX_IRQ_CTRL, which didn't even have a symbol
defined for it. I've also added _ARC_V2_AUX_IRQ_CTRL_LP for bit 13.

Change-Id: Ie80853b72bed4e60a5cf1cf0a8c905a3d86180d9
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-10-07 20:50:26 +00:00
Chuck Jordan
5b1198a6ca arc: add _ARC_V2_IRQ_TRIGGER inline function
ARC interrupts can be either level or pulse.

Level interrupts remain asserted until the interrupt service routine
clears the interrupt at the peripheral. This is the default and most
common case.

Pulse interrupts have an extra flip-flop that converts a pulse to a 
level. The ARC auto-clears this level as the interrupt service routine
is entered. As such, an interrupt handler for a pulse interrupt need
not clear the interrupt.
It is the rare device that uses pulse interrupts.

Nothing currently calls this inline function so ARC interrupts are
LEVEL by default.

(see ZEP-83)

Change-Id: I09ef86aae1926c1327e82ff99c2f8aa7eabde684
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-10-07 20:50:25 +00:00
Chuck Jordan
ed569f525d arc: RGF_NUM_BANKS is another configurable option for ARCs
In order to add the EM7D SOC, I will be implementing a version of the FIRQ
interrupt handler that saves and restores registers on the stack when
RGF_NUM_BANKS==1. All other ARC SOCs at this time have RGF_NUM_BANKS==2,
allowing for a faster handler that can use the registers in the 2nd register bank.
But EM7D doesn't have this 2nd bank, hence the need for this new configurable choice.
(See ZEP-966)

Change-Id: Ie089f1f079902552cf279c2cda23ee0805b01eed
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-10-07 20:50:25 +00:00
Marcus Shawcroft
67d6b592cf sensor/lsm9ds0_gyro: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I8fd83236ecf5357a0a192650a26e91045a6116a7
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:34:01 +00:00
Marcus Shawcroft
cfb5196f07 sensor/lsm9ds0_gyro: Fix failure to compile, undefined CONFIG_LSM9DS0_SENSOR_INIT_PRIORITY
Change-Id: Ibaeaa1a7df692c044310ba116285e1898d806d0e
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:34:00 +00:00
Marcus Shawcroft
dee749b213 sensor/lsm64s0: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: If977cc39bab3e838d1ff6d8de2cb4b667974ee17
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:59 +00:00
Marcus Shawcroft
6b552ef2a8 serial/uart_qmsi: Make config_info pointers const.
Make pointers to struct config_info const in prepration for a const
config_info.

Change-Id: I0257e242a2d3bc4e353a3477364a4d9a7fb72b82
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:58 +00:00
Marcus Shawcroft
fb4cfcba14 spi/qmsi_ss: Make config_info pointers const.
Make pointers to struct config_info const in prepration for a const
config_info.

Change-Id: I71bcfa48b31934bc683a344d40bb03f5247bbbec
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:57 +00:00
Marcus Shawcroft
fd212acac9 ipm/ipm_quark_se: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I4fb89ccee9cec3bdc1976a006e13afcd0bdc69a2
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:57 +00:00
Marcus Shawcroft
4e81f369c7 gpio/qmsi_ss: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I31abd3d5606b2b750da86d00e938db3988696c7f
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:56 +00:00
Marcus Shawcroft
db35cc6838 sensor/bmi160: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: Ia4639d65ab4ee64a2ee0ba41677bab40894d65b4
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:55 +00:00
Marcus Shawcroft
a6f681c782 sensor/bmg160: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I2e9b7e7e8245e60e66554b4d631d71a453cf7ffd
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:54 +00:00
Marcus Shawcroft
1ec5093c04 sensor/bmc150: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: Ic4563561cff930533e920031767218023d4746b0
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:53 +00:00
Marcus Shawcroft
68b89da299 tests: Adding more sensor build tests.
Add another group of sensors tests.  Ideally these would be added to
the existing sensor test, however we are at the ROM limit of the
default board, enabling the rest of the bmc150 driver code is
sufficient to break the link.  Ideally these build tests would succeed
on as larger group of boards as possible, therefore rather than switch
the default board to something with more ROM it seems more appropriate
to create more, smaller tests.

Moving the current partial bmc150 build test from its current home to
a new test and adding the missing parts of the driver.

This split of sensor tests into multiple groups is arbitrary,
suggestions for a systematic approach welcome.

Change-Id: I4d33bff00e483558c4a8486afb96c1906e2d2281
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:52 +00:00
Marcus Shawcroft
58c8199aa6 sensor/lps25hb: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I9f510669710ae8fab897d4047e4d7324c3a84e00
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:52 +00:00
Marcus Shawcroft
6cfe874a0f sensor/lsm9ds0_mfd: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I3b781f09e15d57ae4d00c11d6b7a328b31bc25aa
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:51 +00:00
Anas Nashif
e1675424f8 tests: sensors: expand coverage with logging enabled
Change-Id: Icf99288444afb2154b32902e805abf3f9bdf36bf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 16:15:54 +00:00
Anas Nashif
16c5416d70 sensors: use one single sys log config for sensors
Change-Id: I27aadd15ad0ebbaf6373591d52e63fe3f4560378
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 16:15:54 +00:00
Anas Nashif
ff6640c34e mailmap: update with new emails
Change-Id: If564fa04404d1365afd0dbd47a31a38e5b04298c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 16:15:24 +00:00
Anas Nashif
84c9db39e7 gpio: reduce Kconfigs and use consistent name for GPIOs
Using AON for GPIO kconfigs is very specifc to quark se, there
is no need to make this special for this platform. Use the
existing scheme instead.

Change-Id: I946431490380dc0f537d6056277a94c9c9c80fed
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 16:15:07 +00:00
Ricardo Salveti
1450f7bae4 arm: remove exc_wrapper.S
Not used anymore as the support for dynamic IRQs was removed by
commit 844e212.

Change-Id: I624bbd777b2dbcbf905cedc61e63cef21e8a0bce
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-07 14:40:17 +00:00
Anas Nashif
706f1b8bd8 drivers: gpio: i2c: make logging depend on SYS_LOG
Change-Id: Ia6af28598cf979f20e04cd2c74f3e75f4ae6630b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 14:15:24 +00:00
Anas Nashif
43f1c36ed5 samples: button: modify sample to work on more boards
Change-Id: Ib29dc5ce70618f6c4d0a4d732910ea67f92c37a5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 14:14:05 +00:00
Anas Nashif
d780d97f9b boards: define user buttons and switches on boards
Change-Id: I1b03b77835510685fba91fb2f74a0f9b6125f570
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 14:14:04 +00:00
Anas Nashif
98eb3b26a0 tests: expand sensor build testing by enabling more sensors
This will help catch build issues with sensors by enabling all sensors
we have into one single application using all supported IOs.

Change-Id: Id8c201b8ae9b74dccc62d6440899ff487ea09d43
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 14:07:26 +00:00
Anas Nashif
e3706c98f3 sensors: cleanup duplicate includes
zephyr.h includes nanokernel.h which includes cpu.h, so make it
simple and just include nanokernel.h. zephyr.h should only be
included in applications.

Change-Id: I11a9ad8608d23af4f2a40a97eb71c09516c3399b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 14:07:26 +00:00
Anas Nashif
d3fe63702f kernel: boot banner requires early console, so select it
If you select the BOOT_BANNER on its own, nothing happens and
you are left to wonder what is going, it happens very early in
the boot process and requires very early console initialisation.

Change-Id: Id548491f7e3f7f399ddc572199ce39e6fc268ed4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 14:07:25 +00:00
Anas Nashif
f482200f9c samples: remove useless filters in testcase.ini
Change-Id: Iaf7f77a738a48918752347c97019660355de370a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 14:07:24 +00:00
Marcus Shawcroft
d8708d52bc adc/ti: Make driver config structure static.
Change-Id: Ie3ae8397624ee3b9aedbfbe61acbe5a17a2db0b0
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 08:05:50 -04:00
Marcus Shawcroft
bad1a4b1da adc/ti: Make config_info pointers const.
Make pointers to struct config_info const in prepration for a const
config_info.

Change-Id: I2256c0f0bff5100e756709c9f99887af70bac661
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 08:05:50 -04:00
Marcus Shawcroft
11258b1395 adc/dw: Make driver config structure static.
Change-Id: Ia094d1abda47ff5d2e05c3d97f9a377cb17d2ee7
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 08:05:50 -04:00
Marcus Shawcroft
b28b59b617 adc/dw: Make config_info pointers const.
Make pointers to struct config_info const in prepration for a const
config_info.

Change-Id: I977979bc86830768101ab9a2ca1928823ae994df
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 08:05:50 -04:00
Marcus Shawcroft
58026e327a ipm: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I8f2eb0f6dbd6f50e0d456ee329e3b00e4ce4b257
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 08:05:50 -04:00