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 1/3] ARM: mach-moxart: add MOXA ART SoC files
Date: Mon, 17 Jun 2013 15:21:11 -0700	[thread overview]
Message-ID: <20130617222111.GA13266@quad.lixom.net> (raw)
In-Reply-To: <CACmBeS1xNgc=TN3ZdhhHS0K+SMU+Zc1cvH7VXQHiTye=Ufoj8Q@mail.gmail.com>

Hi,

On Fri, Jun 14, 2013 at 04:33:29PM +0200, Jonas Jensen wrote:
> Hi,
> 
> Thanks for the replies.
> 
> What isn't commented below should already be fixed. I'll resubmit the
> entire set when it looks like there's nothing left to amend.
> 
> On 13 June 2013 00:42, Olof Johansson <olof@lixom.net> wrote:
> > You should provide a commit message, ideally with a short introduction of the
> > platform.
> 
> Will do. I was thinking I should do that, this is the first time I
> used git format-patch / git send-email.
> 
> >> +++ b/arch/arm/configs/moxart_uc7112lx_defconfig
> >
> > It'd be nice to keep the defconfig generic, and make sure to enable all boards
> > in it -- we're generally OK with adding one defconfig per platform upstream but
> > not more.
> 
> Since MACH_UC7112LX is the only board right now, how can it "enable all boards"?

Yeah, that was more with respect to future use of the defconfig. So keeping it
generic in name for now (moxart_defconfig) is really all I am asking for.

> One way I can think of is to remove CONFIG_MACH_UC7112LX=y from
> defconfig and have it (and all future boards) "default y" in
> arch/arm/mach-moxart/Kconfig.

Enabling it in the defconfig is just fine, no need to change anything there at
this time.

> I focus on a single hardware, UC-7112-LX. There's at least one more
> board with only minor differences (RAM / flash size). But for now,
> MACH_UC7112LX is the one I have access to and can test. I think
> UC-7110 is already supported, that it would boot, just copy
> arch/arm/boot/dts/moxart-uc7112lx.dts and modify ranges for RAM and
> MTD. I want to leave this in a state where remaining hardware can
> easily be added, albeit by someone that isn't me :)

Sure, that's a fair stance.

> > If you multiplatform enable this, then you need to have a check in
> > moxart_idle_init() to make sure you're running on a moxart soc. Otherwise this
> > will still be called and override the arm_pm_idle setting on other platforms as
> > well.
> 
> I can't find a good example of how other platforms do this, is a DT
> lookup an accepted solution? :
> 
> static const struct of_device_id moxart_match[] = {
>        { .compatible = "moxa,moxart" },
>        { }
> };
> 
> static int __init moxart_idle_init(void)
> {
>     struct device_node *node;
> 
>     node = of_find_matching_node(NULL, moxart_match);
>     if (!node)
>         return -ENODEV;
> 
>     arm_pm_idle = moxart_idle;
>     return 0;
> }
> 
> arch_initcall(moxart_idle_init);

Easiest of all is if you have a "moxa,moxart" compatible field as the
most-specific one for your machine, then you can just do:

...
{
	if (!of_machine_is_compatible("moxa,moxart"))
		return -ENODEV;

	arm_pm_idle = moxart_idle;
	return 0;
}

-Olof

  reply	other threads:[~2013-06-17 22:21 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 [this message]
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
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=20130617222111.GA13266@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

Powered by JetHome