Commit graph

41120 commits

Author SHA1 Message Date
Maciek Borzecki
5eb51feeb0 console: shell: expect const commands array
The commands array is not expected to change and can be declared
const. This allows callers to cleanly declare their commands lists as
const, effectively moving the structures from SRAM to code section.

Change-Id: Ie1710622b8cfa609e129eb79712f910f1d1aace3
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:56 +00:00
Maciek Borzecki
24f008bd65 sanitycheck: add nucleo_f103rb abd stm32_mini_a15
Enable build tests for Nucleo-F103RB and STM32 MINI A15 platforms.

Change-Id: I26ccdb6edd537f5dfc9c0120e5a6d4ee1ed63dbb
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:56 +00:00
Vlad Dogaru
320651281c sensor: bmp280: fix pressure value
The comments in the sensor header specify that pressure should be
expressed in kPa, but the bmp280 driver returns a value in Pa.

Change-Id: I6d5346db250d1a01a1e5e31fb1d8685ab5dc405b
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-04-01 14:48:00 +03:00
Baohong Liu
45a269f3b0 boards: arduino_101: Enable SPI flash only when SPI is enabled
SPI flash depends on SPI. Enable the SPI flash driver only when
SPI is enabled.

Change-Id: I902588b806a4a5773fddb58a7567a8e0d4ba9fe0
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-04-01 10:40:32 +00:00
liu.lei
acd673eb1b pinmux: Fix where to look for PINMUX_BASE_ADDR
Fixes this built error:
zephyr/drivers/pinmux/dev/pinmux_dev_quark_mcu.c:138:18:
error: 'PINMUX_BASE_ADDR' undeclared here (not in a function)
.base_address = PINMUX_BASE_ADDR,

Change-Id: I54f15bc262cb887117f7b56660bcf85983daa877
Signed-off-by: liu.lei <lei.a.liu@intel.com>
2016-04-01 10:38:44 +00:00
Arkadiusz Lichwa
7420276282 Bluetooth: BR/EDR: Enable cancel Passkey Notify authentication
From now on user/app has possibility to dismiss Passkey Notify authentication
on acceptor side even with DisplayOnly interface. The action on 'Cancel' API
in this case is disconnection.

Change-Id: I4be198482c23c0ccaeb0112b72ff269037e03583
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-04-01 09:26:24 +00:00
Luiz Augusto von Dentz
7b4ddaf73d Bluetooth: GATT: Force write to CCC when reconnecting
Some devices may actually lose track of CCC setting so this is required
to work around the problem, in case the device does work track CCC
properly the extra write shall not cause anything more than one extra
round trip thus it is probably work doing it anyway.

Change-Id: I9e5ed3fa459e4617c6fae094d0ce0f80cb2682e4
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-04-01 09:24:02 +00:00
Andrei Emeltchenko
0d446131d2 drivers/nble: Implement read CUD attribute
Implement bt_gatt_attr_read_cud() making working peripheral_esp app.

Change-Id: Ic9634bf31a39ae9cd55279de34ee4c0c0995a4dd
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-01 10:46:39 +03:00
Johan Hedberg
74dbbcac61 Bluetooth: Make controller to host flow control conditional
Deal with controllers that don't support controller to host control.
This may potentially lead to dropped packets so make a clear warning
log of the issue.

Change-Id: Ie8fdaed826a072fd157343721222f618328d59a3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-01 08:41:39 +03:00
Johan Hedberg
4763bb9c86 Bluetooth: Move supported commands reading to common_init()
Reading supported commands isn't an LE-specific feature, so the
command should be in common_init() rather than le_init().

Change-Id: I613bbe8d39b4c2b6dadc45a710bc59568ec9b488
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-01 08:37:18 +03:00
Anas Nashif
1d894f98c2 Zephyr v1.2.0-rc2
Change-Id: I36fd9b96d247184b4a986467f1609a9c3b0cbd9f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-31 21:22:26 -04:00
Peter Mitsis
28e5d0287e test_fifo: Reorganize directories
Splits the test into two clear sub-categories: microkernel and nanokernel.
This is done to maintain consistency with other tests that do the same
(e.g. test_obj_tracing, test_sema, test_stackprot, test_timer).

Change-Id: Iddb1ec8d569a9d953fb8af5ce08e87b51995f821
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-04-01 00:07:28 +00:00
Tomasz Bursztyka
71e26d0d03 tests: Add a test suite for the single linked list generic
It will extensively test all provided functions within a normal usage of
the API.

Change-Id: I723203a29c3f3416b464030a7fe34eac5fff6095
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-01 00:01:58 +00:00
Tomasz Bursztyka
6c1f11ec97 include: misc: Add a generic single linked list API
As for double linked list provided through misc/dlist.h, this provides a
generic API for single linked list in misc/slist.h. It follows the same
naming rule as in dlist.h

Change-Id: I955bd16a201bc9987c29f5a9e3e3d8447682a71e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-01 00:01:58 +00:00
Peter Mitsis
30aa2602ad test_fifo: Fix issues flagged by checkpatch
Fixes line length and whitespace issues flagged by the checkpatch tool.

Change-Id: Id49cd5341571ac7893929a2836fe5e06166abe06
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-04-01 00:00:34 +00:00
Sebastien Griffoul
4b70134d1a eth_dw: fix buffer leak when RX frames are too large
When an ethernet frame is larger than UIP_BUFSIZE,
a net_buf is allocated but never released. Therefore
after few bad frames, no more RX network packet
can be received.

Fixed by allocating the net_buf after checking
the frame length.

Change-Id: I436487e3c26d739de347b4db6facc3a3dbebbe75
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
2016-03-31 23:18:17 +00:00
Yannis Damigos
ee587d08a8 tests: kernel: test_context: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test_context to compile on boards like
nucleo-f103rb. Sanitycheck script passes all test for
test-context.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: I219f63063ee2dca5b0326e25141d8b37f4cd1d74
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:52 +00:00
Yannis Damigos
32e450024e tests: kernel: test_pool: reduce ram requirements
Reduces the amount of memory allocated for task's stack.
This permits the test_pool to compile on boards like
nucleo-f103rb. Sanitycheck script passes all test for test-nano.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: Ib8041f6d91e8ffc5fcb16dc73de1f7662d9596da
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:51 +00:00
Yannis Damigos
60695b18a0 tests: kernel: reduce ram requirements
Reduces the amount of memory allocated for stack (both fiber
and task). This permits test_sema and test_mutex to compile
on boards like nucleo-f103rb. Sanitycheck script passes all
tests for test_sema and test_mutex.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: Ie25288bbbbfa64bfc5f7463639bfb09639cc184f
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:51 +00:00
Daniel Leung
8a05b46325 rtc/dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

This also separates IRQ_PRI into one for DW and one
for QMSI, to follow the convention of every other
drivers.

Change-Id: I338f819f71c18fa9e17015e8a588a3d0207350c6
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:25 +00:00
Daniel Leung
f1ead35cc6 watchdog/wdt_dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ic73783189db57059d2b7f3727e4802e1b2e27931
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:24 +00:00
Daniel Leung
2d1ed03a8f pwm/k64_ftm: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ifd65097a65f80539cac073f95aadc2d8e42efb9f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:24 +00:00
Daniel Leung
8f1986f8ee samples/drivers: extend PWM app to FRDM_K64F
This extends the pwm_dw sample app to build for
FRDM_K64F board also. Because of this, pwm_dw
has been renamed to pwm.

This allows us to put it through sanity test
to catch build breakage.

Change-Id: Ie4d7442af43ede58f4cec0ec28643384a685321a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:24 +00:00
Daniel Leung
17b3a85308 pwm/dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ifdbb5e3a997795ef577350d88f8cb06877eb6463
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:24 +00:00
Daniel Leung
5e886b2748 gpio/sch: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ib8158f00a6c6616360ddbcf63981f1a85911c1b9
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:23 +00:00
Dmitriy Korovkin
d78a2e34d6 galileo: Fix SPI driver init level
On Galileo Gen2 board SPI uses GPIO pin for CS.
Thus spi_intel driver must be initialized after gpio_dw,
so it's init level must be more that gpio_dw's one.

Change-Id: If2e5fb1106afe01e5567cf3fe72063bdc94ad3d2
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-31 23:17:00 +00:00
Dmitriy Korovkin
79351142e4 arm: Fix wrong function comment
Change-Id: Ifd977289c92d3c88ee2ca93dd964307372d49ca0
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-31 21:28:23 +00:00
Dmitriy Korovkin
8d76b7b083 arm: Disable unaligned access traps
GCC enables unaligned memory access for ARMv6 and above.
Once unaligned memory access is allowed, there's no need
for the unaligned memory access trap.

The change prevents the situation when the compiler
generates code that uses unaligned memory access, but
the CPU generates an exception when this code runs.

Change-Id: Id33f2264c631772e5c561e76fb579d8b7bc26e1e
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-31 21:28:23 +00:00
Andre Guedes
6e71586c37 i2c: qmsi: Add support for default configuration
This patch extends the i2c shim driver so it supports the 'default
configuration' infrastructure which enables the user to specify a
default configuration for the I2C device. The default configuration
is set during driver initialization.

This patch also changes Quark SE and D2000 Kconfig.defconfig files so
the i2c default configuration is set to '0x12' which means standard
bus speed, 7-bit addressing and master mode. This is the same value
used when DW driver is selected, by the way.

Change-Id: I06e0dc3c29e8da2f3317db5bef285177f2e92c9a
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-31 13:18:26 +00:00
Daniel Leung
0761a1da87 samples: enable sanity check of I2C driver on Arduino Due
This adds the necessary tags to enable building the grove_lcd and
i2c_fujitsu_fram sample apps, so that the Atmel SAM3 I2C driver
will be built to test for build breakage.

Change-Id: I4adfb6336e82a6d407bbd5e9888c27d5f6bc5be1
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 11:47:01 +00:00
Johan Hedberg
cfe54794f2 Bluetooth: tests/shell: Add some help text
Change-Id: I09cdec8c710120219412eccf69ba25e95679ecfb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-31 08:02:22 +03:00
Johan Hedberg
a27641b1c5 Bluetooth: samples/README: Fix sanitycheck references
Change-Id: I6e54a80de1f9a95f7b22ee2213e764ed93c495b2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-31 07:57:23 +03:00
Daniel Leung
cb83db8c74 i2c/dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and should not be
configurable via kconfig.

Change-Id: Ia62888838877da4627419bd36c261d5254761acd
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 01:11:23 +00:00
Andrew Boie
c73a42bccc x86: irq: fix _get_dynamic_stub() calculation
It wasn't correct to add the size of the long jump instruction
as it *replaces* a short jump instead of just being after it.
So redefine this to be the difference in size between these
two instructions.

Change-Id: I65be2afab19d9cd8b096551acde0156f0503df87
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-30 22:24:16 +00:00
Yannis Damigos
560e6a3cf4 tests: kernel: test-fifo: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test_nano to compile on boards like
nucleo-f103rb and arduino 101 sss. Sanitycheck script passes
all test for test-fifo.

This patch was verified on the emulated platforms and not against
real hardware boards.

Change-Id: Icf30c4056d9f9ebdc82c100305bf761e49b64491
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-30 22:21:25 +00:00
Andre Guedes
3f9d4752c6 doc: Add returning code conventions
Zephyr now uses codes from errno.h as the standard returning code for
all APIs. Since some code usages can be confusing or ambiguous, this
patch documents the conventions we are using to keep the returning code
usage consistent.

The document is based on the current mapping we have in device.h.

Change-Id: Ie6f429602592be8572631e34ae65435530a05b9f
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-30 20:03:17 +00:00
Andre Guedes
3c01cc6cff i2c: Remove redundancy in Kconfig.qmsi
Each option within Kconfig.qmsi already set its dependency so this
patch removes the 'if I2C_QMSI' block since it is redundant.

Change-Id: Ic221b96766ecac685491cb31525caf28e641ee45
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-30 20:03:02 +00:00
Yannis Damigos
f004330589 tests: kernel: test-lifo: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test to compile on boards like
nucleo-f103rb and arduino 101 sss.
Sanitycheck script passes all test for test-lifo.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: I1dd514c9d273bcf490e0eb4f1fadee1a8a94bcc5
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-30 20:02:54 +00:00
Tomasz Bursztyka
1de33f4d5f gpio: dw: ISR handler should acknowlegde only current interrupts
Current interrupt status tells which pins triggered this interrupt, thus
the handler should acknowledge only these and not all possible, since we
don't know if other gpio controller interrupts are being taken care of
at the same moment.

Change-Id: I7d3f1bb13bb293f7b7ce9b5a717a37bbdd4e4e42
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Vlad Lungu <vlad.lungu@windriver.com>
2016-03-30 16:19:39 +00:00
Baohong Liu
3d7ef48a95 drivers: AON counters: Move interrupt setting to SOC Kconfig
These interrupt settings are SOC specific. So, move them to the
SOC level of Kconfig.

As IRQ priority is fixed in D2000, changed the value to 0 to
make it consistent with what other shim drivers are using.

Change-Id: Id20bed46c478a7555ae976e3a3063ba2cb099788
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-03-30 16:18:05 +00:00
Anas Nashif
2d56cf9f24 quark_d2000_crb: improve binary flashing speed
This will improve the speed when flashing an image to the board:

before:

 downloaded 4936 bytes in 7.982860s (0.604 KiB/s)

after:

 downloaded 4936 bytes in 4.486743s (1.074 KiB/s)

Change-Id: I0209d53ba15dbf8e3f16e2d3675a35b58342776a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-30 14:04:49 +00:00
Daniel Leung
e539888614 i2c: remove orphan kconfig I2C_STATUS_DELAY
No one is using it so remove it.

Change-Id: I79f19a7a9a784465d68a0fe85fe9f815279a240d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-30 13:39:09 +00:00
Daniel Leung
8563a5178d aio_comparator/dw: base address to be defined by SoC
This is hardware design so there is no need for it to be
configurable in kconfig.

Change-Id: Iff162f330aae8ef9a7139b6e7ed9bfa87f26189a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-30 13:39:04 +00:00
Daniel Leung
32c6d97922 console/uart: remove duplicate default value for parent UART dev
There is no need to re-define CONFIG_UART_CONSOLE_ON_DEV_NAME to be
"UART_0" all over the place as its default is "UART_0" already.
So remove those duplicate defaults.

Change-Id: Ia86e26b8f90540fdbd7dcb3358d6dac352648b21
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-30 13:38:58 +00:00
Daniel Leung
8f6068e9d8 serial/ns16550: make IRQ triggering condition a SoC decision
The IRQ triggering condition should be specified by SoC as it is
a decision for hardware design. This should not be configurable
in kconfig.

The default is to be triggered on rising edge, just as the same
old kconfig did.

Change-Id: If59d88a30711eb8e03d9cc4f409055cefe1995c5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-30 13:38:34 +00:00
Daniel Leung
26b474c987 serial/ns16550: reduce number of kconfig options
Moves those kconfig options which should be declared in
SoC or board header files instead. These are the one
that are tied to SoC or board and there is no need
for them to be configurable in kconfig.

Change-Id: I243d634f1a4a11dc8dc3530d95f93371015492b7
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-30 13:38:34 +00:00
Andrei Emeltchenko
808b4c6230 Bluetooth/shell: Fix wrong memory access
The extended inquiry response data format include at least two octets:
length and type, so adding NULL termination name shall be 240-2+1
octets.

Fixes accessing wrong memory in the statement below:
...
memcpy(name, &eir[2], sizeof(name) - 1);
...

Change-Id: I71be96aed6af63d0649f4d64271208eeb11e2c6c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-30 11:07:33 +00:00
Anas Nashif
e444363cb9 sanity: add quark_se_devboard to tested boards
Change-Id: I82cefb1baaa0c7174cebcd35c527fec3d133241e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-30 11:04:36 +00:00
Yannis Damigos
9d6e0cebed Bluetooth: tester: Fix typo
Fix typo in tests/bluetooth/tester/testcase.ini

Change-Id: I4a2d93cdf709028bc491aa933d1a5819d62afcff
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-29 17:32:17 +00:00
Mariusz Skamra
4800266cc6 drivers/console: Fix flush data on uart_pipe_setup
This patch fixes drain of data left in UART Rx fifo.
uart_irq_tx_ready checks if Rx IRQ has been raised,
but because Rx IRQ is disabled this won't work even
if there are some data left in the UART buffers.
So simply uart_fifo_read is used to discard the data that
left in UART buffer.

Change-Id: I17f145ba58640650bafd3602412fc75229f39664
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-29 16:41:50 +00:00