From: "Grant Likely" <grant.likely@secretlab.ca>
To: "John Linn" <john.linn@xilinx.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 3/3][POWERPC][V2] Xilinx: boot support for Xilinx uart 16550.
Date: Wed, 2 Apr 2008 11:52:46 -0600 [thread overview]
Message-ID: <fa686aa40804021052q31b89cafsb2b9bf5d88af8262@mail.gmail.com> (raw)
In-Reply-To: <20080402165216.C835D1CF8088@mail12-sin.bigfish.com>
On Wed, Apr 2, 2008 at 10:52 AM, John Linn <john.linn@xilinx.com> wrote:
> The Xilinx 16550 uart core is not a standard 16550 because it uses
> word-based addressing rather than byte-based adressing. With
> additional properties it is compatible with the open firmware
> 'ns16550' compatible binding.
>
> This code updates the ns16550 driver to use the reg-offset property
> so that the Xilinx UART 16550 can be used with it. The reg-shift
> was already being handled.
>
> Signed-off-by: John Linn <john.linn@xilinx.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> arch/powerpc/boot/ns16550.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/boot/ns16550.c b/arch/powerpc/boot/ns16550.c
> index f8f1b2f..da9d2c2 100644
> --- a/arch/powerpc/boot/ns16550.c
> +++ b/arch/powerpc/boot/ns16550.c
> @@ -56,6 +56,7 @@ int ns16550_console_init(void *devp, struct serial_console_data *scdp)
> {
> int n;
> unsigned long reg_phys;
> + u32 reg_offset;
>
> n = getprop(devp, "virtual-reg", ®_base, sizeof(reg_base));
> if (n != sizeof(reg_base)) {
> @@ -65,6 +66,10 @@ int ns16550_console_init(void *devp, struct serial_console_data *scdp)
> reg_base = (void *)reg_phys;
> }
>
> + n = getprop(devp, "reg-offset", ®_offset, sizeof(reg_offset));
> + if (n == sizeof(reg_offset))
> + reg_base += reg_offset;
> +
> n = getprop(devp, "reg-shift", ®_shift, sizeof(reg_shift));
> if (n != sizeof(reg_shift))
> reg_shift = 0;
> --
> 1.5.2.1
>
>
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2008-04-02 17:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <12071551351007-git-send-email-john.linn@xilinx.com>
2008-04-02 16:52 ` [PATCH 3/3][POWERPC][V2] Xilinx: boot support for Xilinx uart 16550 John Linn
2008-04-02 17:52 ` Grant Likely [this message]
2008-04-03 0:02 ` David Gibson
2008-04-03 1:16 ` Grant Likely
2008-04-03 13:23 ` Johann Baudy
2008-04-03 13:28 ` John Linn
2008-04-03 14:05 ` Grant Likely
[not found] ` <12071551354058-git-send-email-john.linn@xilinx.com>
2008-04-02 16:52 ` [PATCH 2/3][POWERPC][V2] Xilinx: of_serial " John Linn
2008-04-02 18:00 ` Grant Likely
2008-04-02 18:20 ` John Linn
2008-04-02 19:27 ` Grant Likely
2008-04-02 19:19 ` Sergei Shtylyov
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=fa686aa40804021052q31b89cafsb2b9bf5d88af8262@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=john.linn@xilinx.com \
--cc=linuxppc-dev@ozlabs.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).