Commit graph

19237 commits

Author SHA1 Message Date
Chuck Jordan
95dd06737f arc: Adding EM11D SOC
EM11D is a ARC CPU configuration that can be selected for the
ARC EM Starter Kit. The board support for this board will be
submitted separately to expidite review.

Change-Id: Ifc4d48e1f5e01d44d1706e6426bd3b2d77ebe2f8
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-23 23:48:00 +00:00
Chuck Jordan
aa9d180309 arc: Adding ARC EM Starter Kit board support
Board support for the ARC EM Starter Kit provides for a board
that can select one of two SOCs. The EM9D and EM11D commits
will be done separately to expidite review. Also submitted here
is doc/board/em_starterkit.rst to explain details about this
Zephyr board choice.

Change-Id: Icd9fac045c700ad8dcb95161fdd63c130f665778
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-23 23:36:33 +00:00
Chuck Jordan
7bfe11b3e1 arc: Adding EM9D SOC
EM9D is a ARC CPU configuration that can be selected for the
ARC EM Starter Kit. The board support for this board will be
submitted separately to expidite review.

Change-Id: I2c85bdab6ea7bfb257e94e4c72b11b4568dbac19
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-23 23:18:36 +00:00
Anas Nashif
489f42328c qmsi: move drivers and hal to ext/hal
This is external source code maintained somewhere else. Put it
under ext/ for clarity and maintainability.

Change-Id: I9e7c9d0948a2ba893006e316dc21d9b1a9edfa93
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:32:30 +00:00
Anas Nashif
59b34a37d8 uart: use qmsi driver for quark_se sensor subsystem
Move away from native driver and use the UART driver provided
by QMSI.

All peripherals on Quark MCUs will use QMSI drivers developed
specifically for Quark and optimized for this MCU line.

Change-Id: If4e27f38736849ea3e12c269886e2a03d957b671
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:32:20 +00:00
Anas Nashif
613304c95d uart: qmsi: do not include ioapic.h on non x86 systems
Change-Id: If3d63ec04003fbe97f4b981d9220bc6a8ba3e8f0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:32:10 +00:00
Anas Nashif
c6343f5271 apds9960: Fix reference to i2c driver
Also make the CONF_FILE  variable overridable

Change-Id: I44251cfd66648a665ff04dfcd38e750c24af5734
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:32:01 +00:00
Anas Nashif
229980f33c adc: quark se: Add QMSI 1.1-based ADC shim driver
Change-Id: I330be6ae1fa16d66bfca0c2ae36664fc9c6d080d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:31:51 +00:00
Anas Nashif
9739d11125 quark_se: i2c: use qmsi i2c driver
Now that we have QMSI sensor subsystem drivers, lets use them.

Change-Id: Icd301b6c044280b5b25d719b6dcc16d556a2ea8d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:31:41 +00:00
Sergio Rodriguez
92e9ffe481 i2c: quark se: Add QMSI 1.1-based I2C shim driver
Add I2C QMSI shim driver for sensor system based on QMSI 1.1

Origin: Original
Change-Id: I9c8efe49e8e9b7a5f8496fa49beb68e409148be7
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:31:27 +00:00
Anas Nashif
862cff1eab quark_se: gpio: use qmsi gpio driver
Now that we have QMSI sensor subsystem drivers, lets use them.

Change-Id: I1340ba8930fc8676f7b706540a105250ce3e51b9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:31:16 +00:00
Baohong Liu
2ddfe381b8 gpio: quark se: Add QMSI 1.1-based GPIO shim driver
Add QMSI 1.1 based GPIO sub-driver for sensor system.

Origin: Original
Change-Id: Ida5565a5911eb55651a11a4ac0b240c624f8e1ca
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:31:05 +00:00
Anas Nashif
1619e264dd quark_se: spi: use qmsi spi driver on sensor sub-system
Now that we have QMSI sensor subsystem drivers, lets use them.

Change-Id: I1776178ad6fb984d6e293dbfa8bb1d718e4c2566
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:30:53 +00:00
Baohong Liu
35633586f2 spi: quark se: Add QMSI 1.1-based SPI shim driver
Add SPI sub-driver for sensor system.

Use SPI irq number definitions already in Zephyr header file.

Origin: Original
Change-Id: I215db3acc535093dd75c0817cbe5af77e6e76e16
Signed-off-by: Baohong Liu baohong.liu@intel.com
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:30:43 +00:00
Anas Nashif
f7c5820f28 quark se: build sensor subsystem files
Change-Id: I4490823450dd5fab0c04bece9e61481958ab3843
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:30:25 +00:00
Anas Nashif
f35d6e04e3 qmsi: update qmsi to 1.1 alpha
Change-Id: Ib35ebcb32954f764ef8e33f6a1c11ad9f63931bc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:30:04 +00:00
Fabrice Olivero
9cceb8c627 samples/task_profiler: fix #if to #ifdef
Change-Id: I6b0f6f14cab6df99c3bfe82062732e9f1eeef2bd
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-05-23 21:28:12 +00:00
Fabrice Olivero
f9f606b641 samples/task_profiler: disable UART0 on galileo to fix crash
On galileo, UART_0 IRQ is incorrectly mapped to IRQ 0
UART_0 IRQ should be mapped to IRQ 17 (same as UART_1 IRQ)
but NS16550 driver doesn't support mapping same IRQ for
different devices.
This is creating crashes when dumping profiler data on UART
CONSOLE (UART_1) with UART console enabled (UART in interrupt
mode)

This patch is disabling UART_0 in sample apps and adding a note
in the README file

This problem appeared due to following commit:
e643cede3a uart: add ISR callback mechanism for UART drivers
Since that commit, UART driver is setting the ISR for all
UART device instances when interrupt mode is enabled

Change-Id: Ic9d0207e5e5c7e3d8e8a8bf90f3132801bc6c2b1
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-05-23 21:28:09 +00:00
Fabrice Olivero
8a1c4e642b samples/task_profiler: add RTC/counter support as timestamp
On Quark SE, using system timer as event timestamp creates
inconsistencies since the timer is handled by software in
timer_int_handler and tickless_idle_exit. So timestamp does not
reflect timing of certain events like timer IRQ.

This patch introduces the usage of RTC or AON counter as kernel
event logger timestamp

Change-Id: I070254446dd98dd448e119892c34abf12efca719
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-05-23 21:28:04 +00:00
Fabrice Olivero
128dcbbe13 kernel event logger: add possibility to use custom timestamp
By default, kernel event logger is using the system timer. But on
some platforms where the timer driver maintains the system timer
cycle accumulator in software, such as ones using the LOAPIC timer,
the system timer behavior leads to timestamp errors. For example,
the timer interrupt is logged with a wrong timestamp since the HW
timer value has been reset (periodic mode) but accumulated value not
updated yet (done later in the ISR).

This patch is adding the possibility to register a timer callback
function that will be used by the kernel event logger. For example,
on Quark SE, this allows using RTC or AON counter which accuracy is
sufficient and behavior more straight forward compared to system
timer.

Change-Id: I754c7557350ef29fc10701e62a35a5425e035f11
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-05-23 21:27:49 +00:00
Caio Marcelo de Oliveira Filho
e450b2db00 build: use export to pass CFLAGS to zephyrmake
If CFLAGS have spaces, the existing zephyrmake leaks part of it as
arguments for make. Instead of explicitly setting, just the export the
CFLAGS to make it visible to the inner call to make.

Change-Id: I7b083cbc19a49e8dede39333443c701567d214c0
Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2016-05-23 17:44:47 +00:00
Anas Nashif
60b18711f3 tests: remove duplicate kernel configs and usage of ARCH
Many test configs are the same, remove complexity and duplication by
using just one kernel config where applicable.

This removes the usage of ARCH which is a remnant from the days where
we had to specify the architecture of the board, the architecture is now
part of Kconfig and determined basded on the board configuration.

This will also make it easy adding new architectures to test cases without
having to add an architecture specific config file when it is actually not
needed, for example now that we will enable micro-kernel support on ARC.

Jira: ZEP-238
Change-Id: I143fa3c4629c58329cfeb0c761c7a896fc1ef63a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 16:46:08 +00:00
Anas Nashif
f59708b1e5 checkpatch: exclude ext/ from checks
File and directories under ext/ are not original to Zephyr and have
different coding style.

Change-Id: Ie09eb324c35eb6e7be2cc3bcbc6ce6676376e346
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 16:05:42 +00:00
Anas Nashif
92a12a19ae checkpatch: add option for excluding directories
when importing code from external sources, we do not want to fail
on checkpatch and want to run full sanity checks.

Using --exclude <dir> we should be able to exclude a list of well
defined locations in the tree that carry sources from other projects
with other styles.

Change-Id: I7d321e85eed6bc37d5c6879ae88e21d20028a433
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 16:05:42 +00:00
Grzegorz Kolodziejczyk
8c3189c646 drivers/nble: Update service db attributes handle
Attributes should have stored their own attribute handle after
registering service. Handle values are assigned to attributes after
registering service and stack has to copy them.

Fixes:
GATT   TC_GAD_SR_BV_03_C      PASS

Change-Id: I8463340960d663161d0f7990390e60f06a1c7259
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-05-23 16:49:08 +02:00
Mariusz Skamra
92884a7540 Bluetooth: nble: Extend BTP with Identity Resolved event
This event indicates resolved Identity Address.

Change-Id: If3a323c4661697a53b015aab805d990703d6f884
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-23 13:33:55 +02:00
Grzegorz Kolodziejczyk
58339a6c15 Bluetooth: tester: Correct flushed data length
Returned by flush_value function value should be length of data which
are previously prepared by prepare write requests.

Change-Id: Iacfc63527c68cf20a76a4587acc749bd2d00cffd
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-05-23 09:57:44 +00:00
Luiz Augusto von Dentz
7941630e17 console: shell: Add return to command callback
This enable checking for errors and automatically print help string:

btshell> connect
connect <address: XX:XX:XX:XX:XX:XX> <address type: (public)>

Change-Id: Ie097ecddb72ab15bf6192e310d0bd839bfd251d5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-23 11:00:21 +03:00
Anas Nashif
65febf9417 Revert "nanokernel: Add callback to _nano_timeout"
This reverts commit f4465c651c.

Breaks samples/sensor/bmi160/ in Arduino 101:

ipm_console0: 'IMU: Binding...'
ipm_console0: 'Testing the polling mode.'
ipm_console0: 'Gyro (rad/s): X=-0.006517, Y=0.007581, Z=0.011172'
ipm_console0: 'Acc (m/s^2): X=-2.221632, Y=-4.826304, Z=74.965716'
ipm_console0: 'Temperature (Celsius): 31.661555'
ipm_console0: 'Exception vector: 0x00000003, cause code: 0x00000006, parameter 0x00000000'
ipm_console0: 'Address 0x0074006e'
ipm_console0: 'Fatal fault in ISR ! Spinning...'

Change-Id: I3c38ba4795c9996e42816c0581e249c1b5f70bc2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-21 18:28:57 -04:00
Rodrigo Caballero
0ff631ce1f doc: Restructure top level sections.
Restructures the top level sections to ease finding information.

Change-Id: I09de0a0d665fc77dea92797be8ef29970fe8a393
Jira: ZEP-245
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-05-21 21:22:46 +00:00
Bogdan Davidoaia
72786486c6 sensor: remove CONFIG_SENSOR_DEBUG
Remove the CONFIG_SENSOR_DEBUG as it is no longer needed since switching
to SYS_LOG_* in the sensor susbsystem.

Also, use __ASSERT where CONFIG_SENSOR_DEBUG was used to validate
function parameters.

Change-Id: I80ed7209abfb92220fa229d246c5b3a43b887e32
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-05-21 21:20:13 +00:00
Luiz Augusto von Dentz
f4465c651c nanokernel: Add callback to _nano_timeout
This adds a callback to struct _nano_timeout which is called in ISR
context allowing more flexible handling of timeouts.

Change-Id: If837b0b51b24dfffebac6f99f4d66fdf01c164f0
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-21 12:02:57 +00:00
Luiz Augusto von Dentz
21fabb3d39 nano_work: Add nano_work_init
Change-Id: I2e54e3e6ad048ff0d85cbef83e415ad436ecf720
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-21 12:02:57 +00:00
Anas Nashif
b7a72220ea trivial: fix comment style
Change-Id: Iaa1b27f2ac5a01598a044303ba45881ce45b2f4f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-21 11:58:33 +00:00
Anas Nashif
06b663a0d3 quark_se_sss_devboard: fix flashing with openocd
Fixed openocd configuration to accommodate new releases of the hardware

Change-Id: Ic87193c3980f4caf2fec1fdcf79d8bd30dbf4f8c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-21 11:09:05 +00:00
Chuck Jordan
9ae5d7671f arc: adding "all rights reserved" to banner
My boss is asking me to add "all rights reserved" to synopsys banners.

Change-Id: Id74bf3cd0be6bc3159a8b687a37eb11fa3a49f3e
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-20 20:55:21 -07:00
Chuck Jordan
df962d9a0e spi: Stability improvements to the DesignWare SPI driver
I've found many problems with the SPI driver and this repairs many of them.

The baud rate divisor was being derived from the CPU clock. But, some
targets may have a seperate clock attached to SPI. If the soc.h file
defines the symbol SPI_DW_SPI_CLOCK, it will use this instead
of CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC for the baud rate calculation.

completed() had a mistake where it would terminate the SPI transaction
too early, well before the tx data has cleared the FIFO. I found I couldn't
drive an OLED display correctly because completed() was wrong.
The repair is to now consider a new flag called spi->last_tx,
which will be set after the TX interrupt occurs with nothing to send any
longer. There is also a while loop added to SPIN until BUSY drops.

Another improvement is that push_data will NOT consider RX fifo size
if there is no RX going on. The calculation here when RX is going on
could go negative. I've added a check for that and prevent TX handling
if RX buffer is full. I think that is the intention -- to deal with RX first
if its fifos are more full.

In spi_dw_transceive, if we are only doing spi_write w/o reading,
don't enable RX interrupts at all. The OLED I'm working with failed
to have a pull-up on MISO SPI signal. As a result, a huge number of
garbage RX events arrive, and the interrupt handler finds there is
no rx buffer, so it tosses the data. But this is a waist of realtime.
It seems WRONG to enable RX interrupts if its something your not using,
so software can GATE these spurious events in this way.

With these changes, SPI can be used much more reliably, with FIFOs
that are deeper, and SPI devices that only require TX.

Change-Id: I0fe0745f2381c61c8a19ce086496b422a32a30a5
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-21 00:48:16 +00:00
Anas Nashif
c9762dbfba build: add more dependencies to build process
This is to recreate the offsets.c file when configuration has
changed

Change-Id: Idde9e290ac9b008a603c4652164bc9f42596e1cc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-20 18:25:19 +00:00
Geoffroy Van Cutsem
3c40c4eaaa doc: fix Arduino 101 documentation formatting issues
Fix a few small (mainly rendering) issues with the arduino_101.rst
document:
- A few paragraphs had the wrong indentation
- A sub-list did not appear as such (serial port settings)
- Remove the 'Bibliography' section which appears empty
- Fix IO-3 and IO-5 pin names in note

Change-Id: I60ad839de1901167b6793254186836015502aaab
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2016-05-20 16:18:38 +00:00
Anas Nashif
b8de79239f samples: Use GPIO_0 as the default instance
Change-Id: Ibe9d0add007487cd47fd2a26df992ff9614883b3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-20 10:54:06 -04:00
Luiz Augusto von Dentz
39a4b17f3b console: shell: Print empty string if no help is passed
Change-Id: I5469ea18e878b6053caa911350426853477b8a6a
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-20 16:08:21 +03:00
Luiz Augusto von Dentz
a1094e92d6 console: shell: Add check for command help
This checks if the command string is either NULL or empty since in these
cases there shouldn't be necessary to do any lookup.

Change-Id: I27e6d5b07ab4000cce93a4d1f7952e3c57672657
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-20 16:05:17 +03:00
Luiz Augusto von Dentz
c643b426ac console: shell: Fix use of strncmp
Contrary to strcmp strncmp does not match the entire string only the
initial bytes passed as len thus causing a prefix match not a exact
match logic.

Change-Id: I85f96beb2249223f44c81c4efd6bd01bf2033a2e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-20 16:05:17 +03:00
Grzegorz Kolodziejczyk
f1c5282833 Bluetooth: tester: Fix handling execute write error responses
This patch fixes returning invalid offset, invalid attribute length
error. Error should be set during prepare write and returned in
response to execute write request as error response.

Change-Id: I78c57abc5f6f2fbd4a2c0fbb1ee6532212679a36
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-05-20 11:31:33 +00:00
Andrei Emeltchenko
1be6e1cb7d drivers/nble: Skip not matched UIIDs in GATT discovery
Firmware does not filter by UUID so we need to do this ourselves.

Change-Id: I55808836369194fbc5ea7c35db2c72fcda75e4eb
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-20 11:06:52 +00:00
Andrei Emeltchenko
8d7fb04546 drivers/nble: Add debug uuid print in bt_gatt_discover()
Change-Id: Iaf400c1020cf29df780114428c61f9e91c6aac0c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-20 11:06:35 +00:00
Mariusz Skamra
999c69f23d Bluetooth: Make ES Trigger Setting Descriptor non-writable
This removes optional write permission to the ES Trigger Setting
Descriptor. These setting can be set by application.

Change-Id: Ic62ebd909c10601955e67b38303b8c852971203e
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-20 11:06:26 +00:00
Jukka Rissanen
8bd355c49f net: tcp: Fix the TCP client not sending multiple SYN
TCP client only sent one SYN and if that was lost, the connection
was not initiated correctly.

Change-Id: Iebb0b719a3d01d2e4f56ed911b3ed94643e53941
Jira: ZEP-385
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-20 12:59:08 +03:00
Arkadiusz Lichwa
ade99e7e79 Bluetooth: L2CAP: Handle disconnection request from peer
Adds functionality to clean and release allocated BR/EDR CoC channel
after remote requests to disconnect.

Change-Id: Ie6657b8e72b2958ec79e9a5637f0dddf4bb98a5e
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-05-20 06:54:10 +00:00
Rodrigo Caballero
390bfbab1f doc: Change Freescale to NXP to correct branding.
Jira: ZEP-386
Change-Id: I98909c1d6b07c44ab3733a8da5dc6d467c6482e8
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-05-20 02:09:35 +00:00