[PATCH V5 2/4] arm/dt: add very basic dts file for babbage board
Shawn Guo
shawn.guo at freescale.com
Fri Mar 18 12:49:17 EST 2011
On Thu, Mar 17, 2011 at 10:42:38AM -0600, Grant Likely wrote:
> On Wed, Mar 16, 2011 at 11:51:39PM +0800, Jason Liu wrote:
[...]
> > + aips at 83f00000 {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + compatible = "simple-bus";
> > + ranges = <0x0 0x83f00000 0x100000>;
> > +
> > + fec at ec000 {
> > + compatible = "fsl,imx51-fec";
> > + reg = <0xec000 0x1000>;
> > + interrupts = <0x57>;
> > + fec_clk-clock = <&fec_clk>, "fec";
>
> Unfortunately we're leaking Linux implementation details here by
> needing to use the name "fec_clk". This will require some more
> thought on the best way to handle (but I'm not asking you to change
> anything yet).
>
This constraint comes from function of_clk_get in drivers/of/clock.c:
struct clk *of_clk_get(struct device *dev, const char *id)
{
[...]
dev_dbg(dev, "Looking up %s-clock from device tree\n", id);
snprintf(prop_name, 32, "%s-clock", id ? id : "bus");
prop = of_get_property(dev->of_node, prop_name, &sz);
[...]
}
The 'id' here is clk_lookup->con_id. If we choose to use some fixed
prop name here, the name leaking Linux implementation like 'fec_clk'
will not need to be there.
What about fixing the name as 'bus-clock' used by the current
implementation, or 'module-clock', or anything you can think of
better?
--
Regards,
Shawn
More information about the devicetree-discuss
mailing list