From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Tue, 22 Dec 2015 07:47:47 -0700 Subject: [U-Boot] [PATCH 1/2] arm: imx6: Add DDR3 calibration code for MX6 Q/D/DL In-Reply-To: References: <1450276807-8960-1-git-send-email-marex@denx.de> <56770222.1050108@nelint.com> Message-ID: <56796293.9040603@nelint.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tim, On 12/21/2015 09:13 PM, Tim Harvey wrote: > On Sun, Dec 20, 2015 at 11:31 AM, Eric Nelson wrote: >> Hi Marek, >> > >> I'd recommend passing parameters of mx6_ddr_sysinfo (input) and >> mx6_mmdc_calibration (output) to this routine. >> > > I don't know that this would make sense. The mx6_ddr_sysinfo shouldn't > be affected by calibration and the mx6_mmdc_calibration structure > would not be used if you are using auto-calibration. > > In fact, I recommend an additional patch that will call the > auto-calibration functions in mx6_ddr3_cfg if it is passed a NULL for > mx6_ddr_calibration. > Using sysinfo allows simpler determination of things like bus size and rtt_nom. This should be based on a board's configuration instead of inferring the parameters by reading and interpreting registers that must have been set before the calls to do_write_level_calibration(). The DDR stress tool does this (read from registers) because it's distributed as a binary and JTAG is used to configure things before running. The calibration parameter would be used in a subsequent patch to add a "calibration" pseudo-board. Regards, Eric