mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Jonas Jensen <jonas.jensen@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk,
	linux-kernel@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org, arm@kernel.org
Subject: Re: [PATCH 2/3] ARM: mach-moxart: add MOXA ART device tree files
Date: Mon, 17 Jun 2013 15:23:53 -0700	[thread overview]
Message-ID: <20130617222353.GB13266@quad.lixom.net> (raw)
In-Reply-To: <CACmBeS0T1n92CcGN6kR+eBcFPuwsWc+PsUx7Cms+4vbeVFhQKg@mail.gmail.com>

On Fri, Jun 14, 2013 at 04:34:24PM +0200, Jonas Jensen wrote:
> Hi,
> 
> Thanks for the replies.
> 
> What isn't commented below should already be fixed.
> 
> On 13 June 2013 00:49, Olof Johansson <olof@lixom.net> wrote:
> > Hi,
> >
> > You should add a bindings description for the MOXA SoC platforms, similar to
> > how others do it, under Documentation/devicetree/bindings/arm/.
> 
> The following is now added under Documentation:
> 
>  Documentation/devicetree/bindings/arm/moxart.txt   |    8 +++
>  .../arm/moxart/moxart-interrupt-controller.txt     |   29 ++++++++++++
>  .../bindings/arm/moxart/moxart-timer.txt           |   17 +++++++
> 
> > Same goes for other device bindings below -- they all need to be added to the
> > bindings documentation. You might be better off removing some of them until you
> > post and merge the corresponding drivers.
> 
> I'll remove them for now with the intent of adding them later. Maybe
> when (and if) all drivers are posted and merged.
> 
> >> +/dts-v1/;
> >> +/include/ "moxart.dtsi"
> >> +
> >> +/ {
> >> +     model = "MOXA UC-7112-LX";
> >> +     compatible = "moxa,moxart-uc-7112-lx";
> >
> > Is there a generic board design / eval board that you can have as a fallback
> > compatible value? That way you won't have to add every board to the table in
> > the c file.
> 
> There isn't really a generic board but the same can be accomplished by
> adding "moxa,moxart" to compatible? New boards can then be added
> without patching arch/arm/mach-moxart/moxart.c.

Sounds good. See comment on the other email about checking for machine
compatible in the init setup function too, that'll work well.

> 
> >> +     mxser@98200040 {
> >> +             compatible = "moxa,moxart-mxser";
> >> +             reg =   <0x98200040 0x00000080>,        /* UART "3" base */
> >> +                             <0x982000e4 0x00000080>,        /* UART mode base */
> >> +                             <0x982000c0 0x00000020>;        /* UART interrupt vector */
> >
> > Are there other registers for other devices inbetween, or could you just do one
> > large memory area here?
> 
> No, reg could simply be 0x98200040 to 0x982000e0. I split them out as
> documentation but those could be defined in the driver instead, also
> because it's sort of easier to assign values with of_iomap.

I'd say just go with one register area, it's how most other drivers do it so
it's most familiar to someone else coming in and reading your code to fix bugs
or whatnot.

> >> +             interrupts = <31 1>;
> >> +     };
> >> +
> >> +     mac0: mac@90900000 {
> >> +             compatible = "moxa,moxart-mac0";
> >> +             reg =   <0x90900000 0x1000>,
> >> +                             <0x80000050 0x5>;                       /* MAC address stored on flash */
> >
> > This is a pretty unusal way to indicate mac address location. While I suppose
> > it works, I'd like to get the device tree maintainers in the loop. ADding them
> > to cc.
> >
> > Also, there should be a bindings doc for this device (and a driver)
> 
> I'm removing ethernet until the driver is submitted. This allows me to
> submit bindings doc later?

Yep.

> 
> > I'm also surprised that you have a 5-byte mac address. 6 bytes is much more
> > common. :)
> 
> That _is_ surprising :) Corrected to 6 bytes.

:)

> > Finally, are the two MACs using the same driver? if so, using the same
> > compatible value makes more sense.
> 
> Yes, using the same driver is the point. I see now they can use the
> same value, they'll still be probed from the DT entries.

Yeah. Let's discuss that further when the driver is ready if needed.


-Olof

  reply	other threads:[~2013-06-17 22:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 12:34 [PATCH 0/3] ARM: mach-moxart: add MOXA ART SoC support Jonas Jensen
2013-06-12 12:34 ` [PATCH 1/3] ARM: mach-moxart: add MOXA ART SoC files Jonas Jensen
2013-06-12 22:42   ` Olof Johansson
2013-06-14 14:33     ` Jonas Jensen
2013-06-17 22:21       ` Olof Johansson
2013-06-14 14:47   ` Arnd Bergmann
2013-06-14 16:41     ` Olof Johansson
2013-06-14 17:44       ` Arnd Bergmann
2013-07-04 14:44   ` [PATCH v3 1/4] " Jonas Jensen
2013-06-12 12:34 ` [PATCH 2/3] ARM: mach-moxart: add MOXA ART device tree files Jonas Jensen
2013-06-12 22:49   ` Olof Johansson
2013-06-14 14:34     ` Jonas Jensen
2013-06-17 22:23       ` Olof Johansson [this message]
2013-07-04 14:45   ` [PATCH v3 2/4] " Jonas Jensen
2013-07-17  9:04     ` Jonas Jensen
2013-06-12 12:34 ` [PATCH 3/3] ARM: mach-moxart: add MOXA ART UART debug files Jonas Jensen
2013-06-12 22:56   ` Olof Johansson
2013-06-14 14:35     ` Jonas Jensen
2013-07-04 14:45   ` [PATCH v3 3/4] " Jonas Jensen

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=20130617222353.GB13266@quad.lixom.net \
    --to=olof@lixom.net \
    --cc=arm@kernel.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=jonas.jensen@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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

all inboxes | Powered by JetHome®