[Power.org:parch] devicetree: Musings on reserved regions
Scott Wood
scottwood at freescale.com
Tue Feb 8 08:46:36 EST 2011
On Tue, 8 Feb 2011 08:39:26 +1100
Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:
>
> > In addition to the reserved regions block in the header, define a set
> > of properties in the memory node that specify the reserved regions
> > with the name reflecting the usage.
> > For example:
> >
> > memory at 0 {
> > device_type = "memory";
> > reg = <0 0x40000000>;
> > reserved-ramdisk = <0xc00000 0x200000>; /* 2MB ramdisk */
> > reserved-dtb = <0xbf0000 0x1000>; /* devicetree */
> > reserved-fb0 = 0x1000000 0x400000>; /* framebuffer */
> > };
> >
> > Each reserved property would start with "reserved-" followed by a
> > name. reserved-ramdisk and reserved-dtb would be reserved for ramdisk
> > and dtb images respectively. Other names could also be defined; for
> > example, reserved-openfirmware.
>
> I very much dislike the list of properties with magic names. I'd rather
> have a pair of properties containing lists (reserved-names and
> reserved-ranges).
How about a node:
memory at 0 {
device_type = "memory";
reg = <0 0x40000000>;
reserved {
ramdisk = <0xc00000 0x200000>; /* 2MB ramdisk */
dtb = <0xbf0000 0x1000>; /* devicetree */
fb0 = <0x1000000 0x400000>; /* framebuffer */
something-fragmented = <0x800000 0x100000 0xa00000 0x100000>;
};
};
Or is the objection to any use of the property name to indicate reservation type,
rather than the magic "reserved-" prefix?
-Scott
More information about the devicetree-discuss
mailing list