Commit graph

41120 commits

Author SHA1 Message Date
Daniel Leung
52caf8cfc8 arm/fsl_frdm_k64f: fix kconfig hierarchy
This makes sure the CONFIG_GPIO_K64F_* kconfig options have correct
dependencies. Or else CONFIG_GPIO_K64F can be disabled, but all
the CONFIG_GPIO_K64F_{A,B,C,D,E} are enabled.

Same goes for SPI, FTM and pinmux.

Change-Id: I8d225dea714081b14b19006d61b8f3f6afafa5ee
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:15 -04:00
Daniel Leung
f8405637f7 drivers/gpio_dw: fix kconfig dependencies
The DesignWare GPIO options should really depend on whether
GPIO_DW is enabled.

Change-Id: I98b2964d6a0afdac89dc66a78342076afa6feec5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:15 -04:00
Daniel Leung
13a591261d drivers/shared_irq: fix kconfig hierarchy
Add a menu to enclose all the shared IRQ kconfig options.

Change-Id: I8083204c53f60022c06e9c683fa9544fdc278f32
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:14 -04:00
Daniel Leung
1268ab9f1d boards: add a menu surrounding board Kconfig
This adds a menu to enclose all board Kconfig. So the board
configs do not appear on the top level out of context in
menuconfig. This also reflects the SoC options where these are
under menus for each architecture.

Change-Id: I76ce2bf1acf7cbd2673ceb2eac71e96cdca2ff35
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:14 -04:00
Daniel Leung
ef83c14c4a arch: move kconfig SoC selection to top level
The SoC selections for each architecture are moved to the top level
in menuconfig and xconfig. This makes it more intuitive to select
architecture -> SoC -> then board, avoiding an additional trip to
go into the architecture menu to select SoC.

Change-Id: I57a78a09adfc4bb12423915b6ad14ceb74381a2b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:14 -04:00
Daniel Leung
25459c137c arch/x86: limit floating point kconfig options to supported CPUs
It makes no sense to allow enabling support for floating point
registers when the CPU has no FPU.

Change-Id: If51187033fc84957721d87fa6e79ef31124f4b14
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:14 -04:00
Daniel Leung
1eddc97b74 arch/x86: hide CPU family Kconfig options
These options should be selected by individual SoC automatically,
and should not be visible options. Or else it would be possible to
select Quark SoCs and telling Kconfig it is from Atom family (which
is incorrect).

Change-Id: I17a6cf713378333e0e7942aa49b381b5eb9526b5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-16 01:38:07 +00:00
Daniel Leung
b8b6fb5747 boards: make individual boards dependent on SoC selections
This makes the board selection dependent on SoC selection. For example,
select Atmel SAM3 will only allow "Arduino Due" as board selection.
This disallows incompatible SoC/board combination, like K64F with
Arduino Due.

JIRA: ZEP-106
Change-Id: I675961cf33db5a0058fc68f14c8f16978f9c6b95
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-16 01:38:06 +00:00
Vlad Dogaru
e479839fa1 samples: Add sample app for sx9500 sensor driver
This illustrates the usage of the sensor API, using either triggers or
periodic reads from the driver.

Origin: Original
Change-Id: Ief7451fc4771b9459a2b3b7ed0a33341a7710cc3
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
447489dc84 sensor: Add sx9500 SAR proximity driver
Support for data-ready and near/far triggers is included.  Datasheet the
sensor available at <http://www.semtech.com/images/datasheet/sx9500_ag.pdf>.

Origin: Original
Change-Id: Idd491a8bad7e119b0ed66e655955228ffdac6e76
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
49d96d95ab sensor: Add threshold trigger support for MCP9808
The MCP9808 supports threshold triggering.  Add support for this feature
in the driver and the sample application.

If triggering is activated, the driver can create its own fiber or use
the system-wide sensor fiber.

Origin: Original
Change-Id: Ie825a22245cb48cbdffba3049011e4d305975d53
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
d30b3ca516 samples: Add sample app for MCP9808 sensor
The app simply reads the temperature from the connected MCP9808 sensor.
It forces -O0 compile flags, as the default (-Os) triggers a compiler
bug when converting temperature readings.

Origin: Original
Change-Id: I0654543e3d361a862bdf78b44fdc1430cb6aad51
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
68be7b7d26 sensor: Add driver for MCP9808 temperature sensor
The driver only supports simple temperature readings.  It does not
support the alarm feature.  Datasheet available at
<http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf>.

Origin: Original
Change-Id: I283e6697fc6947975323d280f5ff0ba625fac5a9
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
48bdd70a07 Add infrastructure for sensor drivers
Origin: Original
Change-Id: I846b1601f1bdf15ad068b27baefc4b23ffab81e3
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 19:00:08 +00:00
Vlad Dogaru
d1c7c7b7ef Introduce new sensor API
Sensor drivers expose one or more channels, corresponding to each
individual quantity they can measure.  Such quantities may be different
altogether (e.g. temperature and pressure) or different axes for the
same unit (e.g. three axes of acceleration).  Before reading channels, a
driver must be explicitly instructed to obtain a sample from the device.
This helps accommodate sensors which can only read all channels at once,
and also helps ensure coherence of measurements and optimize I2C/SPI
traffic.

Channels can be read as floating point values or struct sensor_value.
The latter consists of a pair of integers and a type field which
dictates how to interpret said integers.  The most common type is INT
(where the second value is ignored) or INT_PLUS_MICRO, which means the
second value should be multiplied by 1.0e-6 and added to the first.

A sensor driver may support one or more triggers, corresponding to
interrupts or timers.  Registering for a trigger involves supplying the
driver with a callback which is called when a condition is reached.
Examples of trigger types are: data ready, timer expiration, any-motion,
near/far.

Finally, sensors support attributes such as sample frequency,
measurement accuracy or threshold values for triggers.  However, runtime
configuration is discouraged, in the interest of keeping code simple.

Origin: Original
Change-Id: Id290fe544b6f7eccc4b109f3912fca1692e55623
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:59:47 +00:00
Juan Manuel Cruz
57cd459e71 debug: fixes issue on debug tracing for pool struct
Change-Id: I6af44e2388db76b4f6d38f634ae983a0d458871d
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-14 22:17:10 +00:00
Anas Nashif
90a1b22f60 qemu_x86_iamcu: remove board and use defconfig from qemu_x86
This board is now part of qemu_x86 and shares the same file except
the configuration which makes it build with IAMCU.

JIRA: ZEP-103

Change-Id: I9a9911d013b493240c089ce71e9f95687dcc02a3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 20:54:09 +00:00
Anas Nashif
e65df2562d ia32: compile with soft-float when using IAMCU ABI
When building with IAMCU, make sure we set the soft-float, otherwise
build would fail with unsupported instruction errors.

JIRA: ZEP-103

Change-Id: I7a5f107a2df50799a7f6dd4aba36c1a977c1461d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 20:54:08 +00:00
Anas Nashif
7bf6ce5b3b build: support multiple defconfigs per board
We will now look for the defconfig to be used using wildcards which will
allow us to host similar boards in the same directory and share all existing
files.

JIRA: ZEP-103

Change-Id: Icfe5dc2fa4b2c4e21e6b1285d80e0c844d430d7d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 20:54:08 +00:00
Anas Nashif
05ea5d0cf2 kconfig: Do not put architecture in the title
This is from old kconfig structure and right now it shows
the wrong architecture in the menu. We have the architecture in
CONFIG_ARCH now.

Change-Id: Ifee12ab5a38e9fddb44c74aa3058970f9bd0165f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:51 -04:00
Anas Nashif
64b8a3868e kconfig: move IAMCU option under processor capabilities
Change-Id: Ieaba79e0750ed10f5d4b7204146dbc47775695bf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:51 -04:00
Anas Nashif
207d0e799e kconfig: remove redundant EVENT_LOGGER option
KERNEL_EVENT_LOGGER selects EVENT_LOGGER which is then used to
enabling building. Skip EVENT_LOGGER and use KERNEL_EVENT_LOGGER
directly.

Change-Id: Ib9cf3a58b12bf4e78f264d8e8ac48a8104120c3b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:51 -04:00
Anas Nashif
a033c14dd1 kconfig: add power management options into a menu
Change-Id: I8e847c7f3305b63647f01a83a002a7962056732a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:50 -04:00
Anas Nashif
84a5557eb3 kconfig: move ARM bootloader options to bootloader menu
Change-Id: Ia3612413f68691d9e9364f278aada6b9c3296fb5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:50 -04:00
Anas Nashif
75c5e51ba5 kconfig: remove optional flag for boards
Change-Id: I9cc5a7a6d5fc0aa504d005b413ad5fa03168d9f0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:50 -04:00
Anas Nashif
a13b04e022 kernel: fix boot banner option
Add missing option for adding time stamp to boot banner.

Change-Id: Idda61feeef4a89c1aa8bb7e81b52272babeb1efe
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:50 -04:00
Anas Nashif
a04e7b653b pinmux: do not depend on GPIO
Making pinmux depend on GPIO breaks many tests and configurations
when running on real hardware. This should be added as local
configuration in the defconfig instead.

Change-Id: Ibbf1c9a3428ed692937383bf85218b0c120cbe44
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 18:40:31 +00:00
Johan Hedberg
e4e04adb88 Bluetooth: Call HCI_Reset synchronously to catch errors
Change-Id: I882ec6ce5823afbf3cd423c36e0ac740c69574ce
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-14 18:05:24 +02:00
Johan Hedberg
54f5600fb5 Bluetooth: Take advantage of hci_cmd_done() helper
Change-Id: Id4945656407e567dcfe764d5d4df04427c8483af
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-14 18:05:24 +02:00
Johan Hedberg
809a4b847f Bluetooth: Fix print format for 4-byte opcodes
Change-Id: Ie37a6e02a5c024ccc02a2dbb17f30b16a4043406
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-14 18:05:24 +02:00
Szymon Janc
bf497e959a Bluetooth: shell: Add support for outgoing BR/EDR connections
This allows to initiate BR/EDR connection with specified address.

Change-Id: I99f0d7dff29384926d3bf739831c7460a7fb5f68
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-14 16:03:20 +00:00
Jukka Rissanen
c07ac4d072 net: apps: Change dtls-client to use common testing header file
Move network testing setup from dtls-client to common net_testing.h
file which makes the application much simpler.

Change-Id: I5a727325c22f98170f12620629898e5ed052b707
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 15:11:46 +00:00
Jukka Rissanen
8399fc4b3d net: apps: Change dtls-server to use common testing header file
Move network testing setup from dtls-server to common net_testing.h
file which makes the application much simpler.

Change-Id: Iacd99917cda3efc4cd92d0f48a8cbbc259ef7a84
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 15:11:23 +00:00
Jukka Rissanen
d8c495f24b net: apps: Fix connectivity between echo-server and client
If the echo-server and echo-client are run in real hw, then
we need to add the used IPv6 prefix to the system. Otherwise
the client is not able to send anything because there is no
route to 2001:db8::/64 network that is used in these examples.

Change-Id: I3a00b77acf1329b3e448bd62ec38cc408c0bd086
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 15:11:23 +00:00
Ravi kumar Veeramally
a77ab4f4e2 net: apps: Update CoAP apps to use net_testing header file
Update CoAP apps project configuration files and also update
according to common net_testing header file.

Change-Id: I09294dfd71e3d0cac980be4ae6d142cc3a59d85c
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-14 16:11:51 +02:00
Ravi kumar Veeramally
6d740fd4ca net: coap: Use correct network buffer in registration
Need to use the network buffer when sending CoAP serial message
because the message was constructed to net_buf.

Change-Id: I9422ff3f5f93945f1f9f91f2ed8572e3715338ce
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-14 12:48:35 +00:00
Jukka Rissanen
b650e8edb1 net: apps: User can set the loopback test count
User can set the desired number of network packets that are
sent. There is an example config that sends 10000 packets
and then stops the test application.

Change-Id: I5aa9049236f7bebdc9ea9997b9eb1f672c6adcbf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 12:45:07 +00:00
Jukka Rissanen
b8f28079ec net: apps: Fix the loopback test application
The loopback test application works now and it verifies that
the data sent is the same as data received. This fixes the
issue described in bug ZEP-101.

Change-Id: I1babfab4db9d4df0e769711aa41983366a8b5065
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 12:44:58 +00:00
Szymon Janc
86f9934e34 boards: Fix override of HPET timer interrupt trigger
CONFIG_HPET_TIMER_LEVEL_LOW and CONFIG_HPET_TIMER_RISING_EDGE are
selected from same choice option so cannot be both selected.

Since HPET_TIMER_FALLING_EDGE is the default only options overriding
this were left in defconfig files.

Fix following:
  Merging prj_x86.conf
  .config:10:warning: override: HPET_TIMER_RISING_EDGE changes choice
   state

Change-Id: I5c88d2c0ae309afa11d9fae116235a8a424a2408
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-14 12:36:01 +00:00
Jukka Rissanen
37882875ef net: coap: Fix compilation error
The commit cd8d4eb2b7 caused
compilation error in coap.

Change-Id: Ie6fb24d7f213a12936d75a2a2fac350e4965e0b8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 12:14:07 +00:00
Szymon Janc
8d154104b6 Bluetooth: Add support for outgoing BR/EDR connections
This allows to create outgoing BR/EDR connection and cancel pending
connection before it succeed.

Change-Id: I5c08bb2e89f79c09fa7930f860d6080d902186a1
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-14 11:37:11 +00:00
Jukka Rissanen
cd8d4eb2b7 net: User must provide storage for local IP address
When user creates a socket using net_context_get(), the function
requires local endpoint IP address. This should not be a NULL
pointer because the storage for that IP address was statically
allocated inside the function. Because of this the user needs
to allocate the storage for this and pass that local IP address
to the function. The net_context_get() will fill that local
address to sane value if user passes ANY address (== all bytes
are zeroes) to it.

Change-Id: I88314957f07912d9ecbe517a2402822401d81bd9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 11:05:52 +00:00
Jukka Rissanen
05e95423e5 net: tinydtls: Fix compile error if IPv4 was activated
Change-Id: Ic86ed449c863d9f2fb354067df076c35e0b4d51c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 11:03:33 +00:00
Szymon Janc
72d82777c0 Bluetooth: Add HCI commands definitions for BR/EDR connections
Change-Id: I704658c657c5ee1e08cb6a9e7119494ff9ceced5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-14 10:37:00 +00:00
Luiz Augusto von Dentz
4aae7ec31f Bluetooth: Fix header documentation of GATT service samples
Change-Id: I8dc2643aa755811549cc54fef0be0ec589e2dab9
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-14 11:04:22 +02:00
Dan Kalowsky
983ec93bd4 arch: arm: move nmi to common location
The nmi_on_reset.S functions are used by all ARM platforms.  It
makes no sense to repeat the same code for all platforms.  Moving
the code from each SOC implementation to arch/arm/core.

The same treatment for the NMI_INIT() macro.  Moving it from a per
SOC implementation to the include/arch/arm/cortex_m/nmi.h.

Change-Id: I574d8880a44046cc7b9e1b635e80d6e83657b8c1
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-03-12 03:20:36 +00:00
Laurentiu Palcu
27a3f8bb10 spi: dw: arc: add delay between writing DR strobe bit and reading FIFO
According to documentation, there must be at least one cycle delay
between two consecutive writes of the DR register. Apparently, this is
true for reading too, though undocumented.

The read_dr() inline function is called as follows:

*(spi->rx_buf) = read_dr(info->regs);

which the compiler, with full optimizations on, turns it into:

ld_s       r2,[r1,24]       <- the spi->rx_buf
sr         0x80000000,[r4]  <- this is the strobe bit write !!!
lr         r4,[r4]          <- this is the FIFO read!!!
stb        r4,[r2]          <- store the result

Unfortunately, the read from the FIFO is always 0 since the FIFO data is
not yet available.

During my investigations, I found that the following code works:

sys_out32(1 << 31, info->regs + 0xd);
*(spi->rx_buf) = sys_in32(info->regs + 0xd);

This does, basically, the same thing. But the compiler inserts an
instruction in between the write/read:

sr         0x80000000,[r4] <- write of the strobe bit!!!
ld_s       r2,[r1,24]      <- the pointer goes to r2
lr         r4,[r4]         <- read from FIFO!!!
stb        r4,[r2]         <- store the result

A single clock cycle between writing the register and reading seems
to be enough for the data to become available for reading.

This patch adds a nop in the read_dr() inline function.

Change-Id: I0c216d5738d5771835b1052e2e83363e8e3abf0c
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-03-12 03:18:54 +00:00
Sergio Rodriguez
07da8afd4d aio: QMSI analog comparator driver
This creates the QMSI comparator driver which is simply a shim driver
based on the comparator driver provided by QMSI BSP.

In order to enable this driver, the following options should be set:
CONFIG_QMSI_DRIVERS=y
CONFIG_QMSI_INSTALL_PATH="/path/to/libqmsi/directory"
CONFIG_AIO_COMPARATOR=y
CONFIG_AIO_QMSI_COMPARATOR=y

Origin of the file: Original

Change-Id: Iad01cb80f7bb1eff1710cd76cd0afeb70c311e04
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-03-12 03:17:59 +00:00
Andrew Boie
ca094b1691 sanitycheck: enable qemu_x86_iamcu and prefer it over qemu_x86
Rationale for defaulting to IAMCU variant is that our most
interesting x86 boards use this calling convention. --all
will test both.

Change-Id: Idaddfec51a74ae85691d348adeeb88a8528060ea
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-12 02:24:51 +00:00
Andrew Boie
e79c960dd8 HACK: qemu: change e_machine for IAMCU binaries
For some strange reason IAMCU sets e_machine to 0x06 which causes
QEMU to freak out. This is just x86 code with a different C
calling convention, hack it back to 0x03 (EM_386) before running
under the emulator.

Change-Id: Ia5d51b771cad41f3013eb3d6a17912c8909c9bac
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-12 02:24:46 +00:00