linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Kundrát" <jan.kundrat@cesnet.cz>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: <linux-spi@vger.kernel.org>, Mark Brown <broonie@kernel.org>
Subject: Re: High CPU load when using MAX14830 SPI UART controller
Date: Tue, 21 Jul 2020 16:20:02 +0200	[thread overview]
Message-ID: <070e2fa9-bacf-4d6e-a62a-63b3db55c25e@cesnet.cz> (raw)
In-Reply-To: <20200721155139.40fdb835@windsurf.home>

>> The MAX14830 supports also another mode of operation where the interrupt 
>> fires only when the RX buffer gets filled over a configurable minimal 
>> threshold. This can be combined with yet another interrupt which fires 
>> whenever there's some data in the RX FIFO for "too long". Unfortunately, 
>> this timer starts over again upon reception of any additional 
>> data, so it's 
>> the *youngest* byte in the RX FIFO that controls triggering of 
>> this delayed 
>> interrupt.
>
> Do you have some more details about this mode of operation? I looked a
> bit at the MAX14830 datasheet and code, but couldn't spot what allows
> an interrupt to be triggered after X bytes have been received *OR* if
> data has been sitting in the FIFO for too long.

I have no code, but according to the datasheet, it's the "RTimeout" bit 
(Line Status Register, bit 0). If properly configured (RxTimeOut set and 
the interrupt routing enabled via LSRIntEn[0], the "RTimeoutIEn" bit), 
we're supposed to get ISR[0] set upon this timeout.

I have not tried it, I just read the datasheet a few years ago. When you 
have patches, I'll be happy to test them (likely only in September, though, 
because of vacations).

With kind regards,
Jan

  reply	other threads:[~2020-07-21 14:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 14:33 High CPU load when using MAX14830 SPI UART controller Thomas Petazzoni
2020-05-19 15:24 ` Mark Brown
2020-05-20 10:18   ` Thomas Petazzoni
2020-05-20 11:26     ` Mark Brown
2020-07-21 13:39       ` Thomas Petazzoni
2020-07-21 22:30         ` Mark Brown
2020-05-20 10:44 ` Jan Kundrát
2020-07-21 13:51   ` Thomas Petazzoni
2020-07-21 14:20     ` Jan Kundrát [this message]
2020-07-21 21:49       ` Andy Shevchenko
2020-07-28  8:22       ` Thomas Petazzoni

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=070e2fa9-bacf-4d6e-a62a-63b3db55c25e@cesnet.cz \
    --to=jan.kundrat@cesnet.cz \
    --cc=broonie@kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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).