From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Kirkwood: Fix the internal register ranges translation
Date: Thu, 18 Jul 2013 11:05:51 -0300 [thread overview]
Message-ID: <20130718140550.GA3364@localhost> (raw)
In-Reply-To: <51E59639.3000207@keymile.com>
Gerlando,
On Tue, Jul 16, 2013 at 08:51:37PM +0200, Gerlando Falauto wrote:
[...]
> >
> > Also, speaking of "device bus" this nand node should be behind a devicebus node.
> >
> > ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 /* internal-regs */
> > MBUS_ID(0x01, 0x2f) 0 0 0xf4000000 0x400>;
> >
> > devbus {
> > status = "okay";
> > ranges = <0 MBUS_ID(0x01, 0x2f) 0 0x400>;
> >
> > /* nand */
> > nand {
> > compatible = "marvell,orion-nand";
> > reg = <0 0x400>;
> > };
> > };
>
> I believe that makes a lot more sense this way... I guess this feature
> (device bus) requires your latest set of patches, right? (either v7 as
> you posted yesterday or your tree at
> git://github.com/MISL-EBU-System-SW/mainline-public.git/marvell-mvebu-mbus-v7)
>
No, not really. The device-bus driver is already merged, so we only need
to use it, and maybe extend it a bit to support kirkwood (in case it's
needed). You can see in:
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
for an example.
I would prefer that to be done *after* the MBus is accepted...
but that's just a personal preference.
> > (notice this will allow you to relocate the base address of the NAND windows
> > easily if it conflicts with your PCIe needs).
>
> I sort of had the impression I could do already do that somehow, though
> I am not quite sure anymore...
>
Well, you can do it by patching and re-building the kernel as the
MBus windows are created from C-files.
With the MBus DT binding, all you need is to change the DT.
> >> avoid a later incosistency between the "unit-address" and the first
> >> "reg" address:
> >>
> >>> #address-cells = <1>;
> >>> #size-cells = <1>;
> >>> @@ -171,7 +172,7 @@
> >> > nand at 3000000 {
> >> ^^^^^^^
> >
> > Oh, this should be fixed. I just missed it, and nobody noticed either.
> >
>
> So, in the end, you think it's OK to have a set of nodes with "relative"
> addresses (gpio at 10140, serial at 12000 etc...) and some with "absolute"
> addresses (nand at 0xf4000000, where the ranges property does a 0-offset
> translation)?
> Even though I understand this is just some transitional state, and it
> will all be fixed like your example above, once we get the rest of the
> rework merged (mbus/devbus).
Mmm.. I see your point. In the end, it's just as you say, the current state
is only transitional. There's no way to have a proper DT without the MBus DT
binding.
The reason for this mess is that the current layout mixes the actual
address space. Feel free to take a look at the latest MBus series and
try to add MBus DT binding for Kirkwood.
If you do, don't hesitate in asking as many questions as you need and/or
posting RFCs for us to look at.
--
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
next prev parent reply other threads:[~2013-07-18 14:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 15:31 [PATCH] ARM: Kirkwood: Fix the internal register ranges translation Ezequiel Garcia
2013-06-18 19:42 ` Sebastian Hesselbarth
2013-06-18 19:47 ` Ezequiel Garcia
2013-06-19 18:36 ` Jason Cooper
2013-06-19 18:42 ` Ezequiel Garcia
2013-06-19 18:43 ` Jason Cooper
2013-06-21 15:41 ` Jason Cooper
2013-07-16 9:37 ` Gerlando Falauto
2013-07-16 12:56 ` Ezequiel Garcia
2013-07-16 18:51 ` Gerlando Falauto
2013-07-18 14:05 ` Ezequiel Garcia [this message]
2013-07-17 6:35 ` Gerlando Falauto
2013-07-18 13:55 ` Ezequiel Garcia
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=20130718140550.GA3364@localhost \
--to=ezequiel.garcia@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.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).