Commit graph

19237 commits

Author SHA1 Message Date
Daniel Leung
01fdf3ad12 samples/build_test: add build test for i2c_quark_se_ss
Add a build test for the i2c_quark_se_ss driver to catch any compilation
issue.

Change-Id: Id7342c07f3630252a9a06b4afde9eea8f423287d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:04 -05:00
Daniel Leung
a56ed39825 i2c/i2c_quark_se_ss: fix build errors
Change-Id: I21f09c32f080aea06d65097549327489a81b57ba
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:04 -05:00
Tomasz Bursztyka
3963ae5060 nanokernel: Expose publicly nano_timer_wait
This is part of the convenience wrapper for timers as well as
nano_timer_init(), nano_timer_start(), etc...

Change-Id: I256e16682e5520eac2b590afcaf00df8b6e8ffd6
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
590aa82517 sanity: disable mem_safe testcase on iamcu platforms
clflush and mfence are not supported on `iamcu'

Change-Id: I25b7c582de3b8e2bbea3f219d4655c16763410f8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
c25d6c5d63 loapic: handle spurious interrupts
A special situation may occur when a processor raises its task
priority to be greater than or equal to the level of the
interrupt for which the processor INTR signal is currently
being asserted. If at the time the INTA cycle is issued, the
interrupt that was to be dispensed has become masked (programmed
by software), the local APIC will deliver a spurious-interrupt
vector. Dispensing the spurious-interrupt vector does not affect
the ISR, so the handler for this vector should return without an EOI.

Change-Id: I4cf4744bd6efd68b72e2c380269de4181dc80bd9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
407d9e050b x86: irq_offload: don't use the last vector
The APIC by default uses vector 0xFF for the spurious interrupt
vector as described in the x86 CPU manual volume 3 section 10.9.
Make this its own config option defaulting to 32.

MVIC doesn't have a spurious interrupt vector, and due to the
fixed IRQ-to-vector mapping for this controller, continue
to use the last available entry.

Change-Id: I29bd09df700629dc0d15b30a6ae590b0df1ef890
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
a0e427f8a4 x86: remove loapic_int_vec_trigger()
This was only needed for an older implementation of software interrupts,
now superseded by the irq_offload() API (which doesn't interact with
the interrupt controller at all)

Change-Id: I8aa696d370ae1799872f6d70de69f3cb5b47456a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
4307552dab tests: latency_measure: use irq_offload()
Change-Id: I4f109652a4d778b641c7646a48309c552eb865dc
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
3589695508 ipi: rename to ipm
To many people, IPI connotes inter-processor interrupts on SMP
systems. Rename this to IPM, or Inter-Processor Mailboxes.

Change-Id: I032815e23c69a8297c0a43992132441c240fb71e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
f6f81868f8 build: Remove PROJECTINCLUDE from application makefiles
PROJECTINCLUDE is not required in app makefiles.

Change-Id: I3751b7c51c453dfe47d207bb11d171138668c4e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
3a87dae54d sanitize use of ARCH/SRCARCH
We now only use ARCH and avoid duplication of the same definition.

Change-Id: Ia61059b906a2ebc31e703412bead948997975d58
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
801874d71f build: remove more unused linux code
Change-Id: Iac7472e6cdf002c850947375db7072f9a0d29e58
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
9fe306bc2a Generate stack usage information only when enabled
This will only generate the .su files when CONFIG_STACK_USAGE
is specified, otherwise the tree will be full of .su files.

Change-Id: I3ffc7a7f5ab09aaae49ff65e8ad5de0832370777
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
cf81e1ff87 gpio: gpio_dw_registers.h is local to the file including it
Change-Id: I501a6fd2239511d46236fade47fc41d69093471d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
487660def2 quark_se: shared_mem.h is local to the file including it
Change-Id: I7071dbb6e43a04a48aaff7462e5e5dd395c7b137
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
0a272bc420 fixed check for clang compiler
Use defined(__clang__) otherwise it might fail in some cases.

Change-Id: Ifb2e1cd971325e2a7f87e530e5ee921a5fcee6b9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
938d8958a5 remove stray defconfig left behind during rebase
This one exists in configs/ now.

Change-Id: I7b75f16a837e58dbfaa2c2e3cf3666a89f4b0e26
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
66233116ff kconfig: define CONFIG_PLATFORM only once
define CONFIG_PLATFORM only once in arch/Kconfig and set it
for every platform.

Change-Id: I8554bb36d2d15c3ee71fa63dfc3a763ebca956ee
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Dirk Brandewie
fa2441534a x86: kernel move excstub.S back to core
excecptions are handled the same for i386_sysV_abi and iamcu calling
conventions ATM since we do not have any exceptions that we can
recover from there is no reason to have seperate implementations.

Change-Id: Ica8b332d7756a91b56f7080ac74771ad25d32753
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:25:04 -05:00
Dirk Brandewie
88ce5bc8f5 kernel: remove CONFIG_INT_LATENCY_BENCHMARK fences from code path
Add null definitions for the interrupt latency measurement API so we
can remove compile fences in C code.

Change-Id: If86eedf79afcb49002108814dd4fb864956eb667
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
a50f923504 x86: fatal: report vector number of spurious interrupts
Change-Id: I79de1a77d2b5f87aa3bd1a7aebd0253dbb069252
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
65c16621a1 kernel_event_logger: fix function defintion
functions defined in header files needs to be 'static inline' to
avoid linker issues if they are used more than once.

Change-Id: I2feb3560bde7cbc9a5c7932eca585be8036f3b25
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
902eb1d5f1 loapic: expose _loapic_isr_vector_get() in header
Other internal functions are shown in this header, no reason to
keep this a secret.

Change-Id: Icb7d36206148c281f1960d1ac10368d9bb3033f1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:03 -05:00
Tomasz Bursztyka
ce31c524f2 i2c: Remove all polling based functions
Now that i2c is fully synchronous on top of an interrupt based
implementation, polling mode can be removed. Applying the API change
into the existing drivers.

Change-Id: I05d2a6089743b6b69f7c9da6312057134578e2f7
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:25:03 -05:00
Andrew Boie
7770c3ed9d x86: mvic: re-load IDT if it is modified
According to the datasheet, there is some caching going on as a 
performance optimization and the IDT needs to be re-loaded if any
changes are made at runtime.

Change-Id: I23864e1109907512066a9f8f3a36e3f719b9174b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
ff49fa0685 i2c/quark_se_ss: create empty .set_callback()
The i2c_set_callback() does not check for NULL pointers
in driver's API struct. So create an empty set_callback()
function to avoid runtime exceptions, if it is called.

Change-Id: Iad8fed62228d10d42b8189e76873eb4c2ad12eb3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
77d167d004 ioapic: move common init code into driver
The initialization code and macros are the same. So extracts it
and puts it into the driver. This is another step to follow
the driver model.

Those empty C files are there because the current Kbuild
requires Makefile to be present at those directories,
(due to arch/x86/Kbuild), which requires building some object
files. So the empty source files are there to produce empty
object files to satisfy this.

Change-Id: I14056347ea14cff227d9e8960192e8673c0019b8
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
921ee03094 loapic: move common init code into driver
The initialization code and macros are the same. So extracts it
and puts it into the driver. This is another step to follow
the driver model.

Change-Id: I1d379068f64855d5d4595838040ec50f97f638a0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
8778152298 i8259: move init code into driver
The initialization code and macros are the same. So extracts it
and puts it into the driver. This is another step to follow
the driver model.

Change-Id: I1af8b2888779b2b58367feaff9ee1a6d97b4873c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
a6f195937e x86/qemu_x86: remove empty init function
There is no need to do empty initialization.

Change-Id: Ic6a4a26e61901b345ccd638af550ca1352dd7b43
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
4331244352 x86/ia32: remove empty init function
There is no need to do empty initialization.

Change-Id: Ic3067d519486ee0ce31ba5937f9fc2c49401058e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
fe44e29da8 arc/quark_se_ss: remove no longer referenced UART #defines
Change-Id: I9c6da7cc3cb3ff8951cd283d4d7cc877148533f5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
d51f3dfd5d arm/qemu_arm: clean up no longer referenced UART #defines
Change-Id: I1993d94856f07f633422107b9b35f0d3df95ae5c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
03afb32308 arc/generic_arc: clean up no longer referenced UART #defines
Change-Id: I1fd2bc92362097281c549d9c8b5ec10377dbfd64
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Daniel Leung
f12df08085 arm/fsl_frdm_k64f: clean up UART defines in board.h
These #defines are no longer needed.

Change-Id: I70be4c3b330faddb0a5edf3eb3098b864b71e8e1
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
a9f6f89e84 drivers/console: Add support for editing the line internally
Add support for forward/backward ANSI sequences and the ability to
enter new text while the cursor is somewhere in the middle of the line
rather than at the end of it. printk is introduced into the game
rather than the old write_uart() since we need to make use of the
%u format string support for creating the ANSI sequence to move
backward/forward the right number of characters.

Change-Id: I41f880fc5de773573147c5a291e2cbe94d5370a4
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
f88cccd2b5 drivers/console: Handle basic control characters cleanly
By default, since we don't have special support for control characters
we should simply ignore them. This includes both pure (single) control
characters as well as ANSI escape sequences. The most important
control character to support for basic editing is Backspace.

The terminal creates a Delete (DEL) character by default when
Backspace is pressed. It also treats the Backspace character ('\b') as
a non-destructive backspace. To create the effect of destructive
backspace we have to send the sequence "\b \b".

Change-Id: Idc942d09be2a84b8dd0a60ace8429102c6c7e355
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
26484222ef lib/libc: Add implementation for isprint()
Add a simple implementation of isprint() which is used to test for a
printable character.

Change-Id: I0ebca10ec0f8e43ee245f6508c5b82c6e207bd32
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
6147fc6384 drivers/console: Ignore characters when runnning out of buffer space
To clean up the logic and prepare for more control character support,
change the behavior so that instead of treating end of buffer as a
forced line break simply stop incrementing the position variable until
getting a carriage return.

Change-Id: Ie3970cb779dac3c826a3d21cf0b9ae57a43eddb2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
1c35329dc0 drivers/console: Remove unnecessary check for line feed character
The terminal doesn't generate line feed ('\n') when pressing return,
rather only a carriage return, so we can simplify the condition for
handling end of line.

Change-Id: I3eef8c6af19c43ef98ccdd9a5e3662d280834425
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Allan Stephens
ed78a03da2 doc: Enhance information about microkernel mailboxes
Completely overhauls Kernel Primer section on mailboxes to fill in
a host of omissions, correct errors, and improve readability.

Change-Id: I7f27230f59a593f6b7f44f399363ba423156b43e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
5355aa8a76 Bluetooth: samples/shell: Add support for custom prompt callback
Change-Id: Ib5d305b4e98d5bcf7c14172494f452c35149a8de
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
610186b48a Bluetooth: Fix HCI driver Kconfig references in samples
Now that the H:4 driver is the default it doesn't have to be
explicitly enabled anymore. The only exception is the "no default
driver" option that's needed by the test_bluetooth unit test.

Change-Id: Ie582d51202714e314b76ffa9659c7a232a18fc1a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
5305003b32 Bluetooth: Use h4_* prefix for H:4 driver internal symbols
Now that the HCI driver is called H:4 use the shorter driver-specific
prefix h4_* for its internal symbols.

Change-Id: Icdab1147e5ec31f84e0a3d810192ddd462f4dfdd
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
4bb1391c7d Bluetooth: Rename UART driver to H:4 driver
We'll in the future also have a three-wire UART (H:5) HCI driver, so
the current H:4 driver cannot have a generic name.

Change-Id: Id326ae63d6f4d273d0d0c6120143e2f8d62968d1
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
966acc1980 Bluetooth: Don't default to continuous scanning with BT_LE_SCAN_ACTIVE
Change-Id: I76d7db24bb9459f1df1d1e9881accc970b60aaf8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
c692c1672a Bluetooth: Fix passing bool instead of NULL pointer
Change-Id: I230c7b450587d85ba96cd4c71653eff0d9d56dcc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:03 -05:00
Arkadiusz Lichwa
bf8179be9e Bluetooth: BR/EDR: Enforce BLUETOOTH_CONN be set
Whenever selects BR/EDR support in Kconfig, make BLUETOOTH_CONN
option be set as well due to for BR/EDR devices fundamental behaviour
is interact with others by making ACL based connections.

Change-Id: Ieffd2fc6aa47278112be177e5a7e2021e50b0fa3
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:25:03 -05:00
Arkadiusz Lichwa
f0572cfb61 Bluetooth: BR/EDR: Update of hci_disconn_complete
As a cleanup of just made disconnection don't touch LE specific
actions.

Change-Id: I0c7c42f47ac8f6683380124df571fa2b2afbf526
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:25:03 -05:00
Arkadiusz Lichwa
853ab787e7 Bluetooth: BR/EDR: Initial connection complete handling
Enables getting by host connection complete event and handle
internal state of related to the event connection object.

Change-Id: Ie6252ff33cc2e1fff5a4ce746fda7c3a59bf8aab
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:25:03 -05:00