LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Mark A. Greer" <mgreer@mvista.com>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH 16/19] bootwrapper: Add xlate_reg(), and use it to find serial registers.
Date: Mon, 12 Mar 2007 16:01:48 -0700	[thread overview]
Message-ID: <20070312230148.GG31268@mag.az.mvista.com> (raw)
In-Reply-To: <20070312204202.GP28545@ld0162-tx32.am.freescale.net>

On Mon, Mar 12, 2007 at 02:42:02PM -0600, Scott Wood wrote:

> diff --git a/arch/powerpc/boot/ns16550.c b/arch/powerpc/boot/ns16550.c
> index 1ffe72e..cce7a11 100644
> --- a/arch/powerpc/boot/ns16550.c
> +++ b/arch/powerpc/boot/ns16550.c
> @@ -55,10 +55,15 @@ static u8 ns16550_tstc(void)
>  int ns16550_console_init(void *devp, struct serial_console_data *scdp)
>  {
>  	int n;
> +	unsigned long reg_phys;
>  
>  	n = getprop(devp, "virtual-reg", &reg_base, sizeof(reg_base));
> -	if (n != sizeof(reg_base))
> -		return -1;
> +	if (n != sizeof(reg_base)) {
> +		if (!xlate_reg(devp, 0, &reg_phys, NULL))
> +			return -1;
> +
> +		reg_base = (void *)reg_phys;
> +	}

NACK.

'virtual-reg' _is_ the fully translated virtual address.
Its simply the virtual address that maps to the fully translated
physical addr in the 'reg' property.

Even if it wasn't, 'ranges' only work for physical/'reg' properties
and can't be used for a virtual one--you'd have to make a parellel
'ranges' thingy for 'virtual-reg'.

Mark

  reply	other threads:[~2007-03-12 23:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12 20:42 [PATCH 16/19] bootwrapper: Add xlate_reg(), and use it to find serial registers Scott Wood
2007-03-12 23:01 ` Mark A. Greer [this message]
2007-03-12 23:29   ` David Gibson
2007-03-13  0:04     ` Mark A. Greer

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=20070312230148.GG31268@mag.az.mvista.com \
    --to=mgreer@mvista.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=scottwood@freescale.com \
    /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