From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 19 Jan 2012 17:10:16 -0700 Subject: [U-Boot] [PATCH v2 09/20] tegra: Add EMC support for optimal memory timings In-Reply-To: References: <1326490535-3461-1-git-send-email-sjg@chromium.org> <1326490535-3461-10-git-send-email-sjg@chromium.org> <4F18921D.8020005@nvidia.com> Message-ID: <4F18B0E8.7080400@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/19/2012 04:59 PM, Simon Glass wrote: > Hi Stephen, > > On Thu, Jan 19, 2012 at 1:58 PM, Stephen Warren wrote: >> 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. ... >> 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. -- nvpublic