ARM clock API to PowerPC
wmb at firmworks.com
Thu Aug 13 03:31:15 EST 2009
> On Wed, 2009-08-12 at 17:57 +1000, Benjamin Herrenschmidt wrote:
>> > - Device-tree: The idea on top of my mind would be to define a
>> > clock-map property that has the following format:
>> > A list of:
>> > - zero terminated string clock ID, padded with zeros
>> > to a cell boundary
Padding a string violates a core principle of property representation,
namely the "no alignment assumptions" one. The reason for that
principle was the fact that alignment needs are not stable across
processor families, or even within a processor family .
>> > - a phandle to the clock provider
>> > - a numerical (string ?) ID for that clock within that provider
>> > The core would thus be able to do a search in that list based on the
>> > clock-id passed in, or if clk_get(dev, NULL), then, use the first one.
> Thinking a bit more about that one, mixing strings and numbers in a
> property sucks. What about instead:
> clock-map is a list of phandle, id
> clock-names is an optional list of 0 terminated strings
This approach finesses the problem nicely.
> If there's only one clock, and the ID can be ommited, then the
> clock-names property can be ommited completely too. Else, the
> entries in clock-names match the entries in clock-map.
> It's a bit strange to separate the list into two properties but
> I think it will generally suck less than having them mixed, especially
> with ASCII representations such as lsprop output.
More information about the devicetree-discuss