From: Tolunay Orkun <listmember@orkun.us>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] bug in cfi_flash error detection
Date: Mon, 17 Oct 2005 13:23:30 -0500 [thread overview]
Message-ID: <4353EC22.60404@orkun.us> (raw)
In-Reply-To: <47F3F98010FF784EBEE6526EAAB078D1C05E04@tq-mailsrv.tq-net.de>
Martin Krause wrote:
> Hi all,
>
> Here a brief description of what the patch tries to fix:
>
> - Timeout calculation in flash_status_check():
> The function calculates seconds instead of miliseconds.
> And on some boards the range of ulong is exceeded in the
> calculation (because CFG_HZ is very big on some boards).
>
> - In flash_status_check() a bogus error message is printed
> (secotor number is always 0 and the printed data value is
> not from the address where the error occours).
>
> - flash_status_check() uses always the erase block timeout,
> regardles if eraseing flash or writing flash.
>
> - If the write timeout of the flash device is below 1 ms
> it is erroneously calculated to zero.
Some of the issues you are fixing are also fixed my earlier patch in the
pipeline (from July). See my patch below for items 1,3,4 in your list.
http://sourceforge.net/mailarchive/message.php?msg_id=12234135
I think, in flash_status_check() your patch timeout check is not
correct. get_timer() returns in msec as well as tout is in msecs. So,
they are directly comparable without involving CFG_HZ.
I think the full status check needs to be applied to sector 0
irrespective of what sector you are operating with because this is where
the flash status register resides. I think some flash ignore the sector
address while others require sector 0. I would be careful in changing
this without verifying for a wide range of flash chips. Yes, the sector
number will be wrong in error if you activate debug outputs but it is
only cosmetic as far as I can see. Also, finding the sector number each
time from address is a time consuming search that will slow the flash
write operation unnecessarily. I am more willing to take the wrong
sector number in debug output (if enabled) than slowed down status check
which is used in a number of places.
Best regards,
Tolunay
next prev parent reply other threads:[~2005-10-17 18:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-17 16:24 [U-Boot-Users] bug in cfi_flash error detection Martin Krause
2005-10-17 18:23 ` Tolunay Orkun [this message]
2005-10-17 19:55 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2005-10-18 8:39 Martin Krause
2005-10-18 21:51 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4353EC22.60404@orkun.us \
--to=listmember@orkun.us \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox