Re: [U-Boot] [PATCH] mmc/dwmmc: remove recursive FIFO threshold setup

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:
- 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:
- 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
participants (1)
-
Jaehoon Chung