From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 19 Jan 2012 14:58:53 -0700 Subject: [U-Boot] [PATCH v2 09/20] tegra: Add EMC support for optimal memory timings In-Reply-To: <1326490535-3461-10-git-send-email-sjg@chromium.org> References: <1326490535-3461-1-git-send-email-sjg@chromium.org> <1326490535-3461-10-git-send-email-sjg@chromium.org> Message-ID: <4F18921D.8020005@nvidia.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/13/2012 02:35 PM, Simon Glass wrote: > From: Jimmy Zhang > > 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 > --- > 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 at 190000 { compatible = "nvidia,tegra20-emc-table"; ... }; emc-table at 380000 { compatible = "nvidia,tegra20-emc-table"; ... }; }; three-level: 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"; ... }; }; }; 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. BTW, does: + node = fdtdec_next_compatible(blob, node, + COMPAT_NVIDIA_TEGRA20_EMC_TABLE); limit itself to searching child nodes? -- nvpublic