Commit graph

99553 commits

Author SHA1 Message Date
Kumar Gala
11e98fa925 riscv32: sifive-freedom: Move dts.fixup into soc dir
The dts.fixup for the hifive1 board was not board specific but related
to the SoC.  Move the dts.fixup into the SoC dir so any other boards
using this same SoC will take advantage of it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-05 13:21:49 -05:00
Kumar Gala
5a24afadb8 drivers: serial: uart_sifive: Get clock frequency from device tree
Move to getting the clock frequency of the uart from the device tree
instead of a define in the board file.  Cleaned up hifive1 board code to
reflect this change in addition to the driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-05 13:21:49 -05:00
Kumar Gala
3b70fb8e6b boards: hifive1: Move LEDs to device tree
Move the description of LEDs on the hifive1 board to device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-05 13:21:49 -05:00
Kumar Gala
da7ac50683 gpio: sifive: Add device tree support for GPIO generation
Add the missing bits to the yaml, dts, and Kconfig to enable GPIO pin
generation based on device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-05 13:21:49 -05:00
Kumar Gala
c922788d0a scripts/dts/extract: Add support for translating range properties
For now we've used range properties as a pass through.  However range
properties can translate from one address space to another.  This is
typically used one address spaces translate from one physical bus to
another (For example going from PCI address space to internal SoC memory
map).  However, we can also use this for cases where we want to reduce
duplication (For example with ARMv8-M for secure v non-secure MMIO
registers).

'ranges' takes either the form of:
	ranges; /* pass through translation */
or:
	ranges = <child-bus-address parent-bus-address length>;

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-05 13:19:39 -05:00
Joakim Andersson
773b21ac38 bluetooth: config: Fix bluetooth config dependencies
Fix bluetooth config dependencies where the definitions depend on other
definitions.
BT_RX_PRIO is not always defined in a controller only build.
BT_CTLR_TX_BUFFER_SIZE does not depend on BT_CTLR, but BT_LL_SW.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2018-10-05 11:15:27 -04:00
Erwan Gouriou
85742e3c9a drivers/spi: stm32: fix warning in SYS_LOG_ERR macro
Following log subsystem rework, a warning poped-up in SYS_LOG_ERR
in spi_stm32_get_err macro.
Fix it by casting SPI_STM32_ERR_MSK on (u32_t)

Fixes #10380

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-05 11:11:03 -04:00
Kumar Gala
31340d8cdd scripts/dts/extract: Re-implement get_addr_size_cells
We use to walk to the full tree in search of addr/size cells.  We should
only have to look at the parent of the node for these properties.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-05 09:59:07 -05:00
Kumar Gala
6a8d5952d0 scripts/dts: Add help function to get address/size cells for a node
Given the path address to a node return the address/size cells.  In
theory this should just be looking up the #{address,size}-cells in
the parent node, we'll make that cleanup next.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-05 09:59:07 -05:00
Kumar Gala
bf0001242c scripts/dts/extract: Add get_parent_address helper function
We have a few places that we want the path to the parent, so lets add a
helper function for that.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-05 09:59:07 -05:00
Andrei Emeltchenko
f7067655d6 doc: usb: Use contents instead of hand made structure
Use proper contents keyword.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-05 10:50:19 -04:00
Andrei Emeltchenko
add69d60e3 doc: usb: Move generated api to the right place
Move USB API to the right place.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-05 10:50:19 -04:00
Marti Bolivar
7f3e07ee11 tracing: don't include kernel_structs.h from tracing_sysview.h
This header is private data and we shouldn't (and aren't) using it in
the tracing_sysview.h. SystemView tracing works fine without it, as
tested with the philosophers sample.

This commit fixes the build when bluetooth SMP and SystemView tracing
are used, because the kernel_structs.h inclusion ends up pulling in
kernel_internal.h, which declares smp_init(), whose declaration
conflicts with another internal routine by the same name in
subsys/bluetooth/host/smp.c.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-05 10:37:01 -04:00
Anas Nashif
4402c4b057 samples: logger: exclude qemu_xtensa [REVERTME]
The way uart console is setup for this is not compatible with the logger
and needs additional changes, excluding until we have this implemented
in a generic way.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-05 10:09:08 -04:00
Anas Nashif
771b4defad samples: logger: test sample in CI
Add test stub for this sample to verify it in CI on default platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-05 10:09:08 -04:00
Jukka Rissanen
d056d63ee7 samples: net: wifi: Adding sample.yaml file
As the sample.yaml file was missing, then sanitychecker did
not testing any wifi drivers or other wifi related APIs.

Fixes #10389

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-05 10:08:32 -04:00
Jukka Rissanen
69eeddd8a9 drivers: wifi: Convert to use new logging
Convert the wifi drivers to use the new logging system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-05 10:08:32 -04:00
Jukka Rissanen
7138e34d31 net: wifi: Removing SYS_LOG_DBG as that is no longer used
The wifi management interface was still using one SYS_LOG_DBG
macro call, replacing that with NET_DBG.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-05 10:08:32 -04:00
Chen Han
d7a6b7e101 dts: stm32f1: fix UART4 define
fix stm32f1 UART4 define in dst.fixup

Signed-off-by: Chen Han <qq1433255094@outlook.com>
2018-10-05 08:49:26 -05:00
Jukka Rissanen
009e4dafa7 net: Make Kconfig template variables prettier
Adding spaces around "=" when definining Kconfig template so
that is more consistent with overall style of these template
variables.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-05 09:01:37 -04:00
Vinayak Kariappa Chettimada
049267a5ca Bluetooth: controller: Fix connection cancel deadlock
Calling bt_recv in the Bluetooth host Tx thread by the
controller implementation caused deadlock in combined host
controller builds when HCI LE Create Connection Cancel
generated the HCI LE Connection Complete or HCI LE Enhanced
Connection Complete events.

Controller's HCI implementation has been updated to place
the generated event into Rx FIFO to avoid the deadlock.

Relates to commit a59f544fb4 ("bluetooth: controller:
Handle non-priority events correctly")

Relates to #10314.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-10-05 13:44:10 +02:00
Vinayak Kariappa Chettimada
350c569aba Bluetooth: controller: Avoid offseting to lldata
Avoid offseting to lldata when populating event structure
members.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-10-05 13:44:10 +02:00
Szymon Janc
861bae22b8 Bluetooth: Fix autoconnect if cancelled pending connection
bt_conn_disconnect removes device from autoconnect list and thus
should not be called from le_conn_update when timeouting pending
connection. Also auto connect flag needs to be check on connection
failure to make sure scan is restarted.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2018-10-05 13:43:49 +02:00
Michael Scott
685da02354 Bluetooth: controller: Fix advertising random delay resolution calc
In commit d5836195d7 ("Bluetooth: controller: Increase advertising
random delay resolution"), the resolution of random_delay was
increased from 8-bit to 16-bit.  Due to this switch the result
of HAL_TICKER_US_TO_TICKS() can now be a 0, which causes the following
crash:
***** Kernel OOPS! *****
Current thread ID = 0x200043f0
Faulting instruction address = 0x17914
Fatal fault in ISR! Spinning...

Let's make sure we don't pass a 0 to ticker_update() by increasing
the result of HAL_TICKER_US_TO_TICKS() by 1.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-10-05 10:18:27 +02:00
Jakub Rzeszutko
bc6da1c34a shell: Enable backends via Kconfig file
Added functionality to enable active shell backends via Kconfig
file. When there will be more backends implemented user will
have an option to select only required ones.

It is no longer needed to select SERIAL in prj.conf.

Fixes #10190

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-05 10:04:44 +02:00
Spoorthi K
dc8bbce357 tests: POSIX: Enhance semaphore tests
Enhance semaphore test to validate sem_timedwait()
    and sem_trywait(). This is intended to improve
    code coverage.

Also modify ztest check with zassert_equal with
return value instead of zassert_false for better
understandability.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-10-04 22:27:26 -04:00
Spoorthi K
11aa39bc25 tests: POSIX: Refactor POSIX API tests
Refactor and club the POSIX API tests into one test suite.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-10-04 22:27:26 -04:00
Kumar Gala
0fed8b9280 gitignore: Ignore any sanity-out* or build* dir
Tweak the wildcard matching for any build or sanity-out dir

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 21:13:19 -04:00
Kumar Gala
3687103fff boards: lpcxpresso54114_m0: fix pinmux.c
Some of the headers referenced in the pinmux.c file don't exist.  Match
the includes that the lpcxpresso54114_m4 pinmux.c file uses.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 18:59:45 -05:00
Alexander Polleti
aec8971bfd crc8: fix const correctness
Declares the array with constant data const.

Tested with tests/unit/lib/crc.

Signed-off-by: Alexander Polleti <metapsychologe@yahoo.de>
2018-10-04 16:37:21 -05:00
Mieszko Mierunski
316f8604b7 script: dts: Fix alias generation for reg property.
In case of having more than one reg, aliases would not generate
properly. Number of register at the end of define was missing.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-10-04 07:54:48 -05:00
Kumar Gala
f387f26a1f boards: sam_e70_xplained: Move led/button info to DTS
Move the details about LEDs and Buttons from board.h into device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:49:03 -05:00
Kumar Gala
3bc13842f9 boards: sam4s_xplained: Move led/button info to DTS
Move the details about LEDs and Buttons from board.h into device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:49:03 -05:00
Kumar Gala
f331cc5c09 dts: atmel: Add missing GPIO properties
The gpio controllers on SAM4S, SAME70, and SAMD were missing properties
related to GPIO pin generation.  Add the missing details into the yaml
and dts files to allow boards to specific gpio pins.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:49:03 -05:00
Kumar Gala
68edf341c2 dts: atmel: gpio: rename dts binding file
File was named atmel.sam-gpio.yaml, rather than our convention of
atmel,sam-gpio.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:49:03 -05:00
Kumar Gala
92bd8a0c69 boards: zedboard_pulpino: Move led & button to dts
Move describing of LED & Buttons on the Zedboard-Pulpino into the device
tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:48:32 -05:00
Kumar Gala
db2ca70a23 dts: pulpino: Add device tree support for GPIO controller
Add the needed bits to get device tree support for the GPIO controller
on the Zedboard-Pulpino.  This will allow us to move LED & button info
into the board.dts.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:48:32 -05:00
Kumar Gala
be4f53fa50 riscv: Add device tree support to pulpino
Add simple device tree support for the Pulpino SoC and Zedboard-Pulpino
board port.  This gets the UART info from device tree instead of soc.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:48:32 -05:00
Kumar Gala
c361405e90 dts: Reduce include paths for building dts
Drop a few paths from when we preprocess the dts.  This is to reduce
creep of where #defines might get resolved from.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:48:05 -05:00
Gil Pitney
be64964f1e driver: wifi: simplelink: Fix socket offload after s_addr cleanup
The commit 8592501828
("net: Remove s_addr/s6_addr defines from in_addr/in6_addr")

did a (welcomed) removal of a #define s_addr for which the SimpleLink
SDK was checking, breaking the socket_offload driver build.

This patch fixes the driver to work with this new, better
s_addr symbol definition.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-10-04 07:42:12 -05:00
Flavio Ceolin
18af4c6299 kernel: Fix overflow test problem introduced in 92ea2f9
The builtin function __builtin_umul_overflow returns a boolean and
should not checked as an integer.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-10-04 05:20:29 -07:00
Jukka Rissanen
57a8db7789 net: Use log_strdup() when printing debug strings
As the debugging print calls are async, all the strings that might
be overwritten must use log_strdup() which will create a copy
of the printable string.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Jukka Rissanen
d67414e96c samples: net: syslog: Remove the sample application
The application won't work anymore as it uses the old syslog
logging and networking is now converted to use the new logger
so there is no need for this sample application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Jukka Rissanen
df13dcf911 net: app: No need to print anything if resolving is not possible
The code was trying to print peer IP address string but that
pointer could contain garbage. There is actually no need to print
anything in this case, the error code return is enough.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Jukka Rissanen
7088d4e949 samples: net: lwm2m_client: Convert to new logging system
Use new logging system instead of SYS_LOG.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Jukka Rissanen
5705573c46 net: lwm2m: Convert to new logging system
Use new logging system instead of SYS_LOG.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Jukka Rissanen
ac88baca02 usb: net: Convert to use new logging
Convert the USB networking to use the new logging system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Jukka Rissanen
4851e2ea1b usb: Fix net_hexdump_frags() parameters
One parameter was missing when calling net_hexdump_frags() which
caused compile error.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Jukka Rissanen
f3f04bf9eb tests: net: Convert to new logging system
Use new logging system with support for network log level.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Jukka Rissanen
5ad399e0d1 samples: net: leds_demo: Convert to new logging system
Use new logging system with support for network log level.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00