Commit graph

41264 commits

Author SHA1 Message Date
Andrzej Głąbek
436c4262da boards: nrf9160_pca10090: Fix LEDs active state
The nRF91 DK User Guide clearly says "the LEDs are active high,
meaning that writing a logical one ('1') to the output pin will
illuminate the LED".

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-28 08:32:23 -05:00
Mieszko Mierunski
0b2946f4f3 drivers: nrf: Add power management to uarte shim
Adds power management to uarte shim.

Fixes 12501

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
cbf4e54ead tests: uart: Add nrf9160_pca10090 to UART async test
Add nrf9160_pca10090 to UART async test.
Add myself as codeowner to uart_async_api tests.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
48f005707e tests: uart: Add chained write test case for UART async API
Add new test case

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
b121660a8f drivers: nrf: Enable usage of Async UART API for UARTE on nrf91
Modify driver to use PPI or DPPI depending on soc.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
7a0f921517 boards: nrf: Enable TIMER1 by default in nrf9160_pca10090
Enable TIMER1 by default in nrf9160_pca10090 so it can be selected
by user for hardware byte counting in UARTE or other purpose.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
7700322961 dts: nrf: Add DPPIC to device tree.
Add DPPIC to dts. Add HAS_HW_NRF_DPPIC to nrf91 soc.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
35aedfa532 drivers: nrf: Rework UARTE shim for uart ASYNC API.
Rework uart_nrfx_uarte shim to work with asynchronous API.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Ulf Magnusson
7ccc7889fa logging: Remove SYS_LOG implementation
Replaced by the new CONFIG_LOG system.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 09:30:29 -04:00
Ulf Magnusson
eebce9d0e5 logging: doc: Remove SYS_LOG-related documentation
Replaced by the new CONFIG_LOG system.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 09:30:29 -04:00
Ulf Magnusson
0eb6ffa3e9 logging: kconfig: Remove legacy SYS_LOG symbols
Replaced by the new CONFIG_LOG system.

Also remove the "Logging Options" menu and turn the LOG symbol into a
'menuconfig', with prompt "Logging", which appears in the top menu. LOG
and its dependent symbols make up all of the logging Kconfig symbols
now.

Piggyback some minor cleanup.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 09:30:29 -04:00
Marc Herbert
682961a382 sanitycheck: document that --save-tests appends to existing file
Fix --help message. Also rename run_report() to save_tests() as it's
used only once by --save-tests and nowhere else. Maybe the code was
shared with some --other-report feature in the past but not any more.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-03-28 09:30:00 -04:00
Sebastian Bøe
7061c035cd kconfig: Move Kconfig.modules to the root build directory
Currently, the Kconfig.modules file is placed in the build directory
relative to the CMake "project". But technically, the file is not
project-specific, but global, or build-directory specific.

So we move it up one level to the CMAKE_BINARY_DIR instead. Currently,
there is only one project, so this change has no effect, but this
enables us to have multiple projects in the future, which again
enables multi-image builds.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2019-03-28 09:23:02 -04:00
Aaron Tsui
51fafa7302 boards: nucleo_f746zg: Remove repetitive yaml line
repetitive line

Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
2019-03-28 09:09:28 -04:00
Jakub Rzeszutko
6e861e1947 dts: update mermory regions for nrf chips
According to nrf51 and nrf52 specifaction every peripheral is
assigned a fixed block of 0x1000 bytes. Due to that dts for
nrf51 and nrf52 chips have been updated.
The only exception is gpio for nrf52840 where gpio0 and gpio1
share the same memory regions. For this reason, the definition
of gpio for nrf52840 is different from the others.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-03-28 11:50:43 +01:00
Matias Karhumaa
933acfef43 usb: Fix ACL data tx stalling
This patch increases size of acl_tx_pool and makes sure that acl_read_cb
waits for available buffers.

Size of acl_tx_pool is now configurable with CONFIG_BT_CTLR_TX_BUFFERS.

Previously it was possible to run out of buffers and in that case
acl_read_cb returned. This caused ACL data TX to stall because device
did not read data from HCI out endpoint.

Fixes #14899

Signed-off-by: Matias Karhumaa <matias.karhumaa@gmail.com>
2019-03-28 10:48:26 +01:00
Andrew Boie
cf91f8cf90 elf_helper: fix debug_die call
debug_die() is not implemented in this class, and indeed we
don't even have a reference to the DWARF DIE object.

This is a fatal error anyway, just raise an exception.

Fixes #14762

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-27 16:37:49 -05:00
David B. Kinder
5d8e367efe doc: fix misspelling in docs and API comments
Fix misspellings missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-27 15:59:09 -04:00
Jukka Rissanen
c3cf543452 net: ethernet: lldp: Use short types for ints
Instead of uint16_t and uint8_t, use u16_t and u8_t types.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 10:13:16 -05:00
Jukka Rissanen
0888b9f85c doc: net: Fix LLDP documentation
The LLDP documentation was missing descriptions for enums
and structs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 10:13:16 -05:00
Jukka Rissanen
5378672d8a doc: net: Fix networking overview document
Add references to external documents like RFCs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 09:59:48 -05:00
Jukka Rissanen
1564e205e0 doc: net: Minor fixes to BSD socket documentation
Some clarifications to BSD socket descriptions. Also added
rendering hints for some strings.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 08:37:39 -04:00
Andrzej Głąbek
2c3445b933 CODEOWNERS: Set @nordic-krch as the codeowner of the counter driver
As the author of the latest rework of the counter driver API,
@nordic-krch is a more appropriate person than me to be the codeowner
of this driver.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-27 11:56:22 +01:00
Carles Cufi
082cf7ac64 logging: Clarify contract of log_output_func_t
The log_output_func_t backend function is supposed to either process or
drop bytes and return the amount of those to the caller. Clarify this in
the documentation.

Fixes #12241

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-27 09:50:12 +01:00
Marc Herbert
6f011c95c4 sanitycheck: don't generate the top-level Makefile in random order
Also add a "generated by sanitycheck" header to indicate origin and a
warning about the dependency required to actually run the test.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-03-26 22:23:56 -04:00
Thomas Ebert Hansen
d83f926c38 doc: security: Change link to development model.
The development model docs are now part of the technical docs.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
2203489f6d doc: security: Update embargo period
The embargo period is 60 days.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
eb34b86fe5 doc: security: Correct indentation
Use similar indentation as the other bullet points above.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
bb881d2d9d doc: security: Update Security Group definition
Rewrite who the members of the Security Group are
and move the 'ability' of the members to an outer
bullet point.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
f1ad50f85a doc: security: Reword unintelligible sentences
The sentence "To process process documentation." does not make
any sense at all.

Add missing "the" to the sentence "in form of".

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
7166e35487 doc: security: Correct statement about Coverity
Remove statement that static code analysis is planned for the future.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
0f0103e0b1 doc: security: Unify citations
Use similar style for citations.
Add online references where applicable.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
c9fec3ca7d doc: security: Fix section reference
Replace reference to Chapter 4 with Secure Design section.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
33d1067d25 doc: security: Unify name of security subcommittee
Use the term 'Zephyr Security Subcommittee' where applicable.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Maksim Masalski
d1f3bba705 can: fix unchecked return from clock_control_get_rate
Inside can_stm32_runtime_configure() result of
clock_control_get_rate() is not checked which might result that
function can return error and that error can not be handled

Coverity-CID: 190926
Fixes: #13886
Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
2019-03-26 22:18:15 -04:00
Maureen Helm
5cdbd39e33 soc: nxp_imx: Configure NUM_IRQS independently for each rt soc
Not all i.mx rt socs have the same number of irqs, so move the default
configuration from the soc series level to the individual socs. The
rt1020 hardware reference manual (IMXRT1020RM Rev.1 12/2018) incorrectly
documents 160 irqs (#142-159 reserved), but the soc actually has 142
irqs.

Fixes tests/kernel/gen_isr_table for the mimxrt1020_evk board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-03-26 22:16:47 -04:00
Flavio Ceolin
2f26ace116 include: i2c: Add U to unsigned constants
Add U to unsigned integer constants to avoid implict cast

MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
5f5377f225 include: Add missing U for unsigned constants
MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
c2b25151cb lib: printk: Make if/iterations evaluate boolean operands
MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
2df02cc8db kernel: Make if/iteration evaluate boolean operands
Controlling expression of if and iteration statements must have a
boolean type.

MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
3306a5862f arch: x86: Add missing U for unsigned constants
Add U for integer constants to avoid an implicit cast.

MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
44fc55e209 lib: crc16_sw: Add missing U to unsigned constants
Add U to unsigned integer constants to avoid implicit cast.

MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
000a256bb3 include: Make statements evaluate boolean expressions
MISRA-C requires that if/while statements have essentially a boolean
operand.

MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
625ac2e79f spinlock: Change function signature to return bool
Functions z_spin_lock_valid and z_spin_unlock_valid are essentially
boolean functions, just change their signature to return a bool instead
of an integer.

MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
ce696e9aa2 lib: rb: Make operands have an appropriate essential type
MISRA-C 8.10.2 defines essential operand types and how to handle them
through rules 10.1 .. 10.5. This commit adds an U to unsigned constants
to avoid implicit casts and make if/while statements evaluate a boolean
to avoid other types being casted to boolean.

MISRA-C rules 10.1, 10.2 and 10.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
fdfb2109a2 arch: Use macro BIT for shift operations
BIT macro uses an unsigned int avoiding implementation-defined behavior
when shifting signed types.

MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Anas Nashif
006b97de13 tests: no-multithreading: do not report success twice
We are reporting success twice, once by calling macro directly, and once
by using ztest test_main().

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-26 20:09:07 -04:00
Anas Nashif
42f4538e40 kernel: do not use k_busy_wait when on single thread
k_busy_wait() does not work when multithreading is disabled, so do not
try to wait during boot.

Fixes #14454

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-26 20:09:07 -04:00
Charles E. Youse
eaf1c3b8a6 drivers/pci: stop using LOG_DBG()
When the console UART is a PCI device, and PCI debug logging is enabled,
the system crashes because the UART is initialized before logging, but
the UART initialization invokes the PCI subsystem which invokes logging.
Reordering the initialization sequence will not fix this chicken/egg.

Luckily, the LOG_DBG() calls in the PCI subsystem appear to be bitrot
leftovers from early development, so they are simply removed.

Also mark myself as the owner of the PCI subsystem.

Fixes: #14763

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-03-26 23:56:02 +01:00
Jakub Rzeszutko
20e4ca48c7 shell: fix coverity issue in uart backend
Fixed coverity issue CID 196642

Fixes #14814

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-03-26 21:48:25 +01:00