qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: "Bin Meng" <bin.meng@windriver.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-ppc@nongnu.org, "Greg Kurz" <groug@kaod.org>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH v2 2/2] hw/ppc: e500: Fill in correct <clock-frequency> for the serial nodes
Date: Thu, 4 Feb 2021 13:59:53 +1100	[thread overview]
Message-ID: <20210204025953.GE4729@yekko.fritz.box> (raw)
In-Reply-To: <1612362288-22216-2-git-send-email-bmeng.cn@gmail.com>

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

On Wed, Feb 03, 2021 at 10:24:48PM +0800, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
> 
> At present the <clock-frequency> property of the serial node is
> populated with value zero. U-Boot's ns16550 driver is not happy
> about this, so let's fill in a meaningful value.

Are you sure this is correct - that is that the serial clock is really
the same as the overall system clock?  Quite often there's some kind
of divider in between.

> 
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> ---
> 
> (no changes since v1)
> 
>  hw/ppc/e500.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index c795276..01517a6 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -126,7 +126,7 @@ static void dt_serial_create(void *fdt, unsigned long long offset,
>      qemu_fdt_setprop_string(fdt, ser, "compatible", "ns16550");
>      qemu_fdt_setprop_cells(fdt, ser, "reg", offset, 0x100);
>      qemu_fdt_setprop_cell(fdt, ser, "cell-index", idx);
> -    qemu_fdt_setprop_cell(fdt, ser, "clock-frequency", 0);
> +    qemu_fdt_setprop_cell(fdt, ser, "clock-frequency", PLATFORM_CLK_FREQ_HZ);
>      qemu_fdt_setprop_cells(fdt, ser, "interrupts", 42, 2);
>      qemu_fdt_setprop_phandle(fdt, ser, "interrupt-parent", mpic);
>      qemu_fdt_setprop_string(fdt, "/aliases", alias, ser);

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-02-04  5:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 14:24 [PATCH v2 1/2] hw/ppc: e500: Use a macro for the platform clock frequency Bin Meng
2021-02-03 14:24 ` [PATCH v2 2/2] hw/ppc: e500: Fill in correct <clock-frequency> for the serial nodes Bin Meng
2021-02-04  2:59   ` David Gibson [this message]
2021-02-04  5:05     ` Bin Meng
2021-02-04 23:51       ` David Gibson
2021-02-04  2:59 ` [PATCH v2 1/2] hw/ppc: e500: Use a macro for the platform clock frequency David Gibson

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=20210204025953.GE4729@yekko.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=bin.meng@windriver.com \
    --cc=bmeng.cn@gmail.com \
    --cc=f4bug@amsat.org \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).