From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] ppc_4xx:netstal/common fixes wrong check for flash erase
Date: Mon, 14 Jan 2008 16:01:52 +0100 [thread overview]
Message-ID: <200801141601.53125.sr@denx.de> (raw)
In-Reply-To: <200801141438.05513.niklausgiger@gmx.ch>
On Monday 14 January 2008, Niklaus Giger wrote:
> Fixed an error in the Netstal specific code, where sometimes a flash was
> declared as not erased, even when it was.
>
> Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
> ---
> board/netstal/common/hcu_flash.c | 10 +++-------
> 1 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/board/netstal/common/hcu_flash.c
> b/board/netstal/common/hcu_flash.c index be2cb37..d41d579 100644
> --- a/board/netstal/common/hcu_flash.c
> +++ b/board/netstal/common/hcu_flash.c
> @@ -30,6 +30,9 @@
> * Modified 6/6/2007
> * Added isync
> * Niklaus Giger, Netstal Maschinen, niklaus.giger at netstal.com
> + * Modified 13/3/2007
> + * Removed check whether flash is already erased. Gave false errors.
> + * Niklaus Giger, Netstal Maschinen, niklaus.giger at netstal.com
Don't add commit logs to the source code. We have git for this. So please add
descriptive commit texts to your commit logs.
> *
> */
>
> @@ -480,7 +483,6 @@ int write_buff (flash_info_t * info, uchar * src, ulong
> addr, ulong cnt) * Write a word to Flash, returns:
> * 0 - OK
> * 1 - write timeout
> - * 2 - Flash not erased
> */
> static int write_word (flash_info_t * info, ulong dest, ulong data)
> {
> @@ -491,12 +493,6 @@ static int write_word (flash_info_t * info, ulong
> dest, ulong data) ulong start;
> int i;
>
> - /* Check if Flash is (sufficiently) erased */
> - if ((*((volatile FLASH_WORD_SIZE *) dest) &
> - (FLASH_WORD_SIZE) data) != (FLASH_WORD_SIZE) data) {
> - return (2);
> - }
> -
Wow. I don't think you really solve this problem with this patch. You are just
lucky that everything works with this change. Could be that the pointer
accesses are the main source of this problem. I suggest that you try to move
to the common CFI driver which now supports non CFI flash chips via the JEDEC
code.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
prev parent reply other threads:[~2008-01-14 15:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-14 13:38 [U-Boot-Users] [PATCH] ppc_4xx:netstal/common fixes wrong check for flash erase Niklaus Giger
2008-01-14 15:01 ` Stefan Roese [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=200801141601.53125.sr@denx.de \
--to=sr@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