* [U-Boot-Users] [PATCH] Fix for configuration has both dataflash and parallel flash
@ 2006-04-03 7:22 Wang Jian
0 siblings, 0 replies; only message in thread
From: Wang Jian @ 2006-04-03 7:22 UTC (permalink / raw)
To: u-boot
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.
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 0f4f9b7..a01c2a5 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -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
) {
--
lark
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-04-03 7:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-03 7:22 [U-Boot-Users] [PATCH] Fix for configuration has both dataflash and parallel flash Wang Jian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox