From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Wed, 22 Jun 2016 17:18:07 -0700 Subject: [U-Boot] [RFC PATCH 01/12] imx: mx6: ddr: return output of calibration routines In-Reply-To: <576B25DE.1090402@denx.de> References: <1466534502-17233-1-git-send-email-eric@nelint.com> <1466534502-17233-2-git-send-email-eric@nelint.com> <576B1CD8.2090206@denx.de> <576B24C5.2040003@nelint.com> <576B25DE.1090402@denx.de> Message-ID: <576B2ABF.2030202@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 On 06/22/2016 04:57 PM, Marek Vasut wrote: > On 06/23/2016 01:52 AM, Eric Nelson wrote: >> Hi Marek, >> >> On 06/22/2016 04:18 PM, Marek Vasut wrote: >>> On 06/21/2016 08:41 PM, Eric Nelson wrote: >>>> Allow the calibration data from mmdc_do_write_level_calibration >>>> and mmdc_do_dqs_calibration to be returned to the caller for >>>> display. >>>> >>>> Signed-off-by: Eric Nelson >>> >>> Why don't you create a separate function to read those params ? >>> >> >> Probably because in my implementation, the calibration routine >> didn't actually write the registers. It was left to the caller >> to hand them to mx6_dram_cfg. >> >> You're right though. A routine to gather calibration data would >> be simpler and prevent the "if (calibration)" junk in the two >> routines. > > Try avoiding polluting the code with the if (calib) junk more :) > Will fix in V2 with the addition of a routine to gather the calibration data. This will also remove the need for patch 2/12, but the remainder could still use some review.