aboutsummaryrefslogtreecommitdiff
path: root/common/cmd_mem.c
diff options
context:
space:
mode:
authorStelian Pop <stelian@popies.net>2008-03-26 22:52:35 +0100
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-03-30 21:19:40 +0200
commit880cc4381ea8360248cddcdf87a64566745a5724 (patch)
tree34f060d262bfe8068d3a21f9037802cd25981af3 /common/cmd_mem.c
parentf1b985f2d724ccaa4d3def07917f0caaf18fa77d (diff)
Fix CFG_NO_FLASH compilation.
Many Atmel boards have no "real" (NOR) flash on board, and rely only on DataFlash and NAND memories. This patch enables CFG_NO_FLASH to be present in a board configuration file, while still enabling flash commands like 'flinfo', 'protect', etc. Signed-off-by: Stelian Pop <stelian@popies.net>
Diffstat (limited to 'common/cmd_mem.c')
-rw-r--r--common/cmd_mem.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 4262e26a6..d6d7a5b77 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -492,7 +492,11 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
/* Check if we are copying from DataFlash to RAM */
- if (addr_dataflash(addr) && !addr_dataflash(dest) && (addr2info(dest)==NULL) ){
+ if (addr_dataflash(addr) && !addr_dataflash(dest)
+#ifndef CFG_NO_FLASH
+ && (addr2info(dest) == NULL)
+#endif
+ ){
int rc;
rc = read_dataflash(addr, count * size, (char *) dest);
if (rc != 1) {