Skip to contentSkip to conversation

Fix for configuration has both dataflash and parallel flash

PATCH New Wang Jian 1 participant 1 message Apr 14, 2006

lore
Share & tools
lore

Wang Jian

author
#0 lore raw

PATCH 1/1 Fix for configuration has both dataflash and parallel flash

Hi Denk,

You really need to look at this patch.

Forwarded by Wang Jian <[email protected]> ----------------------- Original Message -----------------------

From:    Wang Jian <[email protected]>
To:      u-boot-users at lists.sourceforge.net
Date:    Mon, 03 Apr 2006 15:22:31 +0800
Subject: [U-Boot-Users] [PATCH] Fix for configuration has both dataflash and parallel flash

----

Hi,

When the board has both dataflash and parallel flash, using 'cp' command will write to parallel flash and then fail.

The patch below fixes the problem. BTW, I think "addr" is typo of "dest" in the dataflash test, so the patch may be as simple as s/addr/dest/ in dataflash test. I am in a hurry, so let suitable person to decide.

common/cmd_mem.c +1 -0
index 0f4f9b7..a01c2a5 100644
@@ -423,6 +423,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int fl
        /* check if we are copying to Flash */
        if ( (addr2info(dest) != NULL)
 #ifdef CONFIG_HAS_DATAFLASH
+          && (!addr_dataflash(dest))
           && (!addr_dataflash(addr))
 #endif
           ) {
Signature · 15 lines
  lark



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

--------------------- Original Message Ends --------------------