Commit graph

41120 commits

Author SHA1 Message Date
Andrew Boie
15dc9f326e object-footprint: gitignore generated output
Change-Id: I438b8f4d28119817088fa006b8d6f3504089bcb4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-29 11:07:55 +00:00
Andrew Boie
baa6ef0798 benchmarks: use portable static interrupt APIs
These tests were using non-portable NANO_CPU_INT_REGISTER. They
now use IRQ_CONNECT, which lets us run these tests on all arches
and not just x86.

Change-Id: Idd4264c2650c851aa78356f01586edbadd014501
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-29 11:07:33 +00:00
Andrew Boie
184451ba02 docs: clarify MINGW installation instructions
Change-Id: Ibc9597bbc683fe79c0916408d7c1aa57612ab9b4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-29 11:06:52 +00:00
Andrew Boie
64f7f3da8d compare_footprint: Python 3 compatibility
The script will now run under either Python 2 or Python 3.

Change-Id: Ia7e6647b2331ff9edfbdec7b7357439f7095a3bc
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-29 11:06:01 +00:00
Andre Guedes
114e5ba186 pwm: Remove redundancy in Kconfig.qmsi
The PWM_QMSI_DEV_NAME and PWM_QMSI_NUM_PORTS options depend on PWM_QMSI
already so this patch removes the 'if PWM_QMSI' block since it is
redundant.

Change-Id: Iec303d27f088b96662fc58933eaa82fe9459cb59
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-29 11:05:23 +00:00
Tomasz Bursztyka
666e99b41b pinmux: Fix where to look for PINMUX_BASE_ADDR
Fixes this built error:
zephyr/drivers/pinmux/quark_mcu/pinmux_board_quark_se_dev.c:149:19:
error: 'PINMUX_BASE_ADDR' undeclared (first use in this function)
  _pinmux_defaults(PINMUX_BASE_ADDR);

Change-Id: I8302e4d6dbcf961e0c80f6bccf740a877bb364af
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-03-29 13:07:55 +02:00
Anas Nashif
9f76f7d1f7 kconfig: use menuconfig for PCI options
Change-Id: Ie1ccefc91ca0174dfea874bbda4723e6b49c7880
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-29 01:31:52 +00:00
Anas Nashif
897bb66e9f spi_test: remove dependency on driver name from kconfig
Use SPI_0 by default or SPI_1 if configured differently.

Change-Id: I63f39f63a4b70fded3a7af8061058ba4779e573e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-29 01:31:44 +00:00
Anas Nashif
1f239def74 boards: remove atom defconfig from basic minute-ia
This file was misplaced here. Atom board is now available only
for minnowboard.

Change-Id: If5a0d723600f957e2b024848b8cb8aac2e7a7ff9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-29 01:30:27 +00:00
Alexandre d'Alton
eac563ef27 arc: remove unecessary instruction and doc
lp_count register can be store directly to memory, it is actualy done,
and the instruction that precedes it has no effect.

Change-Id: I8b8fee6abd6f08eea38dd1ab5bbe61c25a2a1f7d
Signed-off-by: Alexandre d'Alton <alexandre.dalton@intel.com>
2016-03-29 01:25:49 +00:00
Alexandre d'Alton
f91e55b798 arc: implement stack checking
ARC CPU has stack checking feature that allows to trigger an exception
whenever the stack is incorrectly accessed.
This patch implements the stack_top and stack_base register updates on
context switches, and activates the Stack Checking bit of STATUS32
register when the CPU is in the context of a fiber or task.
As GCC accesses the non-yet allocated stack with frame pointer enabled,
this patch also add the omit-frame-pointer gcc flag in order to work
properly.

Change-Id: Ia9e224085a03bd29d682fb8f51f8e712f2ccb556
Signed-off-by: Alexandre d'Alton <alexandre.dalton@intel.com>
2016-03-29 01:25:49 +00:00
Daniel Leung
c65821718f i2c/quark_se_ss: Remove base address kconfig options
The base addresses are SoC specific so there is no need to make
configurable via kconfig.

Change-Id: Iaf8444f77513255d5f0112af6710243aae09f066
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-28 16:09:15 -07:00
Daniel Leung
72c83d8740 arc/quark_se_ss: clean up soc.h
Most of the #ifdef are not really needed, so clean up the file
for readability.

Change-Id: I4d15f3cb7ef4db9113d4cdadbd3309da6587c64e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-28 16:05:23 -07:00
Daniel Leung
3f408ee20a i2c/qmsi: rename *_INT_PRIORITY to *_IRQ_PRI
This is to standardize the kconfig for specifying IRQ priority.

Change-Id: Iab10655c6fc6f17c0c6dd49cb7a4e74fabcf852c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-28 15:59:04 -07:00
Daniel Leung
36678521c3 i2c/dw: rename *_INT_PRIORITY to *_IRQ_PRI
This is to standardize the kconfig for specifying IRQ priority.

Change-Id: I3a51b35e633dc7b1b841e9fa504bf0cfc0d4d575
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-28 15:59:04 -07:00
Daniel Leung
ee216548e6 i2c/atmel_sam3: rename *_INT_PRIORITY to *_IRQ_PRI
This is to standardize the kconfig for specifying IRQ priority.

Change-Id: I05ae4033e2c5431ba2727c5d4000ef07e14739c8
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-28 15:59:04 -07:00
Daniel Leung
546b8ade37 refactor common driver initialization priorities
Most of the SoC and board Kconfig use the same values for
driver initialization priorities. So refactor them, and
discard duplicate ones.

The shared IRQ init priority was changed so that the kernel
default init and device init priorities can be standardized
across all SoC/boards. Same goes for DesignWare SPI driver.

This also changes the UART_CONSOLE_PRIORITY and
IPM_CONSOLE_PRIORITY to UART_CONSOLE_INIT_PRIORITY and
IPM_CONSOLE_INIT_PRIORITY, to standardize across all drivers.

Note that this does not take away the ability to override
those values. This just provides reasonable defaults such
that there is virtually no need to override.

Change-Id: Ibbd95d802c637df06f9a2fd48763ee1e6f4ff627
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-28 15:58:29 -07:00
Daniel Leung
cecc4b0fb5 pinmux: remove base address and number of pins from kconfig
The pinmux base address and number of pins are now defined in SoC or board
header files instead of specifying them in kconfig. This is because
the pinmux ties directly to the SoC (or board expanders) so the base
address and number of pins do not need to be configurable in kconfig.

Change-Id: Ib6090d7d022b491f3fe8f522858281504c6302bb
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-28 15:58:29 -07:00
Daniel Leung
d7f45b8634 pinmux/galileo: extract kconfig options into its own file
This is to follow how kconfig are defined for other SoC/boards.

Origin: refactored from exising file
Change-Id: Ic83b8a336f1910f17b3cf4e7f029fd076ba1b6bb
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-28 15:58:29 -07:00
Anas Nashif
65bb5a324b Zephyr 1.2.0-rc1
Change-Id: I213138a6552ddf7dcac5afbb9c7f5f4957570133
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-27 18:35:53 +00:00
Daniel Leung
a2ba5d1ba3 spi/k64: remove SoC specific SPI constants from kconfig
The base address, IRQ line, chip select numbers, and clock
gating constants are static per SoC, so there is no need to
make them configurable in Kconfig.

Change-Id: I9f87ca29c28c38c42d4e4f1a3a41fa231f63ef03
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Daniel Leung
9c62a4a01f frdm_k64f: gpio: pinmux: remove base addr and irq from kconfig
The base address and IRQ line are static per SoC, so there is no need
to make them configurable in Kconfig.

Change-Id: Ib78401ff136c29642356f5bda9d6cd3e5c98bece
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Daniel Leung
7f6d4e37ee serial/stellaris: remove base addr, irq and clk freq from kconfig
The UART port base address, IRQ line and clock frequency are static
per SoC, so there is no need to make them configurable in Kconfig.

Change-Id: Ia252958d205e0100d1b92e2a12d4c22411bc94b9
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Daniel Leung
2a29e22c2f serial/k20: remove base addr, irq and clk freq from kconfig
The UART port base address, IRQ line and clock frequency are static
per SoC, so there is no need to make them configurable in Kconfig.

Change-Id: I79b142414143bc5ef585d3136a00375233de1723
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Daniel Leung
c215ef7213 kconfig: add conditions to device init priority defaults
This adds conditions to the default values for device init priorities,
and make them follow the dependencies on the config options. This cleans
up the resulting .config a bit, making it easier to read.

Change-Id: Ib05806ac6108d465ffe245142ecca7a51be6df22
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Daniel Leung
8df10d4584 kconfig: untangle ordering and dependencies
There are two major issues with the kconfig:

() Some of the config options have incorrect dependencies inside help
   under menuconfig. For example, CONFIG_GPIO depends on BOARD_GALILEO.

() Since the SoC and board specific kconfig files are parsed first,
   the help screen would say, for example, CONFIG_SPI is defined at
   arch/arm/soc/fsl_frdm_k64f/Kconfig. This is incorrect because
   the actual config is defined in drivers/spi/Kconfig.

These cause great confusion to users of menuconfig/xconfig.

To fix these, the SoC and board defaults are now to be parsed last.

Note that the position swapping of defaults in this patch is due to
the fact the the default parsed last will be used.

And, spi_test is broken due to the fact that it requires
CONFIG_SPI_INTEL_PORT_1, but never enables it anywhere. This is
bypassed for now.

Origin: refactored and edited from existing files
Change-Id: I2a4b1ae5be4d27e68c960aa47d91ef350f2d500f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Daniel Leung
c6390d559f kconfig: prefer default values that are defined later
This is in preparation to move SoC and board kconfig defaults
to be parsed later.

Change-Id: If24bdf310dac7034da63f34c0e2add173fe75844
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Daniel Leung
4babac063c kconfig: add a debug option to print defaults in menuconfig
This adds a debug option to print defaults and their conditions
inside config description under menuconfig/xconfig. This aids in
debugging of kconfig creation.

Change-Id: Ie651435f6b2115dac1bd3a6f7a1b3c2df3c9b0ed
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Vlad Dogaru
0e702a6ce3 sensor: add driver for BMP280
This is a temperature and atmospheric pressure chip.  The datasheet is
available at:
	https://www.adafruit.com/datasheets/BST-BMP280-DS001-11.pdf

Change-Id: I3406eb6c2c4da564757b8315323d0681d648b541
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-27 00:34:38 +00:00
Bogdan Davidoaia
a302451cc4 sensor: add driver for LIS3DH accelerometer
Add device driver for the LIS3DH I2C-based triaxial accelerometer
sensor, which supports reading data from the accel-x, accel-y and
accel-z channels.

Datasheet:
	http://www.st.com/web/en/resource/technical/document/datasheet/CD00274221.pdf

Application note:
	http://www.st.com/web/en/resource/technical/document/application_note/CD00290365.pdf

Change-Id: Ib51bd6346798249d850376e50d1c938eda8a3d28
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-03-27 00:34:30 +00:00
Ramesh Thomas
4104bbfb08 power_mgmt: Add device power management support
Added device power management hook infrastructure. Added
DEVICE_INIT_PM and SYS_INIT_PM macros that creates device
structures with the supplied device_ops structure containing
the hooks.

Added example support in gpio_dw driver.  Updated the sample
app and tested using LPS and Device Suspend Only policies.

Change-Id: I2fe347f8d8fd1041d8318e02738990deb8c5d68e
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-26 14:35:11 -04:00
Ramesh Thomas
bb19e6f82f power_mgmt: Make names consistent with new RFC
Changed names of Kconfig flags, variables, functions, files and
return codes consistent with names used in the RFC. Updated
relevant comments to match the changes.

Origin: Original
Change-Id: Ie7941032d7ad7af61fc02928f74538745e7966e8
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-26 14:35:11 -04:00
Genaro Saucedo Tejada
9241cfc2f0 kernel_event_logger: wrong parameters order on macro definition
API definition sys_k_event_logger_get_wait_timeout on public header
kernel_event_logger.h was passing the reference to logger struct on third
position instead of first, on sys_event_logger_get_wait_timeout call.
Resulting on error when API definition is followed.

Jira: ZEP-86
Change-Id: Ia54cd5ffe28a1fab7873bb49bd7452313ab92a02
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-03-26 13:52:02 +00:00
Dmitriy Korovkin
0986684e62 tests: Add test for microkernel early sleep functionality
Test verifies that a task_sleep() function can be used during the system
initialization, then it tests that when the k_server() starts, task_sleep()
call makes another task run.

For fibers, test that fiber_sleep() called during the system
initialization puts a fiber to sleep for the provided amount of ticks,
then check that fiber_sleep() called from a fiber running on the
fully functioning microkernel puts that fiber to sleep for the proiveded
amount of ticks.

Change-Id: Iec20b61d7e802a19b1ec074d2511345eed9f2407
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-26 10:17:22 +00:00
Dmitriy Korovkin
661d2f3a16 microkernel: Add support for *_sleep() during initialization
Add support for task_sleep() and fiber_sleep() during the
system initialization. When CONFIG_NANO_TIMEOUTS defined,
before the k_server() starts, kernel uses nanokernel
system clock announce and task sleep functionality.

To give device drivers early sleep functionality, the system
clock has to start on SECONDARY initialization level, same
as most of the drivers.

Change-Id: Ie1d391945cd1cfb9a5dc199783c2d224eb1b0ef3
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-26 10:17:15 +00:00
Dmitriy Korovkin
9b2452047d kernel: Combine nano_timers and nano_timeouts
To avoid code duplication nano_timers use nano_timeout
mechanism.

Change-Id: I916bffd2b86e29ee7b7ff7bbb009cd4c844e2a44
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-26 09:20:10 +00:00
Szymon Janc
e23e4c76e2 Bluetooth: Add support for resolving BR/EDR names
If BR/EDR device didn't provide name in EIR (or no EIR at all) names
are resolved after discovery is completed. Resolved names are put into
EIR block.

> HCI Event: Extended Inquiry Result (0x2f) plen 255
        Num responses: 1
        Address: F0:79:59:03:6B:30 (ASUSTek COMPUTER INC.)
        Page scan repetition mode: R1 (0x01)
        Page period mode: P0 (0x00)
        Class: 0x280424
          Major class: Audio/Video (headset, speaker, stereo, video, vcr)
          Minor class: Set-top box
          Capturing (Scanner, Microphone)
          Audio (Speaker, Microphone, Headset)
        Clock offset: 0x47d5
        RSSI: -88 dBm (0xa8)
> HCI Event: Inquiry Complete (0x01) plen 1
        Status: Success (0x00)
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
        Address: F0:79:59:03:6B:30 (ASUSTek COMPUTER INC.)
        Page scan repetition mode: R1 (0x01)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x47d5
> HCI Event: Command Status (0x0f) plen 4
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Remote Name Req Complete (0x07) plen 255
        Status: Success (0x00)
        Address: F0:79:59:03:6B:30 (ASUSTek COMPUTER INC.)
        Name: Nexus Player

Change-Id: Ica5f6cc8a7d9dc7a925025bc62faab2caec47dbb
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-26 05:57:34 +00:00
Maciek Borzecki
f8c24fb203 gpio/stm32: fix build
Build with GPIO port E failed due to a missing comma.

Change-Id: Ib8fa7f4d03ed4f4c713a3a8a16ad3b37fcf6b0b7
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-03-25 23:31:36 +00:00
Szymon Janc
e7daa90d6b Bluetooth: shell: Add support for BR/EDR discovery
This add shell commands to start and stop BR/EDR discovery.

Change-Id: Id7ea2c75a06842afd02708424930b27cfb65a1e9
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-25 19:28:33 +00:00
Szymon Janc
067d5cfb63 Bluetooth: Add support for notifying of BR/EDR inquiry results
This allows to notify application of inquiry results.

> HCI Event: Extended Inquiry Result (0x2f) plen 255
        Num responses: 1
        Address: C4:43:8F:A3:4D:83 (LG Electronics)
        Page scan repetition mode: R1 (0x01)
        Page period mode: P0 (0x00)
        Class: 0x5a020c
        ...
        Clock offset: 0x73e8
        RSSI: -66 dBm (0xbe)
        Name (complete): Nexus 5

> HCI Event: Extended Inquiry Result (0x2f) plen 255
        Num responses: 1
        Address: F0:79:59:03:6B:30 (ASUSTek COMPUTER INC.)
        Page scan repetition mode: R1 (0x01)
        Page period mode: P0 (0x00)
        Class: 0x280424
        ....
        Clock offset: 0x47d5
        RSSI: -88 dBm (0xa8)

Change-Id: I36215a7139ae49c50ef71a8b647204bf5063cd13
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-25 19:28:24 +00:00
Johan Hedberg
fd1aa712d0 Bluetooth: Clarify code comment
Change-Id: Ie5c15777c7fa904c8d631dac6e1d4796d35f906c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-25 19:26:43 +00:00
Johan Hedberg
ffc542e2fa Bluetooth: Move extern "C" declaration to right place
Change-Id: I60ad668366b0067af940b2ada14c83d5b7fc2107
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-25 19:26:32 +00:00
Vinicius Costa Gomes
1331deb2db pinmux_dev: Adds the STM32 pinmux dev driver
This driver will be used when changing pinmux functionality during
runtime.

Change-Id: I8dc7b36af13202b97183c5ee05932567e7396276
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-03-25 06:17:33 -04:00
Vinicius Costa Gomes
d872bb173c pinmux: Move STM32 boards to the pinmux model
This moves the STM32 based boards (Nucleo F103RB and STM32 Mini A15) to
the "new" pinmux model.

Change-Id: I190df271a6b83fafeec0b281cd4ee7cf13d7e7db
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-03-25 06:17:33 -04:00
Vinicius Costa Gomes
56bebf9206 pinmux_dev: Add driver using QMSI library
Change-Id: I81e3b60ac6c4d57e1978a64fdeb651ae52b23b77
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-03-25 06:17:33 -04:00
Vinicius Costa Gomes
da28760014 pinmux_dev: Add Quark MCU generic driver
This driver can be used for multiple boards based on the Quark
microcontroller family, the exceptions are Quark X1000 and Quark D1000.

Change-Id: I4c6624293515e4bbf31ac94a7f57905b4a9ef13d
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-03-25 06:17:33 -04:00
Vinicius Costa Gomes
95b4be9461 pinmux_dev: Add driver for Galileo board
Change-Id: I27d3ffc6dca56fa8704a269fee64b51ad1d18f1e
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-03-25 06:17:33 -04:00
Vinicius Costa Gomes
3a9a77e77c pinmux_dev: Add driver for Freescale FRDM K64F
Change-Id: I89fcb707f70e385354f099d27895ac8b30bbdb03
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-03-25 06:17:33 -04:00
Vinicius Costa Gomes
05cbf0b20b pinmux_dev: Add the pinmux_dev driver for Atmel SAM3X
This introduces the pinmux_dev driver for the Atmel SAM3X.

This driver implements what used to be the pinmux driver API, which
applications could use to modify the function of pins during runtime.

That functionality is now protected under the CONFIG_PINMUX_DEV option,
which should only be set during the early enabling of a new board, as
there is risk of damage to the board when misused.

Change-Id: I3aa00505d2771b53c41fe687c3e5230e804756be
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-03-25 06:17:33 -04:00
Vinicius Costa Gomes
03f920e50d pinmux: Move the Quark SE devboard to the pinmux model
Change-Id: I4d10956a15c49f439b04163b1e25b33854214e21
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-03-25 06:17:33 -04:00