[U-Boot] [PATCH v2 09/20] tegra: Add EMC support for optimal memory timings
Simon Glass
sjg at chromium.org
Fri Apr 13 15:31:52 CEST 2012
Hi Stephen,
On Thu, Jan 19, 2012 at 4:10 PM, Stephen Warren <swarren at nvidia.com> wrote:
> On 01/19/2012 04:59 PM, Simon Glass wrote:
>> Hi Stephen,
>>
>> On Thu, Jan 19, 2012 at 1:58 PM, Stephen Warren <swarren at nvidia.com> wrote:
>>> On 01/13/2012 02:35 PM, Simon Glass wrote:
>>>> From: Jimmy Zhang <jimmzhang at 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 at 190000 {
>>> compatible = "nvidia,tegra20-emc-table";
>>> ...
>>> };
>>> emc-table at 380000 {
>>> compatible = "nvidia,tegra20-emc-table";
>>> ...
>>> };
>>> };
>>> emc-tables {
>>> nvidia,ram-code = <1>;
>>> emc-table at 190000 {
>>> compatible = "nvidia,tegra20-emc-table";
>>> ...
>>> };
>>> emc-table at 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.
I forgot to mention that I did this in later versions (v4 and v5).
Regards,
Simon
>
> --
> nvpublic
More information about the U-Boot
mailing list