1. Need to unmask interrupts for the sensor subsystem.
2. The GPIO controllers need their clock enabled before they can
start sending out interrupts.
3. Setting up ISR on ARC requires usage of irq_connect().
Change-Id: I633b07292f11e5c5e768fc51fabb70769d407609
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The interrupt number for GPIO0/GPIO1 are 20 and 21 respectively.
The old value of 8 refers to the interrupts line on the x86 side
of GPIO controller.
Change-Id: I2e9e061d3506e27cb7b14e0431c3b6201a50aad4
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The pin mux for Galileo Gen2 isn't set properly to enable UART0_RXD input from
the Arduino headers. EXP1's pin0 OE_N needs to be set HIGH to make the IO0
buffer an Input.
Change-Id: I0167f11ff5ee87bd5afe17300807b1aa4ed17abf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: David Antler <david.a.antler@intel.com>
The argument to 'lidt' is a chunk of memory with the base address
and limit of the IDT, and not the IDT itself. Horrible things
were happening when the IDT itself was being passed to this
instruction.
To be extra safe, disable interrupts while we modify the table
and subsequently reload it.
Change-Id: I9bf96f13a5f6e1be80d11bbfb9db3df1f2ed613a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Excluded from quark_se_ss due to insufficient RAM.
Change-Id: I75bb34c058c7c41d4f3baaf12ca110f23eb531b8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This test uses too much RAM to run on Quark SE, but we now can at least
build it for generic_arc.
Change-Id: Ibdc144303d9d9c2049e4d5d4ec637b1e4778f392
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This adds a sample app to utilize GPIOs on x86 side of
Arduino 101. Refer to the header of source file for
more information.
Change-Id: Ie547618b2c4fb483d85d6458bd68dd2849e1d19d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a sample app which displays an incrementing
counter through the Grove LCD, with changing backlight.
Please refer to the README file on how to setup
the hardware.
Change-Id: I95c0571edaeabb281ee06f3b32fad1ab5b64d924
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add an option to specify to which I2C master the Grove LCD
is connected, instead of already using the i2c_dw driver
port #0.
Change-Id: I4e61ef8e31c75ae912e2d16f8939369c0b8bbc2c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a sample app to utilize the Fujitsu
MB85RC256V FRAM via I2C on Arduino 101. It does
simple read and write on the chip.
Change-Id: Ie20470f3701acb0e4fa9bc3d7b3676625839cf06
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The code to poke the system integration module to disable clock gating
for UARTs only works for UART0-3 since all the bits are in the same
register. However, clocks for UART4 and UART5 are controlled by
another register. This means that we have been writing to the wrong
bit for enabling UART4.
This patch fixes this issue, and moves the clock gating clock into
board initialization. The incorrect code has also been removed to
prevent accidental mis-use. The dev_data struct is no longer needed
for uart_k20, so that is removed as well.
Change-Id: I67845a417e43647bf0ffcbdbda34ce68fa887713
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Hardware initialization for fsl_frdm_k64f has to be done at the very
beginning at boot, before anything else. So change the init priority
for hardware initialization to 0. This makes sure the hardware is
initialized. Or else any memory/register access will hang
the board.
Change-Id: Idc1c9449bb7cd1ec7b8d8f44004ea76cc7c09a18
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
IAMCU compiler breaks some drivers and interrupt handling. Disabling
while we investigate the issue.
The failing test applications are:
- watchdog
- rtc
on quark d2000 boards.
Change-Id: I5b34dcc28206d2bd982f08f75134c66ba9df0cc7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add support for compilers conforming to the IAMCU calling convention
as documented by
https://github.com/hjl-tools/x86-psABI/wiki/iamcu-psABI-0.7.pdf
Change-Id: I6fd9d5bede0538b2049772e3850a5940c5dd911e
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
ANSI sequences may have a numbered prefix which means that the action
needs to be taken the number amount of times, e.g. "Esc[ValueA" (move
cursor forward Value number of characters). Some ANSI commands also
have two preceding values, such as Esc[Line;ColumnH (move cursor to
Line & Column).
To support these ANSI sequences we need to track a bit of extra state,
most conveniently done using a bit field. Since the ANSI parsing logic
gets a bit long at this point it's refactored into its own handle_ansi()
function.
Change-Id: I0711f869d5324f9f827915fde468fe470e7689ed
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Instead of keeping track how many characters we need to move back to
get to the original position, take advantage of the save/restore
escape sequences. This allows us to drop the extra 'i' variable from
both insert_char() as well as del_char().
Change-Id: I69a2b5ea12ec2a7a2e4d519b55e4c737b5d5d25a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Changes the FIFO API so that the timeout parameter must be specified
when invoking task_fifo_get() thereby making the following APIs obsolete:
task_fifo_get_wait()
task_fifo_get_wait_timeout()
_task_fifo_get()
Change-Id: Iac626d9d6d4836033e06ffd5a2ca415ab2630b1a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the FIFO API so that the timeout parameter must be specified
when invoking task_fifo_put() thereby making the following APIs obsolete:
task_fifo_put_wait()
task_fifo_put_wait_timeout()
_task_fifo_put()
Change-Id: Ifbbfb7018fd9a71551ccba648fda6d2d59d589a6
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Converts test_fifo's file header to be doxygen compliant.
Change-Id: I1b37c0cdb08c6ceecc4b18c32b5ab9e91dd202c8
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the mutex API so that the timeout parameter must be specified
when invoking task_mutex_lock() thereby obsoleting the following APIs:
task_mutex_lock_wait()
task_mutex_lock_wait_timeout()
_task_mutex_lock()
Change-Id: I15d4bddbdc2707b3cbdab672498170da1c47b8db
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Converts test_mutex's file header to be doxygen compliant.
Change-Id: I5c5edfb70fa0cf4c6664bc21ce3869b1c22a4e71
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the mem_pool API so that the timeout parameter must be specified
when invoking task_mem_pool_alloc() thereby obsoleting the following APIs:
task_mem_pool_alloc_wait()
task_mem_pool_alloc_wait_alloc()
_task_mem_pool_alloc()
Change-Id: Ifa88f13bca98ca3c7d0e1a3b64b40a00068619e0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the mem_map API so that the timeout parameter must be specified
when invoking task_mem_map_alloc() thereby obsoleting the following APIs:
task_mem_map_alloc_wait()
task_mem_map_alloc_wait_alloc()
_task_mem_map_alloc()
Change-Id: I8905d07fa4b8c3729ca144e8f09e7ad0c7bf0f43
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Converts test_map's file header to be doxygen compliant.
Change-Id: Id0d90e893883756c91bb5de3c2f5fdc20f40dc6b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the semaphore API so that the timeout parameter must be specified
when invoking task_sem_group_take() thereby obsoleting the following APIs:
task_sem_group_take_wait()
task_sem_group_take_wait_timeout()
_task_sem_group_take()
Change-Id: I64e3f4c9f1e74a86b49d4a0e55b82ecee7733220
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the semaphore API so that the timeout parameter must be specified
when invoking task_sem_take() thereby obsoleting the following APIs:
task_sem_take_wait()
task_sem_take_wait_timeout()
_task_sem_take()
Change-Id: I746d5c966a3b81ffe014333af51aa10ea8a63263
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Converts test_sema's file header to be doxygen compliant.
Change-Id: Ia5945a64ae597239c9f5ff9ca14231625b9cb467
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the pipe API so that the timeout parameter must be specified
when invoking task_pipe_get() thereby obsoleting the following APIs:
task_pipe_get_wait()
task_pipe_get_wait_timeout()
_task_pipe_get()
Change-Id: If249e57d086fef15fdc1616965f53b310ac9cf9d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the pipe API so that the timeout parameter must be specified
when invoking task_pipe_put() thereby obsoletingg the following APIs:
task_pipe_put_wait()
task_pipe_put_wait_timeout()
_task_pipe_put()
Change-Id: Ie5693716828e9d8681434c0d130792279ab97acc
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Updates the test_pipe file header to be doxygen compliant.
Change-Id: I6761fb5078c08d9968482baba47758e0bc3fd0d9
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Updates comparisons in the pipe code to put the constant on the
right side of the test. This improves compliance with checkpatch.
Change-Id: I8e55afd94e0532dd7a67bd83e737846279654dff
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the mailbox API so that the timeout parameter must be specified
when invoking task_mbox_data_block_get() thereby obsoleting the
following APIs:
task_mbox_data_block_get_wait()
task_mbox_data_block_get_wait_timeout()
_task_mbox_data_block_get()
Change-Id: I284be505e6de792ba5483611d1299063162550e1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the event AIP so that the timeout parameter must be specified
when invoking task_event_recv() thereby making the following APIs obsolete:
task_event_recv()
task_event_recv_wait()
task_event_recv_wait_timeout()
_task_event_recv()
Change-Id: I165a8efbdedb431fee0c20e9ad1f1942c04124c0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Converts test_events' file header to be doxygen compliant.
Change-Id: I75f0fafbe7c7b81abda1db94fea3194962a446ba
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the task IRQ API so that not only does task_irq_test() become
task_irq_wait(), but that the timeout parameter must also be specified.
Use of task_irq_wait() obsoletes the following APIs:
task_irq_test()
task_irq_test_wait()
task_irq_test_wait_timeout()
_task_irq_test()
Change-Id: Ie4d15f29941429249e9fbb258d29ec2b3ae73a93
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the mailbox API so that the timeout parameter must be specified
when invoking task_mbox_get() thereby obsoleting the following APIs:
task_mbox_get_wait()
task_mbox_get_wait_timeout()
_task_mbox_get()
Change-Id: Ie028223ec342666e61d3d69750aec37dbe2b493e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the mailbox API so that the timeout parameter must be specified
when invoking task_mbox_put() thereby obsoleting the following APIs:
task_mbox_put_wait()
task_mbox_put_wait_timeout()
_task_mbox_put()
Change-Id: I174857bdf32fe7e59b79838185666cd557312814
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Updates the test_mail file header to be doxygen compliant.
Change-Id: I890eeb8bfd2ac5ea16d06ad2f4ec0bbb00a77d79
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Updates comparisons in the mailbox code to put the constant on the
right side of the test. This improves compliance with checkpatch.
Change-Id: If84cfbe4bbca312fabbb70d45f05675c9c15d011
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
MVIC has only one local interrupt: the timer IRQ. What IRQ line
to use is not fixed, instead it is programmed into the LVTTIMER
register. This is unlike LOAPIC which has a fixed IRQ for the timer
and instead the *vector* to use for it is programmed into LVTTIMER.
We don't want _loapic_int_vec_set() to do anything as the relationship
between IRQ lines and vectors is fixed and we do not want to be
programming vector numbers into bits 0-3 of LVTTIMER.
The IRQ line to use for timer interrupts is programmed into LVTTIMER
when the MVIC is initialized.
Change-Id: Icba0429f65ece7541fa8542814a8fdc39ad43936
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
All of these stubs at the end pop the stack and tell the LOAPIC
that we are at EOI. Put this in common code which falls through to
_IntExit(). Saves 8 bytes per static IRQ stub. There is also small
constant savings in the common code for dynamic IRQs.
Change-Id: If17e9f105928a4251a2cb3fc0d192649c1c4d84b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Quark SE Lakemont core has a hardware bug where the LOAPIC does
not properly notify the IOAPIC to clear the IRR bit for level-
triggered interrupts.
This patch introduces a workaround where the vector ID of the
in-service interrupt is manually written to the IOAPIC_EOI
register, resulting in the bit being cleared.
Unfortunately, in the context where EOI happens it's very difficult
to identify which IRQ line is being serviced, so this is done
unconditionally for all interrupts vectors whether they are registered
in the IOAPIC RTE table or not.
Change-Id: I639cd258dec4f50934e17eadbb821e6a7112e636
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Instead of having two config options to specify interrupt triggering
conditions, merge them into one option and clarify. This is now
similar to other drivers which have interrupt triggers.
Change-Id: I4e60c8c45a08d005dcc8256cb89e4c5be7c94307
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Move the common #define for IOAPIC interrupt trigger flags out of
platform board.h and into the driver.
Change-Id: I89090181acb5f48dd797e7773ab65c5f3d46c42a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Move the common #define for IOAPIC interrupt trigger flags out of
platform board.h and into the driver.
Change-Id: Ie7262b69226ebffa7e1b9e35725fda24b3fe089f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>