On 01/19/2012 04:59 PM, Simon Glass wrote:
> Hi Stephen,
> 
> On Thu, Jan 19, 2012 at 1:58 PM, Stephen Warren <swar...@nvidia.com> wrote:
>> On 01/13/2012 02:35 PM, Simon Glass wrote:
>>> From: Jimmy Zhang <jimmzh...@nvidia.com>
>>>
>>> Add support for setting up the memory controller parameters. Boards
>>> can set up an appropriate table in the device tree.
...
>> emc {
>>    ...
>>    nvidia,use-ram-code;
>>    emc-tables {
>>        nvidia,ram-code = <0>;
>>        emc-table@190000 {
>>            compatible = "nvidia,tegra20-emc-table";
>>            ...
>>        };
>>        emc-table@380000 {
>>            compatible = "nvidia,tegra20-emc-table";
>>            ...
>>        };
>>    };
>>    emc-tables {
>>        nvidia,ram-code = <1>;
>>        emc-table@190000 {
>>            compatible = "nvidia,tegra20-emc-table";
>>            ...
>>        };
>>        emc-table@380000 {
>>            compatible = "nvidia,tegra20-emc-table";
>>            ...
>>        };
>>    };
>> };
...
>> BTW, does:
>>
>> +               node = fdtdec_next_compatible(blob, node,
>> +                               COMPAT_NVIDIA_TEGRA20_EMC_TABLE);
>>
>> limit itself to searching child nodes?
> 
> No; I will add that to the docs.

OK, in that case, you'll probably want to augment the EMC DT parsing
code to validate that the node returned by fdtdec_next_compatible is
underneath the same parent node (or perhaps add a new utility function
to do this). Otherwise, if you search RAM code 0's node and there's no
match, you could end up using a table from under RAM code 1's node.

-- 
nvpublic
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to