Commit graph

99014 commits

Author SHA1 Message Date
Michael LeMay
2684f4472f pci: Add pci_enable_bus_master
This patch adds the pci_enable_bus_master function that enables bus
master access for a PCI device.

Change-Id: I317daac1a613ccfc5a3894332c1a7dbbff05991f
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-05 20:24:38 -05:00
Johan Hedberg
b7ae2f44ad net: Fix enabling both Bluetooth and Networking support
We can't use '=' in net/Makefile since then one statement would
override the value of the previous one when both CONFIG_NETWORKING and
CONFIG_BLUETOOTH were set to 'y'. Instead, use '+='.

Change-Id: Idba9916cc9fb2bd0e53975bdf0a86c0fd184533c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:38 -05:00
Johan Hedberg
49885879f2 Bluetooth: Rename bt_conn_get/put to bt_conn_ref/unref
We want to make the naming convention ref/unref rather than get/put.
So far the only reference counted objects are the buffers and the
connections. For the buffers the new generic buffer API will also use
ref/unref.

Change-Id: I9fe8b8a6a50a8baf06ba231e8f6717a5a47dd292
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:38 -05:00
Luiz Augusto von Dentz
6f410176ef Bluetooth: Make bt_uuid_str parameter const
bt_uuid_to_str uuid param is const therefore bt_uuid_str should be const
as well.

Change-Id: I043d66d16c863ed92e60477dbbb9c37bcde92703
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:38 -05:00
Luiz Augusto von Dentz
48cbd12ffb Bluetooth: Fix UUID 128 bits string format
The two last fields are 32 bits and 16 bits respectively not the other
way around.

Change-Id: I10d2ed9d69229f02b430f9812e95e4a8f3f060c7
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:38 -05:00
Mariusz Skamra
13e0178c55 Bluetooth: Add support for writting characterisitc value
This adds write and flush attribute callbacks to be used for writting
attribute values.
With this patch lower tester can test if IUT can properly handle
write request to the characteristic values.

> ACL Data RX: Handle 64 flags 0x02 dlen 7  [hci0] 1151923.440823
      ATT: Read Request (0x0a) len 2
        Handle: 0x0003
< ACL Data TX: Handle 64 flags 0x00 dlen 7  [hci0] 1151923.456050
      ATT: Read Response (0x0b) len 2
        Value: bbbb
> ACL Data RX: Handle 64 flags 0x02 dlen 9  [hci0] 1151928.435525
      ATT: Write Request (0x12) len 4
        Handle: 0x0003
          Data: ffff
< ACL Data TX: Handle 64 flags 0x00 dlen 5  [hci0] 1151928.456865
      ATT: Write Response (0x13) len 0
> ACL Data RX: Handle 64 flags 0x02 dlen 7  [hci0] 1151929.380796
      ATT: Read Request (0x0a) len 2
        Handle: 0x0003
< ACL Data TX: Handle 64 flags 0x00 dlen 7  [hci0] 1151929.394636
      ATT: Read Response (0x0b) len 2
        Value: ffff

Change-Id: Iea1d39e1a52496692141411251fd4ac2f9ae0b97
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:38 -05:00
Mariusz Skamra
1fa60d7a5e Bluetooth: Fix set value command handler
If the attribute value is going to be changed by the upper tester,
(eg. to issue notification) for simplicity it can be stored in the
place of old one.

Change-Id: I03a6ebbda5d75e6ffa9c2fd6b3c0eab495623a11
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:38 -05:00
Johan Hedberg
79bd18e683 Bluetooth: uart: Remove dead code
There's no point in having a return value for uart_out() if it always
returns the same length that was passed to it. Just make it return
void and remove the error handling code from the caller (which would
never have been run).

Change-Id: I88dab7499a5f526ca65058640021f84e1b3486ca
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:38 -05:00
Andrei Emeltchenko
82f33267c5 Bluetooth: Change fifo_fill to poll_out
The reason why fifo_fill works in qemu but not on real hardware is
that qemu serializes all byte transmission 1 by 1. There is no
real hardware fifo emulated, and "fifo" depth is 1. On real
hardware, the controller owns an internal fifo, with a depth like
8 bytes on Quark x1000. And because of execution flow, how fast is
the controller etc etc... a fifo_fill call might fill in the
internal fifo of 8 bytes and then controller says "I am full"
(which means: "wait for the fifo to have space again"). That's
why poll_out() works: it does the same as fifo_fill and wait
that the internal fifo gets some space again before continuing.
And only when all bytes have been pushed in, it returns.

Change-Id: I452a6ebb2913c5e52ed01d999185e250aa3ed474
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:24:38 -05:00
Michael LeMay
ac00cd4e37 net: Adapt return value from network driver send routine
This patch fixes a potential issue in which the signed return value
from the network driver send routine is returned from a caller that
has an unsigned return type.  The meaning of a negative return value
from the network driver send routine is that an error occurred.  A
return value of 1 means that the packet was sent successfully.  A
return value of 0 means that the packet could not be sent.  Thus, this
patch converts negative return values from the network driver send
routine to a return value of 0 from the caller.

Change-Id: If5cbecb18e514fd976200ecc45782d2a9e1f300f
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-05 20:24:38 -05:00
Luiz Augusto von Dentz
6cb42e1e20 Bluetooth: Make use of bt_uuid_to_str
This make use of bt_uuid_to_str to when printing UUID values, to make it
simpler when it is just going to print so the patch introduces a new
function that does the conversion in place using a static variable.

Change-Id: Idfedf05a5ad201653fff2e01387f046cd5647c83
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:37 -05:00
Luiz Augusto von Dentz
118dc75cea Bluetooth: GATT: Add connection to bt_gatt_notify
This allow sending direct notification to a specific peer without
using CCC which is allowed by the spec:

  BLUETOOTH SPECIFICATION Version 4.2 [Vol 3, Part F page 507
  3.4.7.1 Handle Value Notification

  A server can send a notification of an attribute’s value at any time.

Change-Id: Ieff29216cb9ba197c0da92d7b22b26e63101cfa8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:37 -05:00
Mariusz Skamra
a9bda070d3 Bluetooth: Add missing break statement
Change-Id: I6950edb8dc0dcae4e96dbabd7fa66b03de7c2f92
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:37 -05:00
Mariusz Skamra
83fe7c7d71 Bluetooth: Add BT_ATT_MAX_LE_MTU define
This patch cleans up the code a bit. BT_ATT_MAX_LE_MTU defines
MTU that can be used over LE ATT.

Change-Id: Ie433f33f3bcba3275f51e1bea826bb0fd061c45f
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:37 -05:00
Mariusz Skamra
967776deed Bluetooth: GATT: Add connection authentication check
If attribute requires authentication to be read or written,
we check if current security level (should be BT_SECURITY_HIGH
or higher) allows to perform such operations on this attribute.

Change-Id: Ibba542ac96af00722370eba77d6c929cda520fd8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:37 -05:00
Szymon Janc
a141da9756 Bluetooth: SMP: Use best effort for MITM in Security Request
Always set MITM in AuthReq if local IO capabilities allow it.
This match Security Request behaviour with Pairing Request.

Change-Id: I1734df6661bada296b088cc762a871c443b9e5d1
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:37 -05:00
Mariusz Skamra
d523f0bd66 Bluetooth: tester: Handle set discoverable command
Set discoverable command is used to set the discoverable flags
in advertisement data.

Change-Id: If46a5e05379c5f589afb1658a7b275a82c52e4e1
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:37 -05:00
Mariusz Skamra
e35203e863 Bluetooth: Add Limited Discoverable Flag definition
For limited discoverable mode, we need to have a define
for this advertisement flag.

Change-Id: I774b68546983697844eca2644b0ca0a85b8026e8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:37 -05:00
Luiz Augusto von Dentz
d55e4ca91c Bluetooth: Add CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL
This adds an option to enable L2CAP dynamic channel support, fixed
channels are not affected by it.

Change-Id: If36bece46b7b94142ea1ac976b878d1b5ae6a578
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:37 -05:00
Luiz Augusto von Dentz
4a41da9b38 Bluetooth: Add l2cap-register command to btshell
l2cap-register can be used to register a server:

btshell> l2cap-register 0x0080
bt: bt_l2cap_server_register (0x0011110c): PSM 0x0080

Change-Id: I2c2d9a4cba70b0cddaf352830659d206b609ee63
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:37 -05:00
Luiz Augusto von Dentz
4197aa814c Bluetooth: Refactor fixed channel data
This refactorer fixed channel data so that the channel itself carries
any extra context necessary.

Change-Id: Iea0f29fb7913a29dccdcbef72d92ec4cf4711bf3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:37 -05:00
Szymon Janc
6c82a63e8b Bluetooth: SMP: Use JustWorks if none side requires MITM
From Core Spec Vol 3 Part H 2.3.5.1:
"If both devices have not set the MITM option in the Authentication
Requirements Flags, then the IO capabilities shall be ignored and the Just
Works association model shall be used."

Change-Id: I450f8ab5661382b787fe9742937d47df62fb6cfa
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:37 -05:00
Luiz Augusto von Dentz
30b6a9fe7b Bluetooth: L2CAP: Add initial public API
This split L2CAP API so that server API is available to applications
while the rest of the API is keep internal to the stack.

Change-Id: I031926ff906ce100684fba0947b2e9eb2c8fcaeb
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:37 -05:00
Ravi kumar Veeramally
fb5581fa62 net: apps: Add testcase.ini script for all network samples
Change-Id: Ifb0f8a0b7c91b01b899b4625f489bece5644d652
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:24:37 -05:00
Michael LeMay
aa70d882e3 net: Fix type of ret variable in net_tx_fiber
The ret variable in net_tx_fiber was declared as unsigned but assigned
larger signed values and treated as signed.  This patch fixes that
issue.

Change-Id: I2e33f6115a3defe45f86b5f6c7dc13175ec26827
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-05 20:24:37 -05:00
Ravi kumar Veeramally
8099e8a9c5 net: apps: Add testcase.ini script for sanitychecks
Change-Id: I68270ba870df322b38268092a35e671e9a6a0e19
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:24:37 -05:00
Ravi kumar Veeramally
c6a5eb7e5e net: apps: Change EXTRA_CFLAGS to ccflags-y
Sanitycheck script unable to find EXTRA_CFLAGS label.

Change-Id: I803af86686bb1b5a84b181cf4c016a3b53269e3c
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:24:37 -05:00
Ravi kumar Veeramally
70681f6119 net: Change EXTRA_CFLAGS to ccflags-y
Sanitycheck script unable to find EXTRA_CFLAGS label.

Change-Id: Ic15a70dd385a555b443709d56a7e9a3af1c289cc
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:24:37 -05:00
Ravi kumar Veeramally
f3da8d33a1 net: Remove compile time warning for random number generator
Sanitycheck fails due to compile time warning.

Change-Id: I0b9e95d33e8298a15e09ea2532e335bdc0979d09
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:24:37 -05:00
Anas Nashif
5401ded10b Zephyr 0.6.0
Bump release in makefile and documentation.

Change-Id: I395e3a1caa304f00be5343160b2a62829a66ad46
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:37 -05:00
Anas Nashif
672cb6ba25 Update sanity test results
Run sanitycheck with --release option to generate the numbers for
this release.
This will reset the footprint numbers so that warnings are based on
the latest release numbers.

Change-Id: Ibad9ed4120cd47109eec7a234e70af5b12a2a630
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:37 -05:00
Anas Nashif
4e93f0804b Update .mailmap
Change-Id: I22c920e52c4b36ec544a2521fe03e4ef11933875
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:37 -05:00
Anas Nashif
2ad03b930d define range for FAULT_DUMP config variable
Only allow valid values to be set for this option.

Change-Id: I11dd7381ddbf6d4d9985255b9b784544074aba63
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:37 -05:00
Anas Nashif
f140d6342c console: set range for UART_CONSOLE_INDEX
Catch cases where index is set to negative or wrong values.

Change-Id: Ieab73e0fb12cecfc6c3c3d74c7d41f640bc88f01
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:37 -05:00
Anas Nashif
4ecd250d31 add top level Apache 2.0 license file
To cover all files that do not have a license header.

Change-Id: Ie486ddccd81d84becec8c9e0ffc15ef1f1c74471
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:37 -05:00
jkruger
9f49db54fa ioapic.h: prevent potential compiler warning
Includes device.h to prevent potential compiler warnings due to use of
'struct device *' in _ioapic_init() declaration.

Change-Id: Iabd97c09385044a3742658f66a79be969b62852a
Work-by: Johan Kruger <johan.kruger@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:37 -05:00
mhirst
ff37de7de0 spi: Add static keyword to spi_slave_select()
Adding the 'static' keyword to the inline routine spi_save_select() fixes
the build error when CONFIG_COMPILER_OPT="-O0 -g"

Change-Id: I5234d3d6690ccda3dbd419e13f06c2651d125167
Work-by: Mike Hirst <michael.hirst@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:37 -05:00
Jeff Blais
b746ec13bc galileo: Fix pinmux function assignment comments
Change-Id: I099773701448b09bc3fa0607552fadec39e24407
Work-by: Jeff Blais <jeffrey.blais@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Jeff Blais <jblais@windriver.com>
2016-02-05 20:24:37 -05:00
Benjamin Walsh
34f53085f3 galileo: add missing configure call for PWM0
If PWM had been configured by some other application after the last
power cycle, it would appear to work fine. However, an application using
PWM loaded right after a power cycle would not work, since the configure
call was missing during boot.

Change-Id: I389ca2122e1a4a7ea6d298efb327438761336d75
Work-by: Mike Hirst <michael.hirst@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:37 -05:00
Dirk Brandewie
08cf2157f3 build: Add tags.sh to enable tagging targets
Add tags.sh from the Linux tree.  This file is used by the tags, TAGS,
cscope and gtags targets in the toplevel makefile.

Change-Id: I9b0845dab26dc9b15731888b3d713dd3950eb1d8
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:36 -05:00
Allan Stephens
6fe1e2357f doc: Fix typo in description of microkernel semaphores
Change-Id: Iaa5e511aa0ca901fcf2f57f49dd4816898fada37
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:36 -05:00
Allan Stephens
935a809cc6 doc: Add documentation for using private events
This reflects the changes made in commit df6be15aa5...

Change-Id: Ibe1bc167390268c0e335a0b4060a600ef55d1add
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:36 -05:00
Javier B Perez Hernandez
1b45249471 checkpatch: ignore NETWORKING_BLOCK_COMMENT_STYLE
Added flag to ignore NETWORKING_BLOCK_COMMENT_STYLE warnings

Change-Id: I022319366a9d956159d05bd5875215594a6f1aa6
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
2016-02-05 20:24:36 -05:00
Anas Nashif
c587253e23 Zephyr 0.6.0-rc2
Change-Id: Ie894c0133674e0642bd0ce951ff63d6012a9d6bd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:36 -05:00
Anas Nashif
2dba160235 update sanitycheck data
Change-Id: I3cc7337fe2b69ea81ecad355f3af8f38987fec23
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:36 -05:00
Allan Stephens
528ed19e15 doc: Add API documentation for printk()
Allows users to better understand the capabilities of printk(),
particularly what it *doesn't* support.

Change-Id: I946ef10fca78464f887c28848d143479f7b7211f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:36 -05:00
Matthew Braun
2ae5784f9e Make zephyr-env.sh work when cd is aliased
Force the zephyr-env.sh script to invoke the builtin 'cd' command so
that the script correctly assigns ZEPHYR_BASE, even for users who
alias the 'cd' command.

Aliasing 'cd' to emit a string before changing the directory is one
way of putting the current working directory in the title of a
terminal window. If the user's alias is executed in zephyr-env.sh, the
output of 'cd' pollutes ZEPHYR_BASE, resulting in value which won't
build.

Signed-off-by: Matt Braun <matthew.braun@intel.com>
Change-Id: I8d7810d1a44ec14102d07bf35610b47d06ac1015
2016-02-05 20:24:36 -05:00
Allan Stephens
0a58ade768 x86: Revise appearance of floating point configuration options
Streamlines the prompts and help text for the floating point
configuration options to make them easier to understand. Also
fixes a help text error that said fibers using the floating point
registers needed to provide additional stack space, which is
incorrect.

Change-Id: Ib6fc13460999ec7f737118728a363b4e10d23fcf
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:36 -05:00
Allan Stephens
a891c045a7 doc: Add section on floating point services to Kernel Primer
Change-Id: Ic96385595740796e6bb28425cacd05a1285a89bb
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:36 -05:00
Dan Kalowsky
8cbb09ec37 pinmux: cleanup galileo defines
The galileo board no longer needs an extern of the initalize
routine once we've moved the process to the actual file.

Change-Id: I21a0748729b2435a368e28b3a2744b2089ed1e13
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:36 -05:00