From: Grant Likely <grant.likely@secretlab.ca>
To: "EXTERNAL Lange Matthias (AA-DGW/ENG1)" <Matthias.Lange@beissbarth.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: DTS device tree node for dual port RAM
Date: Thu, 12 Mar 2009 07:32:28 -0600 [thread overview]
Message-ID: <fa686aa40903120632yb46c34bxdecf21f01996bf42@mail.gmail.com> (raw)
In-Reply-To: <44C5CFA72BC0E242A53B64DC1E67DEB80A695E6FE2@SI-MBX10.de.bosch.com>
On Thu, Mar 12, 2009 at 5:24 AM, EXTERNAL Lange Matthias (AA-DGW/ENG1)
<Matthias.Lange@beissbarth.com> wrote:
> Hi,
>
> I am working on a MPC5200-based board. There is a dual port RAM connected=
to the MPC5200 via the localbus. In my setup one can raise an interrupt at=
the MPC5200 to signal new that new data has arrived in the dual port RAM. =
I have already found out that the interrupt delivery actually works (do_IRQ=
gets called when raising the interrupt).
>
> My problem is that my driver (kernel 2.6.24) can not register for the int=
errupt. Each time I call request_irq I get -ENOSYS. I am suspecting that I =
have done something wrong in my dts defining the dual port RAM. I have defi=
ned the device as follows
>
> localbus {
> =A0 =A0 =A0 =A0compatible =3D "fsl,orion-localbus",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "fsl,mpc5200-localbus",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "fsl,pq2-localbus";
This should be: compatible =3D "fsl,mpc5200b-lpb","fsl,mpc5200-lpb","simple=
-bus";
It doesn't make much sense to claim compatibility with fsl,orion or
fsl,pq2 because the mpc5200 localbus is neither of those.
> =A0 =A0 =A0 =A0#address-cells =3D <2>;
> =A0 =A0 =A0 =A0#size-cells =3D <1>;
> =A0 =A0 =A0 =A0reg =3D <f0010100 40>;
> =A0 =A0 =A0 =A0ranges =3D <0 0 fe000000 00400000>;
>
> =A0 =A0 =A0 =A0dpram@40000000 {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0device_type =3D "dpram";
Don't use device_type. It doesn't make any sense in the flattened
device tree. Use a compatible value instead, and prefix dpram with
the vendor and board name of the platform. ie: compatible =3D
"<company>,<board>-dpram". You should also document what this
compatible value means in Documentation/powerpc/device-tree/
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0interrupts =3D <0 0 0>;
What hardware irq# are you using? See this link for a description of
what the interrupts property should look like for external IRQs:
http://patchwork.ozlabs.org/patch/11349/
To use this property, the irq_of_parse_and_map() function will
translate from the device tree to a Linux IRQ number.
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0interrupt-parent =3D <&mpc5200_pic>;
You probably also want a reg =3D <0 0 0x00400000>; property for mapping
the address range.
> =A0 =A0 =A0 =A0};
> };
>
> What am I doing wrong? What am I missing?
>
> Thanks,
> Matthias Lange.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2009-03-12 13:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 11:24 DTS device tree node for dual port RAM EXTERNAL Lange Matthias (AA-DGW/ENG1)
2009-03-12 13:32 ` Grant Likely [this message]
2009-03-12 15:19 ` EXTERNAL Lange Matthias (AA-DGW/ENG1)
2009-03-16 4:57 ` Grant Likely
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=fa686aa40903120632yb46c34bxdecf21f01996bf42@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=Matthias.Lange@beissbarth.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).