qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Rob Landley <rob@landley.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.
Date: Thu, 18 May 2017 22:48:43 +0200	[thread overview]
Message-ID: <12c57fbe-d9f1-a54c-b2a8-e7dffcb6670b@redhat.com> (raw)
In-Reply-To: <20170518201038.ytrkrqvrioavcudq@aurel32.net>



On 18/05/2017 22:10, Aurelien Jarno wrote:
> On 2017-05-18 21:57, Paolo Bonzini wrote:
>> Anyway, Uli Hecht is saying SCIF "asserts DR even if the FIFO threshold
>> has not been reached if no data is received for 1.5 frames".  If that's
>> just a register and doesn't trigger an interrupt, you can compute the
>> bit's value dynamically based on the current clock.
>>
>> This is for example how the x86 RTC chip computes the "update in
>> progress" bit, which is set for 220 us before the RC updates.  Doing
>> that with a timer would be really imprecise.
> 
> Unfortunately, the DR bit is set to 1 after 1.5 frames (so the exact
> timing depends on the actual baud rate), and that also triggers an
> interrupt if the RIE bit is set to 1. I haven't checked yet if the
> kernel relies on the bit or the interrupt or both.

DR only generates interrupts in asynchronous mode according to the data
sheet I found
(http://datasheet.octopart.com/DF72115D160FPV-Renesas-datasheet-11797591.pdf).

Paolo

  reply	other threads:[~2017-05-18 20:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 16:08 [Qemu-devel] qemu-system-sh4 -M r2d serial is broken Rob Landley
2017-05-18 19:00 ` Aurelien Jarno
2017-05-18 22:37   ` Rob Landley
2017-05-18 23:01     ` Aurelien Jarno
2017-06-05 22:29       ` Rob Landley
2017-06-06 16:21         ` Aurelien Jarno
2017-05-18 19:57 ` Paolo Bonzini
2017-05-18 20:10   ` Aurelien Jarno
2017-05-18 20:48     ` Paolo Bonzini [this message]
2017-05-18 22:35   ` Rob Landley
2017-05-18 23:00     ` Aurelien Jarno
2017-05-19  5:05       ` Rob Landley

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=12c57fbe-d9f1-a54c-b2a8-e7dffcb6670b@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    --cc=rob@landley.net \
    /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).