All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>,
	qemu-devel@nongnu.org, openrisc@lists.librecores.org
Subject: Re: [PATCH RESEND] hw/openrisc/openrisc_sim: keep serial@90000000 as default
Date: Tue, 27 Aug 2024 19:53:34 +0100	[thread overview]
Message-ID: <Zs4grgFlhYFMjO4j@antec> (raw)
In-Reply-To: <CAFEAcA95TEA-5Mq9n9+Mva0r-W040A-nt9doCmPg7xW+dU3E2w@mail.gmail.com>

On Sun, Aug 25, 2024 at 03:09:20PM +0100, Peter Maydell wrote:
> On Sun, 25 Aug 2024 at 12:35, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> >
> > On Fri, Aug 23, 2024 at 07:28:43AM +0100, Stafford Horne wrote:
> > > Also, I will wait to see if Jason has anything to say.
> >
> > So long as this doesn't change the assignment of the serial ports to
> > device nodes in Linux, I don't think this should interfere with much.
> > You might want to try it, though.
> 
> It looks like this board already creates the fdt /aliases/
> node and puts uart0, uart1, etc, so that part should be OK.
> 
> However I notice that the openrisc_sim_serial_init() code
> will always set the /chosen/stdout-path, so this means
> (unless I'm misreading the code -- I haven't tested) that
> the last UART we create will be the stdout-path one. Before
> this patch, that would be serial_hd(0), but after this it
> will not be. So I think we probably need to fix this too
> in the same patch, so that we only set stdout-path for uart0,
> rather than setting it and then overwriting it on all the
> subsequent calls. This patch on its own will change the
> stdout-path value I think.

Hi Peter,

I suspected the same and tested the theory.  Now when running linux with
or1k-sim machine we get no stdout output from qemu.  Upon debugging and
looking at dmesg via gdb I can see the wrong uart is getting setup in
Linux:

    [    0.080000] workingset: timestamp_bits=30 max_order=17 bucket_order=0
    [    0.100000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    [    0.110000] printk: legacy console [ttyS0] disabled
    [    0.110000] 90000300.serial: ttyS0 at MMIO 0x90000300 (irq = 2, base_baud = 1250000) is a 16550A
    [    0.120000] printk: legacy console [ttyS0] enabled
    [    0.120000] 90000200.serial: ttyS1 at MMIO 0x90000200 (irq = 2, base_baud = 1250000) is a 16550A
    [    0.130000] 90000100.serial: ttyS2 at MMIO 0x90000100 (irq = 2, base_baud = 1250000) is a 16550A
    [    0.130000] 90000000.serial: ttyS3 at MMIO 0x90000000 (irq = 2, base_baud = 1250000) is a 16550A
    [    0.150000] NET: Registered PF_PACKET protocol family
    [    0.160000] clk: Disabling unused clocks

I will amend the patch.

-Stafford


  reply	other threads:[~2024-08-27 18:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 16:38 [PATCH RESEND] hw/openrisc/openrisc_sim: keep serial@90000000 as default Ahmad Fatoum
2024-08-23  6:28 ` Stafford Horne
2024-08-23  7:23   ` Ahmad Fatoum
2024-08-25  5:49     ` Stafford Horne
2024-08-25 11:34   ` Jason A. Donenfeld
2024-08-25 14:09     ` Peter Maydell
2024-08-27 18:53       ` Stafford Horne [this message]
2024-08-28 15:38         ` Peter Maydell
2024-08-29 15:40           ` Stafford Horne

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=Zs4grgFlhYFMjO4j@antec \
    --to=shorne@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=openrisc@lists.librecores.org \
    --cc=peter.maydell@linaro.org \
    --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 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.