Commit graph

41120 commits

Author SHA1 Message Date
Anas Nashif
47f1665e78 sanitycheck: match results with extra logging output
renode has extra output that was preventing detection of passing tests
for reporting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-12 18:42:46 -04:00
Anas Nashif
9be6847cc6 tests: critical: change doxygen group
Rename doxygen group to kernel_workqueue_tests

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-12 18:42:27 -04:00
Anas Nashif
a3ddaf8dbc tests: move critical test under workqueue
This is a workqueue test, so move it where it belongs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-12 18:42:27 -04:00
Anas Nashif
1825c6f562 tests: put all workqueue test in 1 group
Pun all workqueue tests under 1 doxygen group.

This removes kernel_workqueue_triggered_tests and
kernel_workqueue_delayed_tests doxygen groups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-12 18:42:27 -04:00
Anas Nashif
6c8dda4e68 tests: critical: rework test
Cleanup test layout and documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-12 18:42:27 -04:00
Anas Nashif
b90fafd6a0 kernel: remove unused offload workqueue option
Those are used only in tests, so remove them from kernel Kconfig and set
them in the tests that use them directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-12 18:42:27 -04:00
Paolo Teti
51125b2890 drivers: adc: adc_shell: Kconfig ADC_SHELL must depends on SHELL
To avoid linking errors ADC_SHELL must depends on SHELL.

Signed-off-by: Paolo Teti <paolo.teti@gmail.com>
2020-04-12 12:02:46 -04:00
Kumar Gala
86887dafde dts: Remove conf file generation support
The last user of the .conf file format DTS data has been removed.  We
can now remove the generation and associated support for the .conf file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-12 09:49:16 -05:00
Anas Nashif
acc0e9025d samples: philosophers: evaluate variables coming from command line
The variables passed by sanitycheck and west were being ignored because
cmake knows nothing about them.

Fixes #24178

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-12 09:53:36 -04:00
Steven Slupsky
e55f1987a0 drivers: flash: sam0: fix unaligned memory read
Use the UNALIGNED_GET() macro instead of the
flash_sam0_read_unaigned_u32() function to ensure
word alignment of the source address.

Signed-off-by: Steven Slupsky <sslupsky@gmail.com>

drivers: flash: sam0:  fix whitespace

Fix checkpass whitespace error.

Signed-off-by: Steven Slupsky <sslupsky@gmail.com>
2020-04-11 15:34:21 -04:00
Peter Bigot
05b072f8d1 fs: littlefs: force alignment for buffers
At least one flash driver requires that the source and destination
buffers be word-aligned.  Annotate the synthesized definitions to make
sure this happens.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-11 15:33:35 -04:00
Daniel Leung
67d220d5cd tests: latency_measure: disable pm for MEC1501 based boards
Disable power management for boards mec15xxevb_assy6853 and
mec1501modular_assy6885 on latency_measure test. This prevents
the SoC from sleeping which may skew the results. Also this
prevents stopping mid-test due to SoC being in sleep state,
and there are no external interrupts to wake up the SoC.

Fixes #24136

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-11 15:32:49 -04:00
Daniel Leung
e3d9c282d2 tests: latency_measure: disable power management
Disable power management by setting CONFIG_SYS_POWER_MANAGEMENT=n
for this test. This is to prevent power management from
interfering with latency measurement.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-11 15:32:49 -04:00
Jose Alberto Meza
aad8ad915d samples: drivers: espi: Enable OOB channel explicitly
Sample showcase OOB transaction, enable OOB channel explicitly.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-04-11 15:30:27 -04:00
Jose Alberto Meza
f93c1926e6 drivers: espi: xec: Validate channels espi configuration
Ensure driver's client channel configuration selection is used.
Fixes: #24162

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-04-11 15:30:27 -04:00
Peter Bigot
e9c5e4824c drivers: i2c: fix esp32 timeout parameter
The value is milliseconds and must be wrapped for use with the new
timeout API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-11 15:29:09 -04:00
Martí Bolívar
877fc59e30 scripts: west build: handle missing CMAKE_PROJECT_NAME
If there is an error in the CMake configuration phase (this can happen
if a script run using execute_process() fails, for instance), the
build system is incompletely generated and future attempts to run
'west build' will fail. This manifests in the following error:

    Error: could not find CMAKE_PROJECT_NAME in Cache

Whenever we see that the cache exists but this variable is missing,
let's just force CMake to run again. This avoids the error in my
testing and is a bit more user friendly. I've seen multiple users
asking what to do in this situation; the answer is always "just build
it again", so we might as well do it for them.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-11 15:04:04 -04:00
Daniel Leung
04a3d9906c toolchain: Fix warning about too few arguments on BUILD_ASSERT()
Commit c408fa88a3 introduced changes
to the BUILD_ASSERT() macro so the MSG argument is optional.
However, in include/toolchain/common.h, the BUILD_ASSERT()
definition has not made the MSG argument as optional which results
in build errors complaing about too few arguments. Fix by adding
some dots there.

This is observed when using XCC (based on Clang 3.9).

Fixes #24008

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-11 11:09:20 -04:00
Anas Nashif
337e8e6361 ci: if we are only changing doc/ files, no sanitycheck run
If we are only changing files in doc/*, there is no need to run full
sanitycheck...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-11 08:40:54 -04:00
Anas Nashif
0a58fe8d3b doc: provide a target to only generate doxygen
Sometimes you are only interested in doxygen, so need to wait 10 minutes
for everything to generate in this case. Now just do:

 make doxygen

and get only the doxygen output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-11 08:40:54 -04:00
Kumar Gala
d280660792 dts: i2c: Remove DT_I2C_._NAME references
Now that there are no users of DT_I2C_._NAME we can remove all the
defines in dts_fixup.h.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 15:11:18 -05:00
Kumar Gala
3c96c08839 drivers: i2c: stm32: replace DT_I2C_._NAME with new macros
Replace DT_I2C_._NAME macro with DT_LABEL(DT_NODELABEL()) instead.  This
will allow us to remove all references to DT_I2C_._NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 15:11:18 -05:00
Kumar Gala
adad8086a8 drivers: i2c: i2c_sam_twihs: replace DT_I2C_._NAME with new macros
Replace DT_I2C_._NAME macro with DT_LABEL(DT_NODELABEL()) instead.  This
will allow us to remove all references to DT_I2C_._NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 15:11:18 -05:00
Kumar Gala
0a408785ac drivers: i2c: i2c_sam_twi: replace DT_I2C_._NAME with new macros
Replace DT_I2C_._NAME macro with DT_LABEL(DT_NODELABEL()) instead.  This
will allow us to remove all references to DT_I2C_._NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 15:11:18 -05:00
Kumar Gala
f928e1b144 drivers: gpio: rv32m1: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
2880a0ef7b dts: openisa: rv32ma: Update openisa,rv32m1-gpio binding for ports
Add a property to the openisa,rv32m1-gpio binding that relates the GPIO
node to the pinmux PORT node.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
019d611031 boards: riscv: rv32m1_vega: remove stale Kconfig PWM setting
Per instance Kconfig symbols aren't used by the rv32m1 lpspi driver
so remove the unnecessary setting of PWM_2.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
5dd1a79230 drivers: pwm: rv32m1_tpm: Use DT_INST_FOREACH
Convert driver to use DT_INST_FOREACH(TPM_DEVICE)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
8f0018663f drivers: pinmux: rv32m1: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.

Updated the openisa,rv32m1_vega-pinmux binding to require the label
property and updated the rv32m1.dtsi to add label properties for the
pinmux nodes.

Also update gpio_basic_api test to use DT_NODELABEL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
ec048128ae drivers: timer: rv32m1_lptmr: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
8c60bc0b07 drivers: spi: rv32m1_spi: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
03d48d894d drivers: serial: rv32m1_lpuart: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
e9aa9201c9 drivers: intc: rv32m1_intmux: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
376c5a4e4f drivers: i2c: i2c_rv32m1_lpi2c: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
977cd7b588 soc: riscv: openisa_rv32m1: Add helper to get clock_ip_name from dts
Add a helper macro that will go from a DT_DRV_INST number and return the
clock_ip_name value for that instance.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
8c78fa85ad boards: riscv: rv32m1_vega: Convert from Kconfig to DT_NODELABEL
As prep for drivers being converted to utilize DT_INST and removal of
per instance Kconfig symbols, move board pinmux.c code to utilize
DT_NODELABEL instead.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
b263a3379c soc: riscv: openisa_rv32m1: Convert from Kconfig to DT_NODELABEL
As prep for drivers being converted to utilize DT_INST and removal of
per instance Kconfig symbols, move soc.c code to utilize DT_NODELABEL
instead.

Also rename various node labels to match the SoC docs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
a5cd799523 arch: riscv: irq: fix build warning
In arch_irq_connect_dynamic the 'level' variable is only used on
platforms that define CONFIG_RISCV_HAS_PLIC.  For the other platforms
we'll get a warning about an unused variable.  Remove the need for
'level' and just call irq_get_level() where its needed to address the
issue.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 12:38:06 -04:00
Stephanos Ioannidis
071a986bb6 doc: remove licensing for moved ext/ components
ext/hal/cmsis was moved out of the ext folder and into external modules
so we should remove the licensing exceptions noted in this document.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-10 14:47:44 +02:00
Maureen Helm
e8937bf8be dts: Add missing flexcomm nodes to lpc socs
Adds missing flexcomm nodes to lpc54xxx and lpc55s6x soc level device
trees.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-10 07:21:41 -05:00
Maureen Helm
9baf1760df boards: dts: Configure lpc flexcomm nodes as spi at the board level
Don't assume in the soc level device trees that flexcomm nodes will
always be configured as spi. Instead, configure flexcomm nodes at the
board level for lpcxpresso55s69 and lpcxpresso54114 boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-10 07:21:41 -05:00
Maureen Helm
1a149ef75b boards: dts: Configure lpc flexcomm nodes as usart at the board level
Don't assume in the soc level device trees that flexcomm nodes will
always be configured as usart. Instead, configure flexcomm nodes at the
board level for lpcxpresso55s69 and lpcxpresso54114 boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-10 07:21:41 -05:00
Maureen Helm
dd6038d954 boards: dts: Configure lpc flexcomm nodes as i2c at the board level
Don't assume in the soc level device trees that flexcomm nodes will
always be configured as i2c. Instead, configure flexcomm nodes at the
board level for lpcxpresso55s69 and lpcxpresso54114 boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-10 07:21:41 -05:00
Maureen Helm
fafdfba6bb dts: Introduce shared binding for nxp flexcomm peripheral
The flexcomm peripheral on lpc socs can be configured into uart, spi,
i2c, or i2s mode. Introduce a shared device tree binding that gets
included by the more specific driver type bindings.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-10 07:21:41 -05:00
Artur Lipowski
aae5b8bf8e api: Fix warning about too few arguments in the K_MEM_POOL_DEFINE.
Static analyzer (clang-tidy) complains about too few arguments for
the BUILD_ASSERT.
There is missing second argument to BUILD_ASSERT used inside of
the K_MEM_POOL_DEFINE.

Signed-off-by: Artur Lipowski <artur.lipowski@hidglobal.com>
2020-04-10 07:52:02 -04:00
Daniel Leung
b935903543 soc: mec1501: modifies interrupt restoration after deep sleep
z_power_soc_deep_sleep() is called with interrupt locked already
so restoring BASEPRI is pointless here, as it would only allow
exceptions afterwards. The situation is complicated by the fact
that kernel/idle.c:idle() only locks interrupt without unlocking
which means the BASEBRI at entry of z_power_soc_deep_sleep() is
already set to allow exceptions only but not lower priority
interrupts like timer. So when, e.g. timer, interrupt fires,
the SoC would come out of deep sleep but the waking interrupts
are never delivered since they are masked, and idle() will try
to sleep again. And now it gets into a loop of going into deep
sleep briefly and waking up immediately and it goes on and on.
The solution is not to restore BASEPRI and simply leave it at
zero. This is a workaround as a proper fix would involve
invasion changes to the PM subsystem.

Also, _sys_pm_power_state_exit_post_ops() is not being called
when deep sleep is involved, so PRIMASK needs to be reset
after coming out of deep sleep.

Fixes #23274

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-10 07:48:33 -04:00
Daniel Leung
2e7831562a samples: mec15xxevb_assy6853/pm: shorten wait after deep sleep
The origin for sleeping for 3ms after coming out of deep sleep
was to wait for PLL to lock so that UART would not send
garbage characters due to incorrect clock. In the deep sleep
code, it spins to wait for the PLL to lock so there is no need
to wait for 3ms in the app. So shorten it like other busy wait.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-10 07:48:33 -04:00
Daniel Leung
fd1d93e552 samples: mec15xxevb_assy6853/pm: abort threads before reuse
Threads are being re-used for multiple runs, so it is better to
stop the threads before reusing the variables for new threads.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-10 07:48:33 -04:00
Scott Worley
17a932c107 west: update Microchip HAL to latest version
Update includes a bug fix of ACPI EC defines

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2020-04-10 06:17:44 -05:00
Stephanos Ioannidis
b73622dff0 tests: kernel: fp_sharing: Use ztest
This commit converts the `fp_sharing` tests to use the ztest framework.

In addition, this commit also introduces a behavioural change to run
the `pi` unit test separately from the `load_store` unit test, in order
to allow more manageable and diagnosable test execution.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-10 11:43:05 +02:00