From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kim B. Heino Date: Mon, 03 Mar 2008 10:39:13 +0200 Subject: [U-Boot-Users] [PATCH] fix copy from ram to dataflash In-Reply-To: <20080229111930.257FE24765@gemini.denx.de> References: <20080229111930.257FE24765@gemini.denx.de> Message-ID: <47CBB931.6070604@bluegiga.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de If I try to "cp.b ", u-boot selects normal flash routines instead of dataflash. This is because it checks "if source address is not dataflash" instead of target address. Signed-off-by: Kim B. Heino --- u-boot-1.3.2-rc3/common/cmd_mem.c.foo 2008-03-03 10:17:50.000000000 +0200 +++ u-boot-1.3.2-rc3/common/cmd_mem.c 2008-03-03 10:18:19.000000000 +0200 @@ -417,7 +417,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(addr)) + && (!addr_dataflash(dest)) #endif ) { int rc;