Commit graph

16 commits

Author SHA1 Message Date
Andrei Emeltchenko f84d520088 drivers: IPM: Refactor IPM driver using u32_t registers
Refactor internals of IPM driver removing bitfields and byte access of
32 bit registers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-06-05 21:50:15 -04:00
Andrei Emeltchenko 1129925a62 drivers: IPM: Access 32-bit IPM registers right way
The current method of accessing 32-bit data and control registers does
not work for all quark architectures. Sometimes writing to those
registers byte-by-byte results in last byte occupying whole 32 bit
register.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-06-05 21:50:15 -04:00
Andrei Emeltchenko 50605ecba8 drivers: IPM: Fix loosing interrupts
Iterate inside ISR until we handle all events.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-06-05 21:50:15 -04:00
Kumar Gala ccad5bf3e3 drivers: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I08f51e2bfd475f6245771c1bd2df7ffc744c48c4
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 10:06:48 -05:00
Kumar Gala 789081673f Introduce new sized integer typedefs
This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t.  This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.

We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.

We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.

Jira: ZEP-2051

Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-20 16:07:08 +00:00
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00
Flavio Santes b04cdcd6e6 drivers: Remove legacy nanokernel.h include
This commit replaces the nanokernel.h include by kernel.h.

Change-Id: Ib42fbf2d9f77a73c0831f569b3dbbfb342ea2e1d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-12-04 14:59:37 -06:00
Marcus Shawcroft a8dfccc207 drivers/ipm_quark_se: Make driver_api const.
Change-Id: I73077c22b17b0035f3828a0c3a16198abfbf79cc
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:50:58 +00:00
Marcus Shawcroft fd212acac9 ipm/ipm_quark_se: Make config_info pointers const.
Preparation for const driver configuration data.

Change-Id: I4fb89ccee9cec3bdc1976a006e13afcd0bdc69a2
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-07 20:33:57 +00:00
Daniel Leung 0c9876cc8d ipm: convert to use DEVICE_AND_API_INIT()
Change-Id: I2c81bc0d232473c76c0a4ffbf13faf4eabedda85
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-15 22:06:16 +00:00
Andre Guedes 024cfe754e drivers: Replace DEV_OK by 0
This patch replaces all occurences of the macro DEV_OK by the actual
value 0 at the driver level. So this patch touch the files under
drivers/, include/ and samples/drivers/.

This patch is part of the effort to transition from DEV_* codes to
errno.h codes.

Change-Id: I69980ecb9755f2fb026de5668ae9c21a4ae62d1e
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-16 19:30:04 -04: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
Andrew Boie 4f0f7e3325 ipm_quark_se: don't wait for response with interrupts locked
If the remote handler tries to send a message back with wait enabled
it can lead to a deadlock.

Change-Id: Ife6eae29c10e8937abd1b6511ee605f7786c6a7a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:14 -05:00
Andrew Boie 08d3cd7bfd ipm: quark_se: fix dropped/repeating characters
The while loop on the status bit was unnecessary as we will get
a separate invocation of the ISR for every message. We also ensure
that the global status register bits for the channel being serviced
are cleared before exiting. Fixes an issue where some messages
would be dropped or repeated.

Some runtime checks that shouldn't happen in practice have been moved
to assertions.

Change-Id: Iedd28ae15522c7b9f59ef34fa9fa8b4e24e6be14
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:14 -05:00
Dirk Brandewie 0551ee0708 ipm: rework isr to service one set of requests at a time
Change-Id: I50604748cee1aeb43dc764f426d3a17fcc943cbe
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:25:12 -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
Renamed from drivers/ipi/ipi_quark_se.c (Browse further)