How to handle named resources with DT?

Scott Wood scottwood at freescale.com
Tue Aug 9 17:52:27 EDT 2011


On 08/09/2011 04:44 PM, Cousson, Benoit wrote:
> OK, so what about extending the reg attribute to be a reg node?
> 
> dev {
>     reg {
>         name = "foo_wrapper";
>         start = <0x10000>;
>         end = <0x200>;
>     }
>     reg {
>         name = "foo";
>         start = <0x20000>;
>         end = <0x200>;
>     }
> }
> 
> A little bit more verbose, but at least we can add any attribute we want.

A more standard way to do that would be something like:

dev {
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;

	foo {
		reg = <0x10000 0x200>;
	};
	bar {
		reg = <0x20000 0x200>;
	};
};

...which is OK if you need the expressiveness of a full hierarchy (and
don't have some other meaning for child nodes of "dev"), but it seems
like it would be overkill for some places where named resources would be
useful.

-Scott




More information about the linux-arm-kernel mailing list