Commit graph

18591 commits

Author SHA1 Message Date
Andrew Boie
bd7d71efdc arm: remove SW_ISR_TABLE_STATIC_CUSTOM
This config option is no longer implemented and doesn't actually
do anything.

Change-Id: I57ab7ba688f57da21f8a58f62ea37dc6b8daaf18
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-08 09:58:20 -08:00
Andrew Boie
5415d945f8 arm: move irq_vector_table to common location
We don't support hard-coding vectors in this table anymore.
If someone really wants to do this, they can set
IRQ_VECTOR_TABLE_CUSTOM and define their own.

Change-Id: I45f49782ba5fefb0a02eab02ec96efd0019bc6d5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-08 09:58:20 -08:00
Maciek Borzecki
9d61f61453 clock_control/Kconfig: fix quark_se dependencies
Fix dependencies for external and sensor clock device names in
clock_control Kconfig.

Change-Id: I708f025cf3ce97bcd003754fb5b395712d203107
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-03-08 16:47:48 +00:00
Szymon Janc
6116d58b02 Bluetooth: Use bt_auth_cancel for pairing cancel
bt_auth_cancel can be used to cancel any type of pairing.

Change-Id: Ia1a6ba834186ab6d5082d3eb473319c2d70cf4a7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-08 15:38:59 +00:00
Andre Guedes
eeec6088aa samples: uart: Test irq-based APIs
This patch extends the uart sample so the same functionality (write
buffer, read char then write buffer again) is implemented using
irq-based APIs.

Change-Id: Iefb14dae2b253f90da64ccef8c123619ed494aca
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-08 14:21:40 +00:00
Yannis Damigos
31100d1a61 samples:philosophers:Reformated 80-column width, 80-chars tabs
This patch reformats philosophers sample to fit in 80 columns
with 8-char tabs. It also fixes other coding style issues
reported by chechpatch.pl script with -f option.

Change-Id: Ie7ed59db4e67e279a26000247a1838221ac37cd3
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-08 13:54:53 +00:00
Szymon Janc
1b0e961ef2 Fix uart_pipe_send documentation
This function doesn't return number of bytes sent but error code.

Change-Id: Ife5e4d3957226ce2b4283b5d229095db2ac375dc
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-08 13:53:26 +00:00
Andrei Emeltchenko
2ff3e1b580 drivers/nble: Rename gatt_discover to gatt_private
Change-Id: I643ae9c5468fac86ce5cb259609dd42365d67bb3
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-08 11:48:05 +00:00
Andrei Emeltchenko
76ce7d67e9 drivers/nble: Rearrange header includes
Rearrange headers so that internal header files gap_internal.h and
gatt_internal.h do not source headers, they are included in *.c files.

Change-Id: I6450ab90eec1b450ee8a138da2ed72b8aaeaf616
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-08 11:47:35 +00:00
Luiz Augusto von Dentz
018709de1c Bluetooth: Add indication support for peripheral sample
This adds indication support for one characterist of the vendor service
so it can be used to test bt_gatt_indicate API.

Change-Id: Ief058c93caf3e30972eca920c050451f6120543b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-08 11:46:45 +00:00
Luiz Augusto von Dentz
7ea6a2e64a Bluetooth: L2CAP: Add more descriptive documentation
This documents more in detail the behavior of the API, what callbacks are
involved and when they are called, etc.

Change-Id: I62994ed09a9e8b3f14dc3f8c792469a93aeefabc
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-08 11:44:43 +00:00
Andrei Emeltchenko
a49f3058d9 drivers/nble: Remove unneeded forward declaration
Change-Id: I79bf15eee2206faf6a1c4d067f79d09c2f8ec66f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-08 11:17:38 +00:00
Andrei Emeltchenko
bef9fb8189 drivers/nble: Update RPC to Nordic BLE chip
Update RPC functions and data types, works with NBLE firmware
niko-0301

Change-Id: I3538fab1d20c6e140d995a797d68486be6cd0f23
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-08 10:57:03 +00:00
Roger Lendenmann
6b08b37905 Bluetooth: Fix latency versus timeout check
As per 7.8.12 the check on timeout (time unit ajdusted) must be:
timeout * 10 > (1+latency) (max * 1.25 *2).

Change-Id: I0181b3ab2e1ad38bce9312b6bd83e49082d49024
Signed-off-by: Roger Lendenmann <roger.lendenmann@intel.com>
2016-03-08 10:56:34 +00:00
L.S. Cook
9b1bd225ec doc: Edit microkernel_fifos for consistent .rst style and formatting.
Making all the files in this section consistent with :dfn: in the intro
paragraph, API headings, present-tense verbs in APIs, parallel wording.

Change-Id: I5259c443076b1ac6602352dab42d35d5aca6e5b5
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-08 00:44:26 +00:00
L.S. Cook
fd2c760593 doc: Edit microkernel_mutexes.rst; add ReST syntax, clarifications.
Making all the files in this section consistent with :dfn: in
the intro paragraph, API headings, present-tense verbs in APIs.
Clarified paragraphs on priorty-bazed waiting and priority
inheritance.

Change-Id: I26cc49926bc49c9c68300b6249aeb52c1be33625
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-08 00:42:12 +00:00
Daniel Leung
b3dcd612da doc: arduino_due: explain how to build the bossac tool ...
... plus some other minor changes.

Change-Id: I41d304bd8f758641e7fa52f082508d43ff40511a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-08 00:41:32 +00:00
Andre Guedes
2efffac34f rtc: Fix Kconfig
This patch fixes the RTC_DW configuration option. DesignWare and QMSI
drivers shouldn't have any dependency from each other. All driveris
are following this policy, but the RTC.

Change-Id: Ic6bdef492d26978aa875c54d41ef39d407ddf4e1
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-07 20:04:33 -03:00
Dmitriy Korovkin
41e55f13ad Kconfig: CPU_MIGHT_SUPPORT_CLFLUSH removal.
Remove CPU_MIGHT_SUPPORT_CLFLUSH as excessive.

Removal the flag requires adding per-SoC cnfiguration,
as some Quark models support clflush instruction, but
some do not, even on compiler level.

Change-Id: I655cba00c629db55d1813c199a2fe08b2d60ef4f
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-07 20:25:22 +00:00
Dmitriy Korovkin
287d16d83f x86: Fix cache flush code dependencies
Rearrange the source code in order to place functions
depending on clflush support detection into the proper
section.

Removed dependency between CACHE_LINE_SIZE_DETECT and
CLFLUSH_INSTRUCTION_SUPPORTED or CONFIG_CLFLUSH_DETECT.

Change-Id: I62ba5199763ed16c71f1d2fa372f6cc99b303e6a
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-07 20:25:22 +00:00
Baohong Liu
fd2a57eb36 boards: arduino_101 : Enable SPI Flash
Enable support for WinBond W25QXXDV SPI flash on
arduino 101 platform.

Change-Id: Ia4dc73f956f79c6a56a31bc3dfca4e5298447742
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-03-07 19:08:03 +00:00
Baohong Liu
f3da05f4cb drivers: WinBond SPI flash support
SPI flash sub-driver to support WinBond SPI flash.
It is based on the generic flash driver framework.

Change-Id: I58202e38445a052fa0556b03f854e75ef836e2dd
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-03-07 19:07:50 +00:00
Mariusz Skamra
9e5854c16c Bluetooth: tester: Refactor adding attributes to the GATT database
This patch makes adding attributes more clean.
Attribute UUID and user data are now added along with the attribute
in gatt_db_add function. Thanks to that, some static variables have
been deleted, and the code is more readable.

Change-Id: I510bd7a1a9ae0210dd90520212a340ee1a3b2b53
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-07 18:21:52 +00:00
Szymon Janc
7148aa5422 Bluetooth: SMP: Add support for debug ECDH keys
This add following handling of LE SC debug keys:
- if debug keys are disabled locally generated public/private keys
  is  checked to not match debug keys by accident
- if debug keys are enabled those are used as local public/private
  keys pair allowing sniffing of encrypted air traffic
- tracking of remote device using debug keys
- debug keys are discarded after disconnection regardless of bonding
  flag being set or not
- due to HCI interface limitation debug keys are not supported for
  HCI based ECDH and compilation error will be rised for such
  configuration

Change-Id: Ie147b1893c4a6b9542b4d2c261973a7acbd8de96
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-07 18:21:10 +00:00
Luiz Augusto von Dentz
68ee16d85c Bluetooth: GATT: Add bt_gatt_indicate
This uses ATT Indicate Value command to indicate changes and wait for
confirmation response.

Change-Id: I123a00e374929d779f96a02440215c32c0e79423
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-07 16:44:15 +00:00
Baohong Liu
29c8f95ec4 drivers: framework for a generic flash driver
The framework for a generic flash driver.

Change-Id: I030eb6d88338f4d6611fc6e5cae42ac586cfdb12
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-03-07 16:13:15 +00:00
Anas Nashif
e81053ee03 samples/tests: remove old message about standard security
Change-Id: I52bb6731a8c7b2c3ba38b867ac57ff82332ae7f2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-07 16:07:35 +00:00
Luiz Augusto von Dentz
468ed2e989 Bluetooth: ATT: Handle Confirmations
This adds the callback necessary to parse Confirm PDU:

< ACL Data TX: Handle 3585 flags 0x00 dlen 8
      ATT: Handle Value Indication (0x1d) len 3
        Handle: 0x001d
          Data: 00
> ACL Data RX: Handle 3585 flags 0x02 dlen 5
      ATT: Handle Value Confirmation (0x1e) len 0

Change-Id: I870058150f27718541eae959dcd5d9d7c6414ad3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-07 15:50:18 +00:00
Shaul Triebitz
74e8445003 pci: Fix PCI header initialization
The arguments to memset in pci_header_get were passed in the wrong
order, causing the memset to be a no-op. Fix this.

Change-Id: I1ea6d7d87d74cff6fec9bbc88c99a4b0e460cc95
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
2016-03-07 15:29:00 +00:00
Jukka Rissanen
371542780d net: contiki: Print prefix information properly when debugging
Change-Id: Ifbe2aa30477a192f8dd48f51154b0b035ac0b36c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-07 11:06:42 +00:00
Jukka Rissanen
b1f2593a58 net: contiki: Fix debug prints for ICMPv6 echo request and reply
Change-Id: Ibf0c153f07af19868d89937dd1674da9d6348f95
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-07 11:06:42 +00:00
Jukka Rissanen
e9d0bbb984 net: 802.15.4: Do not print anything when packet is discarded
If the received packet is discarded either if it was not meant
for us or it was malformed, then do not print anything.
This helps in an environment where there are lot of traffic
in the network.

Change-Id: I8db8dcec472ccceb9ba8b6cb7cee6c5f13ee34f0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-07 11:06:42 +00:00
Andrei Emeltchenko
920a5b1030 Bluetooth: Increment start handle with next discovery
Next discovery for primary and secondary services shall start from the
next handle.

Change-Id: I8bc7ccd9a84848d75b2d9ef0484429599b0c750f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-06 07:13:56 +00:00
Luiz Augusto von Dentz
5d43dfd704 Bluetooth: L2CAP: Handle of Reject command
This handles Reject command which currently only affects pending
Connection Request where the remote may actually respond with Reject
when it is not implemented.

Change-Id: I0095259230955ee7dd605fad9339a7b5e8f1611b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-05 19:43:37 +00:00
Andrei Emeltchenko
ba169c5819 drivers/nble: Implement NBLE GATT discover response
Implement GATT nble_gattc_disc_rsp() function, may be tested with
bluetooth shell app.

Change-Id: I80c9596e83310902de40f6e91d2ecd4b5d2f3292
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-05 19:42:00 +00:00
Sergio Rodriguez
b47df6e800 adc: QMSI ADC driver
This creates the QMSI ADC driver which is simply a shim driver based
on the ADC driver provided by QMSI BSP.

In order to enable this driver, the following options should be set:
CONFIG_QMSI_DRIVERS=y
CONFIG_QMSI_INSTALL_PATH="/path/to/libqmsi/directory"
CONFIG_ADC=y
CONFIG_ADC_QMSI=y

Optionally this can be set:
CONFIG_ADC_IRQ
CONFIG_ADC_PRI
CONFIG_ADC_QMSI_POLL
CONFIG_ADC_QMSI_INTERRUPT
CONFIG_ADC_QMSI_CALIBRATION
CONFIG_ADC_QMSI_CLOCK_RATIO
CONFIG_ADC_QMSI_SERIAL_DELAY
CONFIG_ADC_QMSI_SAMPLE_WIDTH

Origin of the file: This file has been created from scratch

Change-Id: Ie04776ac2ed88e56852409070edec568974f8e0d
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-03-05 18:22:32 +00:00
Sergio Rodriguez
d8910a419b pwm: QMSI PWM driver
This creates the QMSI PWM driver which is simply a shim driver based
on the PWM driver provided by QMSI BSP.

In order to enable this driver, the following options should be set:
CONFIG_QMSI_DRIVERS=y
CONFIG_QMSI_INSTALL_PATH="/path/to/libqmsi/directory"
CONFIG_PWM=y
CONFIG_PWM_QMSI=y

Optionally this can be set:
CONFIG_PWM_QMSI_NUM_PORTS=Number of ports available, default is 1

Origin of the file: This file has been created from scratch

Change-Id: Icac90154d020babca1c11147056a3438b84b0d3f
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-03-05 18:22:03 +00:00
Daniel Leung
e643cede3a uart: add ISR callback mechanism for UART drivers
The peripherals utilizing UART were required to register their own
ISR rountines. This means that all those peripherals drivers need
to know which IRQ line is attached to a UART controller, and all
the other config values required to register a ISR. This causes
scalibility issue as every board and peripherals have to define
those values.

Another reason for this patch is to support virtual serial ports.
Virtual serial ports do not have physical interrupt lines to
attach, and thus would not work.

This patch adds a simple callback mechanism, which calls a function
when UART interrupts are triggered. The low level plumbing still needs
to be done by the peripheral drivers, as these drivers may need to
access low level capability of UART to function correctly. This simply
moves the interrupt setup into the UART drivers themselves. By doing
this, the peripheral drivers do not need to know all the config values
to properly setup the interrupts and attaching the ISR. One drawback
is that this adds to the interrupt latency.

Note that this patch breaks backward compatibility in terms of
setting up interrupt for UART controller. How to use UART is still
the same.

This also addresses the following issues:

() UART driver for Atmel SAM3 currently does not support interrupts.
   So remove the code from vector table. This will be updated when
   there is interrupt support for the driver.
() Corrected some config options for Stellaris UART driver.

This was tested with samples/shell on Arduino 101, and on QEMU
(Cortex-M3 and x86).

Origin: original code
Change-Id: Ib4593d8ccd711f4e97d388c7293205d213be1aec
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-05 13:37:57 +00:00
Daniel Leung
f8bf86c95f uart: serial_ns16550: exclude driver data variables under #ifdef
Not all of the variables defined in the driver data structure are
required. So put some #ifdef around them.

Change-Id: I08a0c02d9e5c6885d9b4d6237446bdb9b98f3bfa
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-05 13:37:48 +00:00
Daniel Leung
10e64e4457 samples: an app to use the APDS9960 RGB and Gesture sensor
This adds an app to get the RGBC values from the APDS9960 sensor,
and drives one APA102C with those values. The app works on the ARC
side of Arduino 101.

Change-Id: Iaee7bd11c06b03cf3c69f8ccb84cdb649634bb6c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-05 13:36:59 +00:00
Daniel Leung
a702e6f5d8 i2c: i2c_atmel_sam3: meet minimum timing requirements
The I2C has minimum timing requirements for clock signal.
This patch adds the code to make sure the minimum timing
requirements are met.

Change-Id: I3f148433e60be73866577fbe614b892481d7f69d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-05 13:36:02 +00:00
Daniel Leung
94cb883140 i2c: i2c_atmel_sam3: tweak the transfer flow for NACK and STOP
() Fixed an issue where STOP would be sent twice when a read message
   is only 1 byte.
() Skip resetting the controller when NACK is received. This is not
   an issue with the controller, so there is no need to reset
   the controller and its state machine.
() Cosmetic changes to trim lines > 80 characters.

Change-Id: If2c3b2728b3f088f7aa1fcaa6d2303ff5c4c197d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-05 13:36:02 +00:00
Anas Nashif
11e268de9a Zephyr 1.1.0
Change-Id: Ib29996cadfaeb977c16a30ae828732f316791e1f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-05 06:57:40 -05:00
Anas Nashif
b2b9cdddc6 sanitycheck: updated footprint numbers
Change-Id: If73457fac32edf1b2e1b4192c6f266a050bbb6be
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-05 06:57:32 -05:00
Ramesh Thomas
58d71d4efb power_mgmt:sample:Power Manager application
Sample implementation of a power manager app that uses the zephyr
power management infrastructure. This app demonstrates use of the
hooks to implement Low Power State and Tickless idle power saving
policies.

Tested on quark_se.

Origin: Original
Change-Id: I10207014f2a844374b4c7a1c0ed50f2fb5c3c440
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-03-05 03:09:53 +00:00
Johan Hedberg
0efd558cbc SPI: Change read/write buffer pointers to void *
There's no reason to require callers to cast their data to uint8_t *
when the data might e.g. originate in a packed struct or some other
data type. Instead, be nice to callers and let them use any pointer
they want. Additionally, declare the TX buffer as a const pointer so
unnecessary typecasts aren't needed for that either (if the data
originates in a const location).

Change-Id: I1482ca4e350b5a7fbda6871ed9f54f255af3aa9e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-04 20:13:21 +00:00
Johan Hedberg
8708b73c65 drivers/spi: intel: Fix typo in DBG log
This log is in spi_intel_configure, not in spi_intel_transceive.

Change-Id: I5d62dd63d0cfa2c86f2dd5f9a6d367b7ad47b355
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-04 20:13:21 +00:00
Johan Hedberg
7c5563fd3a drivers/spi: dw: Fix unaligned access
The buffers aren't guaranteed to be aligned so that they're always
aligned for uint16_t or uint32_t data. Use the available unaligned
access macros to read/write the data.

Change-Id: Ie87c108aa370af196b9c759b59ed7fb9d1ed6183
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-04 20:11:57 +00:00
Johan Hedberg
62fc555c88 include: Remove UNALIGNED_READ & UNALIGNED_WRITE
These were not actually used anywhere and weren't correct (at least
not the READ variant which assumed the architecture can always deal
with unaligned access).

Change-Id: If2bee24dc729683c839bb631d411eab73498adad
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-04 20:11:57 +00:00
Johan Hedberg
1d5f1cd6c9 include: Add UNALIGNED_PUT helper
Provide a helper to perform safe unaligned writes to data.

Change-Id: I00edde580d2ef93daaf7825d333d38fc10f854ac
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-04 20:11:56 +00:00