From: Jason <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 1/2 v5] arm: kirkwood: add dreamplug (fdt) support.
Date: Thu, 23 Feb 2012 16:11:38 -0500 [thread overview]
Message-ID: <20120223211138.GP23524@titan.lakedaemon.net> (raw)
In-Reply-To: <CACxGe6vjzXUwvGu73p+5L2-cW5EOJtFcR8JW8-gOUrRt-choJg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, Feb 23, 2012 at 01:18:55PM -0700, Grant Likely wrote:
> On Thu, Feb 23, 2012 at 12:52 PM, Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org> wrote:
> > Initially, copied guruplug-setup.c and did s/guruplug/dreamplug/g.
> > Then, switched to SPI based NOR flash.
> >
> > After talking to Arnd Bergman, chose an incremental approach to adding
> > devicetree support. First, we use the dtb to tell us we are on the
> > dreamplug, then we gradually port over drivers.
> >
> > Driver porting will start with the uart (see next patch), and progress
> > from there. Possibly, spi/flash/partitions will be next.
> >
> > When done, board-dt.c will no longer be dreamplug specific, and dt's can
> > be made for the other kirkwood boards.
> >
> > Signed-off-by: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
> > ---
> > Changes from v1
> >
> > - attempting dts, looking for pointers.
> >
> > Changes from v2
> >
> > - resubmit as MACH_TYPE_DREAMPLUG (3550) is in arm/for-next, rebased
> > against same.
> > - removed lame fdt attempt, others are working on kirkwood fdt. Will
> > convert once kirkwood fdt is mainline.
> > - s/boot_params/atag_offset/
> > - added kirkwood_reset
> > - 1 checkpatch.pl warning (help in Kconfig), looks the same as all
> > other kirkwood boards...
> >
> > Changes from v3
> >
> > - rebased against v3.3-rc3 (recommended by Arnd)
> > - use devicetree to determine which board we are on
> > - added patch to configure uart0 from devicetree
> >
> > Changes from v4
> >
> > - fixed Kconfig logic so user can always see 'Dreamplug' in menuconfig.
> > - changed 'marvell,dreamplug' to 'globalscale,dreamplug' as suggested by
> > Grant Likely.
> > - fixed of_machine_is_compatible() logic for calling dreamplug specific
> > init functions.
> >
> > arch/arm/boot/dts/kirkwood-dreamplug.dts | 18 +++
> > arch/arm/boot/dts/kirkwood.dtsi | 6 +
> > arch/arm/mach-kirkwood/Kconfig | 14 +++
> > arch/arm/mach-kirkwood/Makefile | 1 +
> > arch/arm/mach-kirkwood/Makefile.boot | 2 +
> > arch/arm/mach-kirkwood/board-dt.c | 182 ++++++++++++++++++++++++++++++
> > 6 files changed, 223 insertions(+), 0 deletions(-)
> > create mode 100644 arch/arm/boot/dts/kirkwood-dreamplug.dts
> > create mode 100644 arch/arm/boot/dts/kirkwood.dtsi
> > create mode 100644 arch/arm/mach-kirkwood/board-dt.c
> >
> > diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
> > new file mode 100644
> > index 0000000..765813f
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
> > @@ -0,0 +1,18 @@
> > +/dts-v1/;
> > +
> > +/include/ "kirkwood.dtsi"
> > +
> > +/ {
> > + model = "Globalscale Technologies Dreamplug";
> > + compatible = "globalscale,dreamplug", "globalscale,kirkwood";
>
> Hahaha... okay, more clarification is needed here.
>
> The compatible property is a list, and the first entry must always be
> the exact device model. That is why the vendor of the hardware is in
> the prefix. However, the following entries are a list of devices that
> it is 'compatible' with. In the case of the top-level compatible
> property, we've been using the convention of including a string for
> the SoC, and in that case the manufacturer is indeed Marvell.
>
> Also, *be specific*. Kirkwood is a family of processors, not a single
> SoC. The compatible string should reflect that. So, in your case,
> compatible should look something like:
>
> compatible = "globalscale,dreamplug", "marvell,kirkwood-88f6281";
ahhh... ok. So, my board-dt.c should have:
static const char *kirkwood_dt_board_compat[] = {
"marvell,kirkwood",
NULL
};
And then the test to run the dreamplug specific init should be:
if (of_machine_is_compatible("globalscale,dreamplug"))
dreamplug_init();
And then, kirkwood.dtsi:
compatible = "marvell,kirkwood";
and kirkwood-dreamplug.dts:
compatible = "globalscale,dreamplug", "marvell,kirkwood-88f6281-a1";
My only question is, should the kirkwood.dtsi have just
"marvell,kirkwood", or "marvell,kirkwood","marvell,kirkwood-88f6281-a1"?
I'm guessing kirkwood.dtsi is a generic devicetree, and should just be
"marvell,kirkwood". If that's true, then *kirkwood_dt_board_compat
should just be "marvell,kirkwood" since board-dt.c should be able to
handle any kirkwood SoC.
Sorry for being so dense.
thx,
Jason.
next prev parent reply other threads:[~2012-02-23 21:11 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1312906908.git.jason@lakedaemon.net>
2012-02-22 19:18 ` [PATCH 0/3 v4] arm: kirkwood: add dreamplug/devicetree support Jason Cooper
2012-02-22 19:18 ` [PATCH 1/3] arm: ignore devicetree blobs Jason Cooper
[not found] ` <3629df9b5b96d3a3a63a34ebf6ddfca2fd72ccfc.1329936660.git.jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
2012-02-22 20:38 ` Arnd Bergmann
2012-02-22 22:26 ` Uwe Kleine-König
[not found] ` <20120222222619.GY14173-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-02-23 9:16 ` Dave Martin
2012-02-23 15:56 ` Jason
2012-02-22 19:18 ` [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support Jason Cooper
[not found] ` <8532afcdc4adbb3771e6f742bcc33ef9c0347858.1329936660.git.jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
2012-02-22 20:46 ` Arnd Bergmann
[not found] ` <201202222046.28707.arnd-r2nGTMty4D4@public.gmane.org>
2012-02-22 21:17 ` Nicolas Pitre
2012-02-23 3:19 ` Rob Herring
[not found] ` <4F45B043.1080302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-02-23 7:34 ` Arnd Bergmann
2012-02-23 16:12 ` Jason
[not found] ` <20120223161210.GN23524-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2012-02-23 18:56 ` Grant Likely
2012-02-23 19:00 ` Jason
2012-02-22 19:18 ` [PATCH 3/3] arm: kirkwood: convert uart0 to devicetree Jason Cooper
[not found] ` <0ad28cac6d608253b01e1d57bb479a29754ae823.1329936660.git.jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
2012-02-22 20:55 ` Arnd Bergmann
2012-02-22 21:09 ` Jason
2012-02-23 19:52 ` [PATCH 0/2 v5] arm: kirkwood: add dreamplug/devicetree support Jason Cooper
2012-02-26 11:00 ` Ian Campbell
[not found] ` <1330254038.10008.24.camel-ztPmHsLffjjnO4AKDKe2m+kiAK3p4hvP@public.gmane.org>
2012-02-27 14:57 ` Jason
2012-02-28 7:20 ` Ian Campbell
2012-02-23 19:52 ` [PATCH 1/2 v5] arm: kirkwood: add dreamplug (fdt) support Jason Cooper
2012-02-23 20:18 ` Grant Likely
[not found] ` <CACxGe6vjzXUwvGu73p+5L2-cW5EOJtFcR8JW8-gOUrRt-choJg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-23 21:11 ` Jason [this message]
[not found] ` <20120223211138.GP23524-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2012-02-23 21:21 ` Grant Likely
2012-02-24 14:35 ` Jason
[not found] ` <CACxGe6uMcOWC6ukTGF1soyfeTkT2fkmewhKUKA-AiK8hQDzCGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-24 19:36 ` Jason
2012-02-23 19:52 ` [PATCH 2/2 v2] arm: kirkwood: convert uart0 to devicetree Jason Cooper
[not found] ` <cover.1312906908.git.jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
2012-02-27 16:07 ` [PATCH 0/2 v6] arm: kirkwood: add dreamplug/devicetree support Jason Cooper
[not found] ` <cover.1330358323.git.jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
2012-02-27 16:07 ` [PATCH 2/2 v2] arm: kirkwood: convert uart0 to devicetree Jason Cooper
2012-02-27 16:29 ` [PATCH 0/2 v6] arm: kirkwood: add dreamplug/devicetree support Arnd Bergmann
2012-02-27 17:31 ` Jason
2012-02-27 16:07 ` [PATCH 1/2 v6] arm: kirkwood: add dreamplug (fdt) support Jason Cooper
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=20120223211138.GP23524@titan.lakedaemon.net \
--to=jason-nlaqjdtuok4be96alqz0ja@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.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).