linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: peda@lysator.liu.se (Peter Rosin)
To: linux-arm-kernel@lists.infradead.org
Subject: SAMA5D3x: I2C, USART1 and DMA.
Date: Tue, 24 Nov 2015 17:14:15 +0100	[thread overview]
Message-ID: <56548CD7.4010705@lysator.liu.se> (raw)

Hi!

I have a board similar to the atmel sama5d31ek with some devices
on the i2c0 bus and an async serial line on usart1 that communicates
with a baudrate of 125000. The usart is mostly receiving.

In a divine moment, our designers failed to add handshaking signals
for the usart, and now we have trouble with the occational lost interrupt
and hence lost data (at least that is my current understanding of
what is going on).

The lost data is clearly tied to i2c traffic, and specifically to i2c writes.
i2c reads seems to go by unnoticed by usart1. Of course, other stuff
may also cause trouble, but if I test by temporarily switching off the
i2c writes a BIG part of the problem is gone. But the i2c writes also
have a reason to be there of course, so that is not a long term
solution...

What immediately springs to mind is to reduce the number of interrupts
needed on the usart by enabling DMA. DMA is apparently disabled by
arch/arm/boot/dts/sama5d3xmb.dtsi with this:

            usart1: serial at f0020000 {
                dmas = <0>, <0>;    /*  Do not use DMA for usart1 */

However, cutting out the "dmas" line does not improve things. So, how
do I enable DMA on usart1? And why is it not enabled in the first place?
I mean, who would not want to use DMA for these things?

Any thoughts on why i2c writes stomps usart1 reception interrupts is
also welcome.

Cheers,
Peter

             reply	other threads:[~2015-11-24 16:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 16:14 Peter Rosin [this message]
2015-11-24 16:44 ` SAMA5D3x: I2C, USART1 and DMA Sylvain Rochet
2015-11-24 16:53   ` Sylvain Rochet
2015-11-25 11:55     ` Peter Rosin

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=56548CD7.4010705@lysator.liu.se \
    --to=peda@lysator.liu.se \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).