qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 2/2] 8250: Customized base baudrate
Date: Mon, 14 Apr 2008 23:34:56 +0200	[thread overview]
Message-ID: <4803CE00.7070809@web.de> (raw)
In-Reply-To: <fb249edb0804141241r5d679ef4gce6281205b4a600b@mail.gmail.com>

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

andrzej zaborowski wrote:
> On 14/04/2008, Jan Kiszka <jan.kiszka@web.de> wrote:
>> andrzej zaborowski wrote:
>>  > On 13/04/2008, Jan Kiszka <jan.kiszka@web.de> wrote:
>>
>>>>  --- a/hw/omap1.c
>>  >>  +++ b/hw/omap1.c
>>  >>  @@ -1734,7 +1734,8 @@ struct omap_uart_s *omap_uart_init(targe
>>  >>      struct omap_uart_s *s = (struct omap_uart_s *)
>>  >>              qemu_mallocz(sizeof(struct omap_uart_s));
>>  >>      if (chr)
>>  >>  -        s->serial = serial_mm_init(base, 2, irq, chr, 1);
>>  >>  +        s->serial =
>>  >>  +            serial_mm_init(base, 2, irq, omap_clk_getrate(clk)/16, chr, 1);
>>  >
>>  > Yes, this should be correct.
>>
>> While typing those line I wondered if it is possible and reasonable that
>>  a guest changes this clock rate during runtime? In that case, the
>>  perfect, but probably much more complex solution would be to track those
>>  changes also with the serial emulation...
> 
> Yes, UART1 and UART3 (I think) can switch between 48MHz (dpll) and
> 16MHz clock domains on OMAP1 and the guest has control over this (and
> the characters flow indeed slows down three times when you switch to
> 16MHz on the real hw).  omap_clk.c allows a peripheral to register for
> notifications of rate change for a particular clock. I don't think
> it's worth bothering too much because anything that depends on the
> timing of QEMU will likely have problems anyway.

Well, depends. The baudrate set by the guest is also propagated to the
host tty which is attached to that virtual channel. If that tty bothers
about baudrate, you will have real impact. Besides this, my patch 1/2
makes use of the baudrate to emulate more realistic output (IRQ) rates.

Jan



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

  parent reply	other threads:[~2008-04-14 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-13  8:29 [Qemu-devel] [PATCH 2/2] 8250: Customized base baudrate Jan Kiszka
2008-04-14 18:37 ` andrzej zaborowski
2008-04-14 19:22   ` [Qemu-devel] " Jan Kiszka
2008-04-14 19:41     ` andrzej zaborowski
2008-04-14 19:42       ` andrzej zaborowski
2008-04-14 21:34       ` Jan Kiszka [this message]
2008-04-19 19:37 ` Jan Kiszka

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=4803CE00.7070809@web.de \
    --to=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.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).