On Friday 02 March 2012, Jason wrote:
> Grr... good catch. I originally had this in kirkwood-dreamplug.dts,
> which is always 200000000. That's not the case in kirkwood.dtsi. What
> I would like to do, and I haven't had time to look into it (I thought I
> would tackle it later as a refinement :-( ), is a reference of some
> sort, eg:
>
> in kirkwood.dtsi:
>
> / {
> compatible = "marvell,kirkwood";
> tclk:clock-frequency = <200000000>;
>
> wdt@fed20300 {
> compatible = "marvell,orion-wdt";
> reg = <0xfed20300 0x28>;
> clock-frequency = &tclk;
> };
> };
>
> then, in kirkwood-foobar.dts
>
> include "kirkwood.dtsi"
>
> / {
> model = "foobar";
> compatible = "...";
> tclk:clock-frequency = <166000000>;
> };
>
> but I'm not sure if that would work.
That would make wdt@fed20300/clock-frequency a phandle pointing to the
root property, which is not what we want here.
> In any case, the simplest answer is to set clock-frequency in
> kirkwood-dreamplug.dts as a root node property, and then each driver
> that needs tclk, requests the clock-frequency from the root node.
> Hopefully, Grant can chime in on this one.
I think you can just pick a reasonable default value for
wdt@fed20300/clock-frequency, and let the board override that
by setting it to something else if necessary. I suppose this
will also change a bit when kirkwood gets moved over to generic
clk support in the future and starts using the clk binding instead
of what you do now.
Arnd
_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss