From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Andr=c3=a9_Przywara?= Date: Sun, 10 Jan 2021 23:05:39 +0000 Subject: [PATCH] sunxi: dram: h6: Improve DDR3 config detection In-Reply-To: <5229259.2zOLrfmmhO@kista> References: <20201203174634.649190-1-jernej.skrabec@siol.net> <1a32b28d-a7d3-36a1-04f4-6aa3c6fd6f10@arm.com> <5229259.2zOLrfmmhO@kista> Message-ID: <797bb5b5-9965-7296-aa7f-13190d5e4cdd@arm.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 10/01/2021 18:43, Jernej ?krabec wrote: > Dne petek, 08. januar 2021 ob 03:01:42 CET je Andr? Przywara napisal(a): >> On 03/12/2020 17:46, Jernej Skrabec wrote: >>> It turns out that in rare cases, current analytical approach to detect >>> correct DRAM bus width and rank on H6 doesn't work. On some TV boxes >>> with DDR3, incorrect DRAM configuration triggers write leveling error >>> which immediately stops initialization process. Exact reason why this >>> error appears isn't known. However, if correct configuration is used, >>> initalization works without problem. >>> >>> In order to fix this issue, simply try another configuration when any >>> kind of error appears during initialization, not just those related to >>> rank and bus width. >> >> It's a bummer that this auto detection doesn't work, it looked to be the >> right thing. >> But I prefer functionality over pipe dreams ;-) >> >>> >>> Tested-by: Thomas Graichen >>> Signed-off-by: Jernej Skrabec ... >>> +static void mctl_auto_detect_rank_width(struct dram_para *para) >>> +{ >>> + /* this is minimum size that it's supported */ >>> + para->cols = 8; >>> + para->rows = 13; >>> + >>> + /* >> >> Can you add here that former versions of this code tried to autodetect >> rank and width, but this didn't work reliably? This would give people >> some breadcrumbs to follow with git log/git annotate. >> >> Otherwise this is fine: >> >> Reviewed-by: Andre Przywara >> Tested-by: Andre Przywara (on Pine H64) >> >> I can extend the commit while committing, if you like. > > Please do. Thanks! Done and applied! Thanks, Andre