
Hi Stephen,
On Thu, Jan 19, 2012 at 1:58 PM, Stephen Warren swarren@nvidia.com wrote:
On 01/13/2012 02:35 PM, Simon Glass wrote:
From: Jimmy Zhang jimmzhang@nvidia.com
Add support for setting up the memory controller parameters. Boards can set up an appropriate table in the device tree.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v2:
- Add debug() output to EMC
- Move EMC tables to device tree
This patch doesn't fully handle the device tree binding. There are two alternatives:
two-level:
emc { ... emc-table@190000 { compatible = "nvidia,tegra20-emc-table"; ... }; emc-table@380000 { compatible = "nvidia,tegra20-emc-table"; ... }; };
three-level:
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"; ... }; }; };
Even if we don't fully implement support for both, we should detect the unsupported and flag an explicit error. But, it's pretty easy to support the other format.
OK I will look at which way to jump on this.
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.
Regards, Simon
-- nvpublic