All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: David Jander <david@protonic.nl>, Tom Evans <tom_usenet@optusnet.com.au>
Cc: linux-can@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH 0/8] RFC: more flexcan cleanups and SW FIFO IRQ offloading
Date: Thu, 3 Sep 2015 08:58:21 +0200	[thread overview]
Message-ID: <55E7EF8D.306@pengutronix.de> (raw)
In-Reply-To: <20150903083208.29333e01@archvile>

[-- Attachment #1: Type: text/plain, Size: 2110 bytes --]

On 09/03/2015 08:32 AM, David Jander wrote:
>>> this series adds a software FIFO implementation and switches
>>  > the flecan and at91 driver to it. It's intended for CAN cores
>>  > with a higher number of mailboxes.
>>
>> It is a bit difficult to understand the changed by looking at 20 patches, so 
>> I'm assuming this is the change where what the i.MX6 manuals calls the 
>> "Reception Queue" mode is enabled.

In the first series the "real" change happens at Patch 12/12. The
hardware FIFO which was handled in NAPI now it's handled in a hard IRQ
context. It's making use of the code introduced in patch 11/12.

>> I see "[PATCH 1/8]" renaming "FLEXCAN_MCR_BCC" to "FLEXCAN_MCR_IRMQ" and 
>> "[PATCH 2/8]" adding it to the MCR setting.

These are just preparation patches. But you're right, the MCR_IRMQ is
essential for software FIFO.

>> Use of the "Reception Queue" is documented in the i.MX6DQ manual in section 
>> "26.6.5 Matching Process" as:
>>
>>      By programming more than one MB with the same ID, received
>>      messages will be queued into the MBs. ARM can examine the
>>      Time Stamp field of the MBs to determine the order in which
>>      the messages arrived.
>>
>> Is the new code sorting the messages by using the timestamp, or have you
>> found another way to guarantee reception order?
> 
> Almost. Generic code in can/dev.c cannot know about special features like
> timestamps that some peripherals may provide.

Thanks to David explaining the algorithm.

The generic code is added in 5/8, the flexcan specific code is added in 7/8.

Regarding the time stamp feature. IIRC, the mailboxes in the AT91 have
timestamps, too. When the generic SW-FIFO code is stable and someone is
interested, sorting by timestamps can be added to the generic code base.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2015-09-03  6:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01 10:31 [PATCH 0/8] RFC: more flexcan cleanups and SW FIFO IRQ offloading Marc Kleine-Budde
2015-09-01 10:31 ` [PATCH 1/8] can: flexcan: add missing register definitions Marc Kleine-Budde
2015-09-01 10:31 ` [PATCH 2/8] can: flexcan: activate individual RX masking and initialize reg_rximr Marc Kleine-Budde
2015-09-01 10:31 ` [PATCH 3/8] can: flexcan: add quirk FLEXCAN_QUIRK_ENABLE_EACEN_RRS Marc Kleine-Budde
2015-09-01 10:31 ` [PATCH 4/8] can: flexcan: reg_imask2_default Marc Kleine-Budde
2015-09-01 10:31 ` [PATCH 5/8] can: rx-fifo: introduce software rx-fifo implementation Marc Kleine-Budde
2015-09-01 10:32 ` [PATCH 6/8] can: flexcan: add support for rx-fifo based software FIFO implementation Marc Kleine-Budde
2015-09-01 10:32 ` [PATCH 7/8] can: flexcan: switch imx6 and vf610 to software based fifo Marc Kleine-Budde
2015-09-01 10:32 ` [PATCH 8/8] can: at91_can: switch to rx-fifo implementation Marc Kleine-Budde
2015-09-02 23:58 ` [PATCH 0/8] RFC: more flexcan cleanups and SW FIFO IRQ offloading Tom Evans
2015-09-03  6:32   ` David Jander
2015-09-03  6:58     ` Marc Kleine-Budde [this message]
2015-09-03  8:17       ` Tom Evans
2015-09-03  8:38         ` David Jander
2015-09-03  8:47           ` Marc Kleine-Budde
2015-09-04  3:19           ` Tom Evans
2015-09-03  8:45         ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E7EF8D.306@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=david@protonic.nl \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=tom_usenet@optusnet.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.