X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fmtd%2Fnand%2Fnand_util.c;h=024f6fb4402485bc6337a00af308e1eeb5a3e013;hb=e3bf81b1e841ecabe7c8b3d48621256db8b8623e;hp=d149a6dae67f4d89b1bbe72b4a4d18a951564c8d;hpb=6d4511b2c6734842de9de21c1bc0db4c3ea28b72;p=u-boot diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index d149a6dae6..024f6fb440 100644 --- a/drivers/mtd/nand/nand_util.c +++ b/drivers/mtd/nand/nand_util.c @@ -14,7 +14,9 @@ * Copyright (C) 2008 Nokia Corporation: drop_ffs() function by * Artem Bityutskiy from mtd-utils * - * SPDX-License-Identifier: GPL-2.0+ + * Copyright 2010 Freescale Semiconductor + * + * SPDX-License-Identifier: GPL-2.0 */ #include @@ -142,8 +144,8 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts) ops.mode = MTD_OPS_AUTO_OOB; result = mtd_write_oob(meminfo, - erase.addr, - &ops); + erase.addr, + &ops); if (result != 0) { printf("\n%s: MTD writeoob failure: %d\n", mtd_device, result); @@ -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 */