[U-Boot-Users] PATCH for drivers/cfi_flash.c
Wolfgang Denk
wd at denx.de
Tue May 31 22:05:21 CEST 2005
In message <429C8A90.5080004 at orkun.us> you wrote:
>
> > 1) adjust the info values after the scaling to millisecond values
>
> I think this would be an easy fix. We can round the values up one tick
> if there is a remainder during integer division.
>
> Pro: Easy to do.
> Con: flinfo would not report correct timing info.
The "Con" counts for me.
> > 2) force a one tick delay no matter what in flash_status_check()
Actually it should read: round up always.
> Pro: Easy to do. Info structure contains correct values
> Con: Rounding up tout is done every time we are in flash_status_check.
So what? Regarding the code size it does not matter if we round up
here or there; regarding speed it does not matter either since we're
going to enter some sort of delay loop anyway.
This is the way to go.
> > 3) modify the code to report everything in microseconds and use udelay
>
> Pro: Correct timeout.
> Con: Requires more extensive re-work of the code.
Major con: instead of waiting until done it will wait longer, thus
reducing the performance without need.
Not accepted.
> Also using udelay would probably not work well here. The current design
> allows breaking out early (when flash is not busy) before timeout
> occurs. Changing get_timer() to report time in usec would probably
> trigger a lot more changes.
There is no reason for such a change.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A dog always bit deepest on the veterinary hand.
- Terry Pratchett, _Wyrd Sisters_
More information about the U-Boot
mailing list