Commit graph

41176 commits

Author SHA1 Message Date
Andre Guedes
0524af6444 device: Fix typo in Doxygen comments
Change-Id: I76366b057966bbd6e74433be5eab2b3842bb5481
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:17 -05:00
Andrew Boie
d9cfbd5a61 interrupts: new static IRQ API
The interrupt API has been redesigned:

- irq_connect() for dynamic interrupts renamed to irq_connect_dynamic().
  It will be used in situations where the new static irq_connect()
  won't work, i.e. the value of arguments can't be computed at build time
- a new API for static interrupts replaces irq_connect(). it is used
  exactly the same way as its dynamic counterpart. The old static irq
  macros will be removed
- Separate stub assembly files are no longer needed as the stubs are now
  generated inline with irq_connect()

ReST documentation updated for the changed API. Some detail about the
IDT in ROM added, and an oblique reference to the internal-only
_irq_handler_set() API removed; we don't talk about internal APIs in
the official documentation.

Change-Id: I280519993da0e0fe671eb537a876f67de33d3cd4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:17 -05:00
Yonattan Louise
4a2ce3c0c9 mingw: change backslashes to forward slashes
If the path of the SOURCE_DIR has the windows format. We change the
backslashes to avoid escaping the characters.

Change-Id: I93247ade884374b292cd34176dee81f53796da8a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:17 -05:00
Louise Mendoza
947fb40ef3 Removing directory link to the source tree.
Removes the symbolic link to the source tree directory that is created
inside the outdir directory.
This link is not being used and is created as a complete copy of the
source tree on windows.

Change-Id: Icd430f3423175151589c15559d57b5ecfc0a0853
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:17 -05:00
Dirk Brandewie
13075f59bd x86: Replace CONFIG_IAMCU with CONFIG_X86_IAMCU
We are checking against the wrong option, which does not exist.

Change-Id: Ied24daa0930bc4629750ea90f3ac6dbc45e87fff
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:25:17 -05:00
Andre Guedes
e0d353baea i2c: Set I2C_MSG_STOP in i2c_write and i2c_read
This patch changes i2c_write and i2c_read APIs so they explicitly set
the I2C_MSG_STOP flag to their message to ensure that the I2C operation
is actually terminated once that message is sent.

Change-Id: Iea4da35b49ed01bee906679dece8638057d509ff
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:17 -05:00
Andre Guedes
565cb2b020 quark_se: Fix I2C-related options selection
Currently, if we disable I2C_DW through 'menuconfig', I2C_DW_0* and
I2C_DW_1* options are not disabled even if they depend on I2C_DW
option. This makes the menuconfig confusing and we end up with the
wrong config set in .config file:

...
CONFIG_I2C_DW is not set
CONFIG_I2C_DW_0=y
...
CONFIG_I2C_DW_1=y
...

This patch fixes this issue by surrounding the I2C_DW_0* and I2C_DW_1*
options with 'if I2C_DW'.

Change-Id: I7e949b066425bca2533f8b84b9ea7b1915369ff0
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:17 -05:00
Andre Guedes
ecfcb6f5e5 i2c: Move general configs to the top of Kconfig
This patch moves the config options I2C_STATUS_DELAY, I2C_CLOCK_SPEED
and I2C_DEBUG to the top of the Kconfig file. These options are
independent of the device driver and should be placed together with
option I2C_INIT_PRIORITY which is also independent.

Change-Id: I2297f4c31c0106a0d80fbaa9b4e5be0488b84732
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:17 -05:00
Louise Mendoza
4979ff34cb remove already resolved GENOFFSET_H dependency
GENOFFSET_H is built in the prepare phase, no need for it here. 
It also causes issues when building on windows.

Change-Id: I2c4f63d3f2539827d287a14c69fccbbf941d825e
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:25:16 -05:00
Louise Mendoza
0c3f05bcd7 mingw: Use built-in pwd with -W option for mingw builds
The pwd for mingw has a different output to the pwd shell's built-in pwd.
This change uses the built-in pwd for keep compatibilty with the path
in mingw.

Change-Id: I43d605157e19f661480e68ecbbd024c5f077e461
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Louise Mendoza
c1510f53dc mingw: Use windows path style when building with MinGW
When building with MinGW the base path has to be with the windows style
format path.

Change-Id: I67c116c424e6ad70cc0e1a4fc1620361eaabbb82
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Louise Mendoza
7a2836f0f4 Remove quotation marks form CFLAGS.
The quotation marks in windows cause the exact interpretation
of the text, including the special symbols like '\', that
cause problems with the parameter of the toolchain.

Change-Id: Ib223ed64b92380419e2fd86b703247ada1a06e34
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:25:16 -05:00
Andre Guedes
aa47bd8d6c newlib: Rename exit to _exit
This patch renames the 'exit' function from newlib/libc-hooks.c to
'_exit' since this is the correct name of the newlib system call.

This patch fixes some linking errors that occur when an applications
uses abort() or assert().

Change-Id: I593e5ec5dc0f84dbbebe4aceb38703256e140914
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:16 -05:00
Andrew Boie
89ec552be9 x86: iamcu: fix exception NANO_ESF parameter
On SysV ABI, the NANO_ESF parameter is passed in via the stack.
For IAMCU, this is instead expected to be in EAX.

_ExcEnter is currently using EAX to stash the return address of
the calling stub while it does a stack switch. Change it to use ECX
for this purpose, and if we are running with IAMCU place the
parameter in EAX instead of pushing it.

The output of the fault handler has been cleaned up a bit and it
now also includes the code segment.

Change-Id: I466e3990a26a1a82dd486f3d8af5395eab60b049
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:16 -05:00
Anas Nashif
06058ce4bc samples: grove_lcd/fram: unify config files, since they are the same
Remove architecture config files and have just one, they are the same
now.

Change-Id: I6d719d5409569ae8e741fce20e90e16efa701385
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Anas Nashif
6615f9c89b samples: I2C device is auto-selected by SoC Kconfig
Change-Id: Id5522a9b14dddaf8997b42c675e29f7cc1727442
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Anas Nashif
2c74c45be0 quark_d2000: toggle I2C0 when I2C is enabled
Change-Id: I79340a22932cf73b504b8fac8dd65dccb6c10009
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Anas Nashif
3280b700d7 quark_se_ss: toggle I2C0 when I2C is enabled
Change-Id: I3e8ff764dd51a1eb59a864b9ce58047977ebd68e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Anas Nashif
57e444ffa8 i2c: use a common name from i2c devices
Instead of relying on the Kconfig variables use a common scheme for
naming i2c devices and use it directly in application.

Change-Id: I745af68d7c1767cc8a24f9655fa45fa33f6baf93
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Ido Yariv
a8c48ea7b7 Workaround QEMU's multiboot loading issue
When QEMU loads a multiboot image based on the ELF headers, it
calculates the total memory size subtracting the minimum address from
the maximum address in the program header.

While the IDT section is removed from the ELF, an empty segment in the
program header is still kept at IDT_LIST base address. Since the IDT
segment isn't contiguous with the loadable code segment, QEMU is tricked
into thinking the total memory size is larger than it really is.

To workaround this, change the address of the IDT section to the address
of the text section. This will make objcopy remove the extra segment
entirely when the IDT section is removed.

This could have been fixed in QEMU since this isn't a bug in Zephyr
per-se, but it will be easier to avoid specific QEMU versions
requirements.

Change-Id: I062b7d0fb8fccfe4d0d0b4cb0afc4667bbb7f7dd
Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
2016-02-05 20:25:16 -05:00
Andrew Boie
7cb5276158 x86: remove NANO_SOFT_IRQ from zephyr
This was never implemented on ARC/ARM and has been superseded
by irq_offload().

Some checks that were only done with CONFIG_LOAPIC_DEBUG fall
under the category of 'shouldn't ever happen' and have been
converted into assertions, instead of propagating return values
which are largely never checked.

Change-Id: I4eedca05bb7b384c4f3aa41a4f037f221f4a9cfe
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:16 -05:00
Andre Guedes
7b0076a777 rtc: Introduce QMSI RTC device driver
This patch introduces the 'QMSI RTC device driver' which is simply a shim
driver based on RTC driver provided by QMSI BSP.

Some config options are independent of the driver implementation used,
so use a consistent name for them. In this case RTC Interrupt number and
Priority use the same config options for both the QMSI and DesignWare
drivers.

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_RTC=y
CONFIG_RTC_QMSI=y

Change-Id: I48292406e5472e5786f3b9abbeb71016a273bfec
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-02-05 20:25:16 -05:00
Daniel Leung
db2d48b66f arc: add atomic operations for ARC EM family processors
The ARC EM family processors do not support native atomic assembly
instructions (LLOCK and SCOND). Therefore, the assembly version
of atomic functions cannot be used. This adds pure C version of
these atomic functions.

Change-Id: Ic64dd31b0367b6dcf3a46f41c0c7ac2c2ce5eb8d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:16 -05:00
Anas Nashif
f08e73dcf8 kconfig: Add missing board definition
Change-Id: Ia037e338f312578deb468ecc1298839aedd2cc28
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Ido Yariv
ae08f73f72 samples: fix compilation error of nfc_hello
uart.h may include pci/pci.h, so add drivers/ to the include search
path.

Change-Id: Ic48a88c97c45e805ee7aec1df884cdb60d6fa33a
Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
2016-02-05 20:25:16 -05:00
Dan Kalowsky
ea6f5e09bd quark_se : quark_d2000 : shrink pinmux code size
Ben Walsh identified a few functions can be removed as they provide
duplicate code except for one small variant (register number).  Making
a common function that takes the register position as an input, it is
possible to remove an entire function, saving on code space.

Change-Id: I1850f461ed6d85f42aaf85745e1c2557850cdbad
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:25:16 -05:00
Andre Guedes
5c2dfcd53a watchdog: Introduce QMSI watchdog driver
This patch introduces the QMSI watchdog driver which is simply a shim
driver based on watchdog driver provided by QMSI BSP. This driver has
been tested with the latest version of QMSI BSP (1.0.0).

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_WATCHDOG=y
CONFIG_WDT_QMSI=y

Change-Id: Id910fa7f8a0559bcd4746747d8ce4588a0c48589
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Daniel Leung
00b0e06b92 samples/grove_lcd: build for x86 too
This adds the config file for x86 based platforms.
Also, it no longer clears the screen at each counter update,
as the app is writing the same amount of characters anyway.
This gets rid of the screen flickering.

Change-Id: I1db6dd4b7978b764b7538e120354fc5d010df283
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:16 -05:00
Daniel Leung
7b4167ed78 i2c/i2c_dw: bail out if tx is aborted during send
This enables the driver to process the transmit abort signal
during send.

Change-Id: I3ad1f25669bee214b5e1a04cd858ccb4a8442333
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:16 -05:00
Daniel Leung
0ac7a5b162 i2c/i2c_quark_se_ss: properly process abort during send
This actually makes the code to bail out when transmit is aborted
during send operation.

Change-Id: I3dda7ec4a6e15d1483738bb90d63d674a994903d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:16 -05:00
Daniel Leung
7a5fefbcd8 i2c/i2c_quark_se_ss: extends to do multi-byte read requests
This changes to request bytes that will fill the RX FIFO
instead of requesting byte one-by-one.

Change-Id: I87c6577dc5fcc476284cd3ed0039a178a5221d24
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:16 -05:00
Daniel Leung
61ea58b6cf i2c/i2c_dw: extends to do multi-byte read requests
This changes to request bytes that will fill the RX FIFO
instead of requesting byte one-by-one.

Change-Id: I30696c624c9f828818f6df9f1ee744a5bc515f27
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:16 -05:00
Daniel Leung
9b8acb7b26 samples/i2c_fujitsu_fram: do some multi-bytes read/write
This extends the i2c_fujitsu_fram sample app to do multi-bytes.

Change-Id: I20ea0e08c340cf94158ad521c27d5315e522b6de
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:16 -05:00
Daniel Leung
f794b80ac5 samples/i2c_fujits_fram: build for x86 too
This adds the config file to build for x86-based platforms.

Change-Id: I42c32966507ba822726834a200edd079c90cc96b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:16 -05:00
Andrew Boie
2a8843a262 timers: don't build if there is no system clock in use
Change-Id: Ic1463d632562383c3fa0b0b1666a52a0d9a5c4de
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:16 -05:00
Andrew Boie
2295e2abf7 uart: remove uart_irq_get()
This API is not being used for anything, the interrupts for UART
drivers are all being configured statically. Saves code space as
gc-sections can't tell that these APIs are unused.

Some instances where IRQ/priority information was being saved in
data structures and never used fixed.

Change-Id: If56b4fdc251b80be9094ffcbac6f61e265ac2ffd
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:16 -05:00
Andrew Boie
59a6d3870d x86: fix description for CONFIG_NUM_DYNAMIC_EXC_NOERR_STUBS
Change-Id: I7a73aa261297ed986790973fe65e4e82e5576416
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:15 -05:00
Andrew Boie
4733187f1b x86: put the IDT in ROM if possible
If we are not doing any dynamic interrupts or exceptions, we
can put the IDT in ROM and save a considerable amount of RAM,
up to 2K if the IDT is the default size of 256 entries.

The _interrupt_vectors_allocated table can also be put in ROM
if we're not using any dynamic interrupts.

We introduce a new Kconfig option to force the IDT to be in RAM
for situations where no dynamic IRQs are used, but ROM footprint
needs to be conserved.

Change-Id: I38c9f1a8837b4db9f3dea1caa008374a26cbbf1d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:15 -05:00
Andrew Boie
cb5022fdba ipm_quark_se: lock irqs while waiting for status bit to clear
Change-Id: Ieb0ac7a32a91826dca39ddb6bec80081c7d2c888
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
06e78de681 build: do not use link-zephyr
Use makefile targets to build and link final binary. This removes
dependency on a shell script which is not portable and imporves
dependency tracking when building.

Change-Id: Ib75f162cdb1dde35ccaf980658bfe70daaf581b6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
204b66d150 build: reused declared LDFLAGS
Change-Id: Ia421fc3e796a889f3083b00ddcb058ccefb35291
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
ace0e227c7 remove unused variables and defines
Many variables being declared in the Makefiles are Linux specific
and never used by Zephyr.
This is an attempt to cleanup the Makefiles and just keep the code
we use.

Change-Id: Ib97d3d7e3a55077d6f9ec2b4170b3763424a1c99
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
cc2801c08d remove stray core-y redifinition
Adding emptiness into core-y does not add any value.

Change-Id: I695f9a8682eb35bcdb80eff9716338f88d84ab09
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
ce5dc6a3b7 build: remove unused init-y handling
This is not used in Zephyr

Change-Id: I27507fc72686d2a54d4565cd36414bd7ffbd0399
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
3bdae61cac build: remove unused linux related code
- Modules are not a feature of the Zephyr kernel.
- genksyms removed, not used by zephyr
- bin2c remove, not used in zephyr

Change-Id: Ic8f0e786530dcf410b07d6c5cc47f1087000d528
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
3315b1f89b KLIBC_DIR and LDLIBS_TOOLCHAIN are obsolete
This variables are not being used in the code any more.

Change-Id: I3d4b513ed61d98020f27e5968835090946fe0c8b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
afffff3a32 kconfig: ram size/start are set in platform Kconfig
The values are set in the board or SoC.

Change-Id: I03b358ba1e82c39a1f65ce80a3fb9c181b671109
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
d50b6a7f5c ia32_pci: remove obsolete soc/platform
Change-Id: I7a6a7ef2339061630d7c6dd693b1c03a95573352
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
32c48d1b2d arc: remove obsolete generic_arc
Change-Id: Ifa1506cd5c8ff6876a8b945507c7d6caf2f3bbc2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif
030c004fd3 enable iamcu on relevant platforms
This enables building with the iamcu variant of the x86 compiler
and enabled using the IAMCU ABIs.

Change-Id: Idf71251898e250b8df73c065462c93c289879fe2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00