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 <[EMAIL PROTECTED]>
---
 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, [EMAIL PROTECTED]
+ * Modified 13/3/2007
+ * Removed check whether flash is already erased. Gave false errors.
+ * Niklaus Giger, Netstal Maschinen, [EMAIL PROTECTED]
  *
  */
 
@@ -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);
-       }
-
        for (i = 0; i < 4 / sizeof (FLASH_WORD_SIZE); i++) {
                int flag;
 
-- 
1.5.2.5


-- 
Niklaus Giger
Netstal Maschinen AG
CH-8752 Naefels

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to