[U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix
Alessandro Rubini
rubini-list at gnudd.com
Thu Aug 6 15:31:10 CEST 2009
>> + tout = tout * CONFIG_SYS_HZ / 1000 + 1;
> 2) There should be a Signed-off-by: from Alessandro, too.
Signed-off-by: Alessandro Rubini <rubini at gnudd.com>
> 5) Omit the "+1". It seems bogus to me.
Since the timeout is an error condition, It's better to have it longer
than shorter. Since integer division truncates towards 0, I'd better
give my hardware more time before signalling an error (an unlikely
situation), rather than timing out on an operation that would complete
in the expected time. This happens with low HZ values, which I know
are discouraged nowadays.
Not a big issue, anyway, I'm fine either way.
/alessandro
More information about the U-Boot
mailing list