]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/nand/nand_util.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[u-boot] / drivers / mtd / nand / nand_util.c
index 5246bbf1ac28ab1b87e06551c3af32cfe01ea1bd..024f6fb4402485bc6337a00af308e1eeb5a3e013 100644 (file)
@@ -14,7 +14,9 @@
  * Copyright (C) 2008 Nokia Corporation: drop_ffs() function by
  * Artem Bityutskiy <dedekind1@gmail.com> from mtd-utils
  *
- * SPDX-License-Identifier:    GPL-2.0+
+ * Copyright 2010 Freescale Semiconductor
+ *
+ * SPDX-License-Identifier:    GPL-2.0
  */
 
 #include <common.h>
@@ -185,6 +187,9 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
 
 #ifdef CONFIG_CMD_NAND_LOCK_UNLOCK
 
+#define NAND_CMD_LOCK_TIGHT     0x2c
+#define NAND_CMD_LOCK_STATUS    0x7a
 /******************************************************************************
  * Support for locking / unlocking operations of some NAND devices
  *****************************************************************************/
@@ -313,7 +318,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t start, size_t length,
        int page;
        struct nand_chip *chip = mtd->priv;
 
-       debug("nand_unlock%s: start: %08llx, length: %d!\n",
+       debug("nand_unlock%s: start: %08llx, length: %zd!\n",
                allexcept ? " (allexcept)" : "", start, length);
 
        /* select the NAND device */