Device tree with early buffer allocations and aliased memory

Grant Likely grant.likely at secretlab.ca
Wed Nov 17 15:35:35 EST 2010


On Tue, Nov 16, 2010 at 4:21 PM, David VomLehn <dvomlehn at cisco.com> wrote:
> On 11/15/2010 10:57 PM, Grant Likely wrote:
>
> ...
>>
>> I'm not sure I completely follow you.  Any memory described in a
>> device_type="memory" node will by default be used as system RAM by
>> Linux.  If some of that region needs to be used for DMA buffers, then
>> you'll need to make sure that when a driver allocates a buffer, that
>> the buffer is made valid for DMA operations.  How you do this is
>> architecture specific.
>
> Okay, I think I've got this down
> ...
>>
>> what does 'stbus' mean?  If it is the hardware name for the bus, then
>> it is probably a good choice.  'soc' is often used, but I'm not a big
>> fan of that convention because it doesn't reflect the actual internal
>> architecture of the chip.
>
> Yes, this is what STMicroelectronics call their bus, specifically "STBus".
> Which looks like what the device tree calls a simple- bus.

To be specific, 'simple-bus' is a binding that means a simple memory
mapped bus without any configuration required, but it is not the name
of a bus.  See ePAPR for the actual binding definition (which is
pretty small).  For completeness, the compatible value for this node
should probably be:

compatbile = "<socvendor>,<socmodel>-stbus", "simple-bus";

so that both the specific device device is detailed, as well as the
fact that it is compatible with the simple-bus binding.

As for the node name, "bus" would be fine.  "stbus" would also be
okay, as would "soc" or "soc-bus".  The node name doesn't actually
matter much as operating systems shouldn't ever depend on node names
to determine behaviour, but the generic names recommended practice
should still be followed as much as possible (see section 2.2.2 in
ePAPR.  This is also why "simple-bus" isn't a good name, because
"simple-bus" represents the programming model, not a generic name of
what the node is).

.... and yes, I am aware that i get rather pedantic about this stuff.  :-)

g.


More information about the devicetree-discuss mailing list