Merge with git://www.denx.de/git/u-boot.git
[platform/kernel/u-boot.git] / board / esd / common / auto_update.c
index 62f6c20..da147ee 100644 (file)
@@ -31,7 +31,9 @@
 #include <command.h>
 #include <image.h>
 #include <asm/byteorder.h>
+#if defined(CFG_NAND_LEGACY)
 #include <linux/mtd/nand_legacy.h>
+#endif
 #include <fat.h>
 #include <part.h>
 
@@ -294,6 +296,8 @@ int au_do_update(int i, long sz)
                        rc = nand_legacy_rw(nand_dev_desc, NANDRW_WRITE | NANDRW_JFFS2,
                                     start, nbytes, (size_t *)&total, (uchar *)addr);
                        debug ("nand_legacy_rw: ret=%x total=%d nbytes=%d\n", rc, total, nbytes);
+#else
+                       rc = -1;
 #endif
                }
                if (rc != 0) {