DTS device tree node for dual port RAM
Grant Likely
grant.likely at secretlab.ca
Fri Mar 13 00:32:28 EST 2009
On Thu, Mar 12, 2009 at 5:24 AM, EXTERNAL Lange Matthias (AA-DGW/ENG1)
<Matthias.Lange at 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 interrupt. 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 defined the device as follows
>
> localbus {
> compatible = "fsl,orion-localbus",
> "fsl,mpc5200-localbus",
> "fsl,pq2-localbus";
This should be: compatible = "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.
> #address-cells = <2>;
> #size-cells = <1>;
> reg = <f0010100 40>;
> ranges = <0 0 fe000000 00400000>;
>
> dpram at 40000000 {
> device_type = "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 =
"<company>,<board>-dpram". You should also document what this
compatible value means in Documentation/powerpc/device-tree/
> interrupts = <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.
> interrupt-parent = <&mpc5200_pic>;
You probably also want a reg = <0 0 0x00400000>; property for mapping
the address range.
> };
> };
>
> What am I doing wrong? What am I missing?
>
> Thanks,
> Matthias Lange.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the Linuxppc-dev
mailing list