linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: linuxppc-dev@ozlabs.org, John Linn <john.linn@xilinx.com>
Subject: Re: [PATCH 2/3] [POWERPC][V3] Xilinx: of_serial support for Xilinx uart 16550.
Date: Wed, 2 Apr 2008 20:43:54 -0600	[thread overview]
Message-ID: <fa686aa40804021943m208c2ff0va6c6b629a747439f@mail.gmail.com> (raw)
In-Reply-To: <200804030134.11437.arnd@arndb.de>

On Wed, Apr 2, 2008 at 5:34 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 03 April 2008, John Linn wrote:
>  > The Xilinx 16550 uart core is not a standard 16550 because it uses
>  > word-based addressing rather than byte-based addressing. With
>  > additional properties it is compatible with the open firmware
>  > 'ns16550' compatible binding.
>  >
>  > This code updates the of_serial driver to handle the reg-offset
>  > and reg-shift properties to enable this core to be used.
>  >
>  > Signed-off-by: John Linn <john.linn@xilinx.com>
>
>  I may not be the best driver maintainer, but please keep the illusion
>  alive for me and Cc me on patches to drivers I wrote ;-)
>
>
>  > diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
>  > index 87f4d84..4066ec8 100644
>  > --- a/Documentation/powerpc/booting-without-of.txt
>  > +++ b/Documentation/powerpc/booting-without-of.txt
>  > @@ -2539,6 +2539,16 @@ platforms are moved over to use the flattened-device-tree model.
>  >                        differ between different families.  May be
>  >                        'virtex2p', 'virtex4', or 'virtex5'.
>  >
>  > +      iv) Xilinx Uart 16550
>  > +
>  > +      Xilinx UART 16550 devices are very similar to the NS16550 but with
>  > +      different register spacing and an offset from the base address.
>  > +
>  > +      Requred properties:
>  > +       - clock-frequency : Frequency of the clock input
>  > +       - reg-offset : A value of 3 is required
>  > +       - reg-shift : A value of 2 is required
>  > +
>  >     More devices will be defined as this spec matures.
>
>  Since it is not really compatible with ns16550, shouldn't you at least specify
>  a different "compatible" property? That way, the driver won't do incorrect
>  accesses when you try to use an old driver with a device tree that specifies
>  one of these.

Heh; we've gone back and forth on this issue.  The problem is that we
have a common case of ns16550 like devices that require a little bit
of register address tweaking that spans a whole range of vendors (so
adding a compatible match with each of those vendor's prefixes is
probably non-scalable).  So, if "ns16550" is not a good idea, then
what should be used?  "sparse16550" has been suggested more than once.

On the other side of the coin; the draft ePAPR spec already redefines
the meaning of "ns16550" to add an optional "reg-shift" property.
Also, in this particular case the problem is most likely more
theoretical than actual.  The likely hood of a platform needing these
new properties being handed a kernel which does not support the
"reg-*" properties is very slim.

Anyway, all that just to say that I prefer "ns16550", but I'll put my
vote and support behind "sparse16550" (or any other string) if other
people express consensus with it.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2008-04-03  2:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-02 23:22 [PATCH 2/3] [POWERPC][V3] Xilinx: of_serial support for Xilinx uart 16550 John Linn
2008-04-02 23:34 ` Arnd Bergmann
2008-04-03  2:43   ` Grant Likely [this message]
2008-04-03  4:16     ` Arnd Bergmann
2008-04-03 13:29       ` John Linn
2008-04-03 22:36       ` [PATCH 2/3] [POWERPC][V3] Xilinx: of_serial support for Xilinxuart 16550 Stephen Neuendorffer
2008-04-05 14:45       ` [PATCH 2/3] [POWERPC][V3] Xilinx: of_serial support for Xilinx uart 16550 Josh Boyer
2008-04-08  2:44         ` David Gibson
2008-04-03 12:25 ` 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=fa686aa40804021943m208c2ff0va6c6b629a747439f@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=arnd@arndb.de \
    --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).