qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-arm@nongnu.org
Subject: Re: [RFC PATCH] hw/arm/musicpal: Map the UART devices unconditionally
Date: Tue, 5 May 2020 12:09:26 +0200	[thread overview]
Message-ID: <bc8d1213-5578-52f2-7a86-f45dfa8b33be@web.de> (raw)
In-Reply-To: <20200505095945.23146-1-f4bug@amsat.org>

On 05.05.20 11:59, Philippe Mathieu-Daudé wrote:
> I can't find proper documentation or datasheet, but it is likely
> a MMIO mapped serial device mapped in the 0x80000000..0x8000ffff
> range belongs to the SoC address space, thus is always mapped in
> the memory bus.
> Map the devices on the bus regardless a chardev is attached to it.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> from 2019... found while doing housekeeping
> ---
>   hw/arm/musicpal.c | 12 ++++--------
>   1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
> index b2d0cfdac8..92f33ed87e 100644
> --- a/hw/arm/musicpal.c
> +++ b/hw/arm/musicpal.c
> @@ -1619,14 +1619,10 @@ static void musicpal_init(MachineState *machine)
>                             pic[MP_TIMER2_IRQ], pic[MP_TIMER3_IRQ],
>                             pic[MP_TIMER4_IRQ], NULL);
>
> -    if (serial_hd(0)) {
> -        serial_mm_init(address_space_mem, MP_UART1_BASE, 2, pic[MP_UART1_IRQ],
> -                       1825000, serial_hd(0), DEVICE_NATIVE_ENDIAN);
> -    }
> -    if (serial_hd(1)) {
> -        serial_mm_init(address_space_mem, MP_UART2_BASE, 2, pic[MP_UART2_IRQ],
> -                       1825000, serial_hd(1), DEVICE_NATIVE_ENDIAN);
> -    }
> +    serial_mm_init(address_space_mem, MP_UART1_BASE, 2, pic[MP_UART1_IRQ],
> +                   1825000, serial_hd(0), DEVICE_NATIVE_ENDIAN);
> +    serial_mm_init(address_space_mem, MP_UART2_BASE, 2, pic[MP_UART2_IRQ],
> +                   1825000, serial_hd(1), DEVICE_NATIVE_ENDIAN);
>
>       /* Register flash */
>       dinfo = drive_get(IF_PFLASH, 0, 0);
>

I don't recall details anymore either (more than 10 year ago now...),
but this looks reasonable.

Reviewed-by: Jan Kiszka <jan.kiszka@web.de>

Jan


  reply	other threads:[~2020-05-05 10:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  9:59 [RFC PATCH] hw/arm/musicpal: Map the UART devices unconditionally Philippe Mathieu-Daudé
2020-05-05 10:09 ` Jan Kiszka [this message]
2020-05-05 10:10   ` Peter Maydell
2020-05-11 10:49 ` Peter Maydell

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=bc8d1213-5578-52f2-7a86-f45dfa8b33be@web.de \
    --to=jan.kiszka@web.de \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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 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).