From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fix flash_sect_erase() to display correct message
Date: Wed, 18 Nov 2009 23:33:35 +0100 [thread overview]
Message-ID: <20091118223335.C0EB63F6C2@gemini.denx.de> (raw)
In-Reply-To: <4B035EE8.90702@lpmtec.com>
Dear =?UTF-8?B?IlNldW5naHllb24gUmhlZSAo7J207Iq57ZiEKSI=?=,
In message <4B035EE8.90702@lpmtec.com> you wrote:
>
> > I think this patch is not an improvement. Now it prints "Not erased"
> > even when sectors _have_ successfully been earased, which is at least
> > as wrong als the old behaviour.
...
> > As you can see, we _always_ print a warning message.
> >
> Actually, we usually print the warning message but not _always_.
> That depends on the flash implementation (*flash.c) of each board.
Ah! So you are talking about a custom flash driver.
> At least 20 implementations currently do nothing and return with
> ERR_PROTECTED if they found any protected sectors. I was porting U-Boot
Well, in this case we should consider this flash driver incomplete or
broken and fix that one first.
> to my board and found the artifact. Unfortunately (or fortunately in
> some respect), I chose smdk2410's flash.c as a template which belongs
> to the _irregular_ case.
So I suggest you dump your copy of that driver code, and use the CFI
driver instead - it seems the smdk2410 flash driver supports only CFI
conformant flashes anyway, so it could/should be removed.
> > If you want, and if you can find a clean way to implement it, it
> > might make sense to change the output into something like "Erased 4
> > (instead of 7 requested) sectors" or the like.
> >
> I think we need to first make all of them consistent. My suggestion is:
OK, then please start by removing obsolete and redundant driver code
and use the CFI driver wherever possible.
> - display a warning message in flash_erase() that there are some
> protected sectors and erase unprotected sectors like now.
OK.
> - remove the number indicating how manny sectors are erased from the
> message in flash_sect_erase() or any caller of flash_erase(). A simple
> message like "done" would be enough.
I disagree. I find the number of erased sectors a pretty useful
information (for example when it comes to calculate ease timings).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Alles Gescheite ist schon gedacht worden, man mu? nur versuchen,
es noch einmal zu denken. -- Goethe, Maximen und Reflexionen
prev parent reply other threads:[~2009-11-18 22:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 8:06 [U-Boot] [PATCH] fix flash_sect_erase() to display correct message 이승현
2009-11-17 15:14 ` Stefan Roese
2009-11-17 21:22 ` Wolfgang Denk
2009-11-18 8:17 ` Stefan Roese
2009-11-17 20:07 ` Wolfgang Denk
2009-11-18 2:41 ` "Seunghyeon Rhee (이승현)"
2009-11-18 22:33 ` Wolfgang Denk [this message]
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=20091118223335.C0EB63F6C2@gemini.denx.de \
--to=wd@denx.de \
--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