Commit graph

41120 commits

Author SHA1 Message Date
Ramesh Thomas
2375f05f2e samples: power_mgmt: Fix README inconsistent info
Update outdated content in the README file

Change-Id: I2f2576bd63915f4e471d4c9185b82aa2ab57bc24
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-11-03 14:48:38 -07:00
Ramesh Thomas
ded076d175 tests: power_mgmt: Make power test unified kernel based
Port the power management test app to use unified kernel.

Change-Id: I2f10748be5ca7d9792f6e97c35f5f2aabab769e7
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-11-03 14:47:56 -07:00
Ramesh Thomas
b21f2fad3d samples: power_mgmt: Make samples unified kernel based
Port the sampe apps to use unified kernel and its apis.

Change-Id: Iee0a21df8008f27cfdbc9db50b66bd183d531f9c
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-11-03 14:43:50 -07:00
Julien Delayen
fec01af64a power: Update Quark SE PM layer with QMSI 1.3
QMSI 1.3 natively supports restoring the SoC and peripherals
after sleep.

The Zephyr Power Management shim layer is updated
in order to support QMSI functions.

The following functions have been added:
void _sys_soc_set_power_state(enum power_state);
void _sys_soc_power_state_post_ops(void);

In order to fully support deep sleep, the function
_sys_soc_set_power_state now support saving and
restoring CPU context and returns to the application.

_sys_soc_set_power_state function also abstracts
QMSI cpu states and enable the application to choose
between C1/C2 or C2LP states.

The QMSI power states are mapped as follows:
SYS_SOC_POWER_STATE_CPU_LPS -> power_cpu_c2lp
SYS_SOC_POWER_STATE_CPU_LPS_1 -> power_cpu_c2
SYS_SOC_POWER_STATE_CPU_LPS_2 -> power_cpu_c1
SYS_SOC_POWER_STATE_DEEP_SLEEP -> power_soc_deep_sleep
SYS_SOC_POWER_STATE_DEEP_SLEEP_1 -> power_soc_sleep

The following functions have been removed:
void _sys_soc_set_power_policy(uint32_t pm_policy);
int _sys_soc_get_power_policy(void);
FUNC_NORETURN void _sys_soc_put_deep_sleep(void);
void _sys_soc_put_low_power_state(void);
void _sys_soc_deep_sleep_post_ops(void);

Those changes are propagated to the samples.
All calls to QMSI are removed.

Jira: ZEP-1045, ZEP-993, ZEP-1047

Change-Id: I26822727985b63be0a310cc3590a3e71b8e72c8c
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-11-03 21:31:30 +00:00
Julien Delayen
5e87553079 quark_se: Add restore info shared memory to linker
A new shared memory has been added to the qmsi bootloader
in order to handle the restore flow and jump to
the restore trap where context is restored.

Add the new entry to the QUARK SE C1000 linker file
and new kconfig options:
- CONFIG_BSP_SHARED_RAM_ADDR to set the address of the
  shared memory.
- CONFIG_BSP_SHARED_RAM_SIZE to set the size of the
  shared memory.

This is only enabled with CONFIG_SYS_POWER_DEEP_SLEEP.

Jira: ZEP-1046

Change-Id: I35d924a100c5583025aa36a9741428ab51809c57
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-11-03 21:31:26 +00:00
Julien Delayen
ee04a3f6d8 rtc_qmsi: Add get_pending_int API
For AON peripherals on Quark SE C1000, an API is needed
to retrieve the interrupt status after wake up.
This enables the application to know the wake source before
enabling again the interrupts.
Add this API to the rtc as this is a wake event
on Quark SE C1000.

Jira: ZEP-1188

Change-Id: Id850ce405eb3f4857be720201e462ea8e24a334f
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-11-03 21:30:21 +00:00
Julien Delayen
bd6285a3f1 gpio_qmsi: Add get_pending_int API
For AON peripherals on Quark SE C1000, an API is needed
to retrieve the interrupt status after wake up.
This enables the application to know the wake source before
enabling again the interrupts.
Add this API to the gpio as this is a wake event
on Quark SE C1000.

Jira: ZEP-1188

Change-Id: Icc4aa6617bf18402b7e5dc3aab779ec2964e1c5b
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-11-03 21:30:11 +00:00
Julien Delayen
14711488db aio_cmp_qmsi: Add get_pending_int API
For AON peripherals on Quark SE C1000, an API is needed
to retrieve the interrupt status after wake up.
This enables the application to know the wake source before
enabling again the interrupts.
Add this API to the aio comparator as this is a wake event
on Quark SE C1000.

Jira: ZEP-1188

Change-Id: Ifa08353270910a363c15a4203770ff3e7857572b
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-11-03 21:30:02 +00:00
Julien Delayen
74799a326e counter_qmsi_aonpt: Add get_pending_int API
For AON peripherals on Quark SE C1000, an API is needed
to retrieve the interrupt status after wake up.
This enables the application to know the wake source before
enabling again the interrupts.
Add this API to the periodic timer as this is a wake event
on Quark SE C1000.

Jira: ZEP-1188

Change-Id: I79976230bccb1f970b6856d28bf7428175167828
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-11-03 21:29:48 +00:00
Sergio Rodriguez
a770264ef3 samples: sensor_apds9960: convert to and build with unified kernel
Change-Id: I73863da2e9539fbcde79b39561badcd24c0bda80
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-03 21:00:41 +00:00
Erwan Gouriou
f595df3755 stm32f4: Enable STM32Cube SDK support on stm32f4 family
Enable HAS_CUBE config flag on stm32f4 family soc.h is updated to
include minimum include files from ext/hal/stm23cube

Change-Id: I35a8c33aab777167ee7029edc1b7a4f6d21fccd8
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-11-03 20:29:08 +00:00
Erwan Gouriou
dc70dc0977 stm32f1: Enable STM32Cube SDK support on stm32f1 family
Create HAS_CUBE config flag to control activation of STM32Cube support.
Generate fitting compilation options for STM32Cube in
/ext/hal/stm32cube/Makefile soc.h is updated to include minimum include
files from ext/hal/stm23cube

Change-Id: If58ce0a4fdb7fbf5f171dfe5f1f8eb75126a8313
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-11-03 20:29:07 +00:00
Erwan Gouriou
eed678612b clock_control: have FLASH_BASE compatible with ST CMSIS files
In ST CMSIS files, FLASH_BASE does not mean base address of FLASH register
Instead FLASH_R_BASE is used.
stm32f1 clock control driver is updated to be compatible with this naming.

Change-Id: Ic4fb49c60c392e15fd12c69266baf4c686bd343b
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:07 +00:00
Erwan Gouriou
39f7adc41d stm32f4: Adapt CONFIG_SOC to STM32Cube values
STM32Cube uses SoC defines made to reflect HW heterogeneity that
should be taken into account by SW.
Aim of this commit is to adapt values used by Zephyr to the same
diversity. This will help create new SoC values only when justified
by a real hardware difference that should be taken into account
by software.
For instance, for SoC stm32f401re following define is used:
*STM32F401xE
Which means:
*Same SW could be used on STM32F401RE and STM32F401CE:
    same CONFIG_SOC could be used
*Different SW should be used on STMF401RE and STM32F401RC:
    different CONFIG_SOC should be used
This change focuses on stm32f4xx series.

Change-Id: I56ff4d1815d09747cf722385532eb2dcbdf37b44
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:06 +00:00
Erwan Gouriou
df5a2af34b stm32f1: Adapt CONFIG_SOC to STM32Cube values
STM32Cube uses SoC defines made to reflect HW heterogeneity
that should be taken into account by SW.
Aim of this commit is to adapt values used by Zephyr to the same
diversity. This will help create new SoC values only when justified
by a real hardware difference that should be taken into account
by software.
For instance, for SoC stm32f103rb following define is used:
*STM32F103xB
Which means:
*Same SW could be used on STM32F103RB and STM32F103VB:
    same CONFIG_SOC could be used
*Different SW should be used on STMF103RB and STM32F103R4:
    different CONFIG_SOC should be used
This change focuses on stm32f1xx series.

Change-Id: I5ecfaa52952d04421b27b5e74fb71b4fc108b662
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:06 +00:00
Erwan Gouriou
d0b1674048 stm32cube: Update ext/hal to include STM32Cube
Update ext/hal to take into account newly introduced
STM32Cube SDK.

Change-Id: Ie8721b358badf2a88b7f0b91e4783cba87b2c5df
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:05 +00:00
Erwan Gouriou
cde082a8dc stm32cube: Add Zephyr build system files for stm32f4 series
Following previous commits, updating build system files in order
to support stm32cube on stm32f4xx series.


Change-Id: Id74779a7cf15f3fdce372bf8710c3f7c4fff4773
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:05 +00:00
Erwan Gouriou
deaa468432 stm32cube: Add Zephyr build system files for stm32f1 series
Following previous commits, adding build system files with
minimum files inclusion to initiate stm32cube based porting
in zephyr

Change-Id: I02be8161a8c63cf05cc6b2de2f3fb0c0a4ef490f
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:04 +00:00
Erwan Gouriou
5125475d7c ext/hal: Introduce STM32Cube SDK for STM32F4xx family
With this commit we provide header and HAL/LL files for all STM32F4
SoCs (V1.13.0).
Using STM32Cube provides generic access to all families, maximizes
code reuse across different STM32 families and helps taking benefit
of a mature SDK.

Origin: STM32Cube
URL: http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html
Purpose: Introduction of STM32F4xx STM32Cube definitions and
	 Abstraction Layers
Maintained-by: External

Original STM32Cube tree structure has been modified to a minimum
structure for a better fit into Zephyr. hal is split into 2 parts:
-driver: initially Drivers/STM32F4xx_HAL_Driver, contains HAL and LL
-soc: initially Drivers/CMSIS/Device/ST/STM32F4xx, contains stm32f4xx
socs header files

Change-Id: I34ad6b711273ea27ceb2a07073499b153f37e044
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:03 +00:00
Erwan Gouriou
9b1a23f6e6 ext/hal: Introduce STM32Cube SDK for STM32F1xx family
With this commit we provide header and HAL/LL files for all STM32F1
SoCs (V1.4.0).
Using STM32Cube provides generic access to all families, maximizes
code reuse across different STM32 families and helps taking benefit
of a mature SDK

Origin: STM32Cube
URL: http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef1.html
Purpose: Introduction of STM32F1xx STM32Cube definitions
	 and Abstraction Layers
Maintained-by: External

Original STM32Cube tree structure has been modified to a minimum
structure for a better fit into Zephyr. hal is split into 2 parts:
-driver: initially Drivers/STM32F1xx_HAL_Driver, contains HAL and LL
-soc: initially Drivers/CMSIS/Device/ST/STM32F1xx, contains stm32f1xx
socs header files

Change-Id: Ibfe08cea5f7fee54417ec9ecb6e9b4f33c04ec95
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:03 +00:00
Allan Stephens
7567c979dd unified/doc: Update Application Development Primer
Removes references to nanokernel/microkernel. Corrects numerous
errors in content. Improves consistency in presentation of
information.

Change-Id: I83895d2cb03181da377b23323afc104ae32865a2
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-11-03 20:27:38 +00:00
Kumar Gala
a3e23bc022 sanitycheck: enable missing ARM platforms
Now that these platforms pass sanitycheck add them into the list of
platforms we support

Change-Id: If559c80e107505e6b98f81c0e94b9862618b1735
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-11-03 19:20:20 +00:00
Kumar Gala
6f6632ddc5 tests: Mark a bunch of testcases that are memory (RAM) limited
These testcases can't build on common platforms with 16K or less of
memory.

Change-Id: Iade2aa423f42a1f174a5ebb5d183b362917f503e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-11-03 19:20:19 +00:00
Kumar Gala
c610dea725 tests: only run the printk test if CONFIG_PRINTK is enabled
Not all platforms enable CONFIG_PRINTK so lets only test if its enabled

Change-Id: I0fc83e21b4be1ff0e8fef94e66793a0b725a3db2
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-11-03 19:20:19 +00:00
Inaky Perez-Gonzalez
374dff69ac test_obj_tracing: filter for enough memory
QD2000, for example, can't run this.

Change-Id: I86c7ca22e4724844ffc5e64329063baf762470c9
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-11-03 19:17:04 +00:00
Baohong Liu
f960e0fa08 samples: w25q80bl: remove the sample app
Remove this sample app. The component is no longer on the
board (quark_se_c1000_devboard).

Change-Id: I342616781e6f343cfc66b89cbdf85de5844f6f4a
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 12:03:08 -07:00
Szymon Janc
5f6f422ebb console: shell: Reduce completion stack usage
There is no need for copying command string to temporary variable on
the stack.

Change-Id: I41fd2582600908ac523b87c83a426eef27d1c454
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-11-03 12:50:19 +00:00
Szymon Janc
a9386f9707 console: shell: Fix commands tab completion
This fix commands tab completion and make it similar to Linux shell
completion:
 - single match complets command and add space at the end
 - multi match lists matched commands and complete common part
 - no match does nothing

Change-Id: Ib2d90889c79e8d35a78b8847d2b9e124cdc00a6c
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2016-11-03 12:50:19 +00:00
Iván Briano
9ea1b4c15b flash qmsi: Add support for device power management
Add the necessary infrstructure to support power management for the
QMSI Flash driver. If deep sleep is supported, this driver supports
saving its context to be restored on resume.

Jira: ZEP-1006
Change-Id: Ied88e86d13ef9e4e62bd6ac9d8454d9a9a3d2962
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-11-03 11:14:51 +00:00
Iván Briano
d53811ec73 dma qmsi: Add support for device power management
Add the necessary infrastructure to support power management for the
QMSI DMA driver. If deep sleep is supported, this driver supports
saving its context to be restored on resume.

Jira: ZEP-1005
Change-Id: I49f1f985eb0f250c777c6950178715fb794db537
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-11-03 11:14:51 +00:00
Iván Briano
aa4fab7be1 quark se: Enable power management features in QMSI
Enabling the power management features in QMSI requires passing the
ENABLE_RESTORE_CONTEXT definition to both the build of QMSI and to
every inclussion of a QMSI header.

Add the necessary -D flag to the Zephyr build when
CONFIG_SYS_POWER_DEEP_SLEEP is defined.

Jira: ZEP-995
Change-Id: If6ce5985a372a499c63dbbbb9efed49af5fc75b2
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-11-03 11:14:51 +00:00
Baohong Liu
3a8d3dd07d samples: lcd_hd44780: use unified kernel
Use unified kernel for lcd hd44780 app.

Some delays were rounded up to multiples of millisecond, since
k_sleep only takes multiples of millisecond. Based on the lcd
datasheet, this should not cause any problem.

updated some comments based on what the code is actually doing.

Change-Id: I533c822dbaea0246dcd62a76cc23ce0d8edd4630
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 01:46:11 +00:00
Anas Nashif
30c5be3f10 sensors: grove temp: convert to and build with unified kernel
Change-Id: I836802a97b83c31494f617f8f3ed6f6ffea592b7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:52 +00:00
Anas Nashif
8d78938a97 sensors: light: convert to and build with unified kernel
Change-Id: I05f1e7af66b7dec5616db449459bb07a445fe2a0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:51 +00:00
Anas Nashif
629393192f sensors: tmp112: convert to and build with unified kernel
Change-Id: I8ba57652db533fc19ebecf213dccf1564ba85f61
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:51 +00:00
Anas Nashif
79232914c9 sensors: th02: convert to and build with unified kernel
Change-Id: Idcdce36314dce4bfe9f6cf627c38b9f350b19355
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:50 +00:00
Anas Nashif
bf169afd46 sensors: sx9500: convert to and build with unified kernel
Change-Id: Ic3e8d0c59eda97759f1d56127f42120b0c0a6def
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:50 +00:00
Anas Nashif
5d3634d0b1 sensors: mcp9808: convert to and build with unified kernel
Change-Id: I8bd15fd5c353c2040ffb99e759b7739d435f2829
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:49 +00:00
Anas Nashif
ee23f1464b sensors: max44009: convert to and build with unified kernel
Change-Id: I024d00dfd264b9ca8afb682f4146176678440ed8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:49 +00:00
Anas Nashif
1dc946bda1 sensors: magn_polling: convert to and build with unified kernel
Change-Id: Ib0c364c1e9faa95adf8e7a5dde8d6aa1214d9771
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:48 +00:00
Anas Nashif
159b27f3c5 sensors: bmg160: convert to and build with unified kernel
Change-Id: I4571cc371dcbbfaaf1a6b3a9abacac1f4b6e2821
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:48 +00:00
Anas Nashif
9a82a81d58 sensors: bmi160: convert to and build with unified kernel
Change-Id: I63bf181b6ec84e21a2e83bb5bce4ffb57b3affe8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:47 +00:00
Anas Nashif
221bb6979b sensors: bme280: convert to and build with unified kernel
Change-Id: I721ae3a9b982ff4571e7e9bc966df8c79c4dc6c3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-03 01:45:46 +00:00
Sergio Rodriguez
cce647bf54 samples: watchdog: use unified kernel
Use unified kernel for the watchdog sample app.

Change-Id: I6b53f066033a451c3aafe7f3a528c7f3461ae305
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-03 01:39:52 +00:00
Sergio Rodriguez
3b0ecfa283 samples: current sensing : Use unified kernel for the current sensing app.
Change-Id: I739374a8134963bdca99f6de419809033a8a983e
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-03 01:39:34 +00:00
Sergio Rodriguez
7a0504e303 samples: soc_flash_nrf5: use unified kernel for SOC flash
Change-Id: I6f7a66d69919fe8d44b91ae52cb6f0aae6a3c7ba
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-03 01:39:17 +00:00
Baohong Liu
4b270bb544 samples: led_apa102c: use unified kernel
Use unified kernel for the led app.

Change-Id: Iadfcf9970bfa6a13f61b3b1833de2cf1d4af4b0b
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-02 17:32:11 -07:00
Baohong Liu
f70bf9366f samples: gpio: use unified kernel
Use unified kernel for gpio app.

Change-Id: I08a85212ef4a06ba702eb0e7654855a9bac559a4
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 00:25:51 +00:00
Baohong Liu
f3d0887fb0 samples: i2c_lsm9ds0: use unified kernel
Use unified kernel for i2c device lsm9ds0.

Change-Id: I1d8626571785bfc856e162bf5e1524a6530fe8e5
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 00:25:33 +00:00
Baohong Liu
4af945ed76 samples: rtc: use unified kernel
Use unified kernel for rtc app.

Change-Id: Ifafe48eb9d955b2954de9341c372e1fbc5538cf1
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 00:25:15 +00:00