mx7ulp: Remove duplicated definitions
[oweals/u-boot.git] / arch / arm / mach-imx / cmd_nandbcb.c
index 09c4356529f4d518b19dc5d5d223e5a592273834..b3e59b1b003550c0ec92b67186105268ff47f5bc 100644 (file)
@@ -10,7 +10,9 @@
  */
 
 #include <common.h>
+#include <malloc.h>
 #include <nand.h>
+#include <dm/devres.h>
 
 #include <asm/io.h>
 #include <jffs2/jffs2.h>
@@ -24,6 +26,8 @@
 #include <linux/mtd/mtd.h>
 #include <nand.h>
 
+#include "../../../cmd/legacy-mtd-utils.h"
+
 #define BF_VAL(v, bf)          (((v) & bf##_MASK) >> bf##_OFFSET)
 #define GETBIT(v, n)           (((v) >> (n)) & 0x1)
 
@@ -588,11 +592,14 @@ static char nandbcb_help_text[] =
        "update addr off|partition len  - update 'len' bytes starting at\n"
        "       'off|part' to memory address 'addr', skipping  bad blocks\n"
        "bcbonly fw-size fw1-off [fw2-off] - write only BCB (FCB and DBBT)\n"
-       "       where `fw-size` is fw sizes in bytes, `fw1-off` and\n"
-       "       and `fw2-off` - firmware offsets                ";
+       "       where `fw-size` is fw sizes in bytes, `fw1-off`\n"
+       "       and `fw2-off` - firmware offsets\n"
+       "       FIY, BCB isn't erased automatically, so mtd erase should\n"
+       "       be called in advance before writing new BCB:\n"
+       "           > mtd erase mx7-bcb";
 #endif
 
 U_BOOT_CMD(nandbcb, 5, 1, do_nandbcb,
-          "i.MX6 Nand BCB",
+          "i.MX6/i.MX7 NAND Boot Control Blocks write",
           nandbcb_help_text
 );