From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Date: Wed, 27 Nov 2013 17:20:49 +0900 Subject: [U-Boot] [PATCH] mmc/dwmmc: remove recursive FIFO threshold setup In-Reply-To: <1385538313.2648.24.camel@abrodkin-8560l> References: <1385478518-6624-1-git-send-email-abrodkin@synopsys.com> <52958430.4070401@samsung.com> <1385536307.2648.9.camel@abrodkin-8560l> <0DF17857-EC34-4C5B-80B7-3CD795882059@antoniou-consulting.com> <1385538313.2648.24.camel@abrodkin-8560l> Message-ID: <5295AB61.9020903@samsung.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, Alexey. On 11/27/2013 04:45 PM, Alexey Brodkin wrote: > Hi Pantelis, > > On Wed, 2013-11-27 at 09:21 +0200, Pantelis Antoniou wrote: >> Hi Alexey, >> >> On Nov 27, 2013, at 9:11 AM, Alexey Brodkin wrote: >> > >> ATM if no host->fifoth_val value is provided the code will calculate one and write it. >> Otherwise it will write the one configured. > > Indeed. But what I faced - if you try to run U-Boot more than 1 time > after powering up your board then this calculated value will be > calculated improperly. And in my comment to the patch itself I described > it. I understood your point. It's possible. If we set to calculated value, then it's set to value lower than previous value. right? if host->fifoth_val is always used somewhere, this value should be fixed. But host->fifoth val was not used anywhere, so need to calculate the value. This is problem. Best Regards, Jaehoon Chung > > So there're 2 options: > 1. Re-implement calculation in such a way so it gets the same value on > 2nd, 3rd and other U-Boot runs. Moreover it's not clear to me how this > calculation is intended to work? > > We take some initial value and then modify it - note it's not simply > overrided with some value, but initial/default value is read from the > register, then goes some math, and then we put new value back. > > How do we know which value/configuration was by default so we do > particular modifications later? What is a logic behind this? > > So why we need this functionality (unclear reconfiguration) if default > register value works flawlessly in majority of cases and for some corner > cases users may specify their custom value that will simply override > default value. > >>> Still I have a couple of questions to you: >>> 1. Why there's no example/instance of "host->fifoth_val" setup/usage in >>> U-Boot source tree? If there was at least one I would leave >>> "host->fifoth_val". >>> >> >> I would guess it's because everyone uses the default setting of 0 which >> results in a somewhat sane value. > > Regards, > Alexey >