i.MX25: Set OOB size (MXC NFC)
[openocd.git] / src / flash / nand / core.c
index c4d92482152256612decccceaad0e950e1de0b07..777b2fdc40dc699a5510130614985984e0a60929 100644 (file)
@@ -53,8 +53,8 @@ void nand_device_add(struct nand_device *c)
 static struct nand_info nand_flash_ids[] =
 {
        /* Vendor Specific Entries */
-       { NAND_MFR_SAMSUNG,     0xD5, 0, 8192, 0, LP_OPTIONS,           "K9GAG08 2GB NAND 3.3V x8 MLC 2b/cell"},
-       { NAND_MFR_SAMSUNG,     0xD7, 0, 8192, 0, LP_OPTIONS,           "K9LBG08/K9HCG08 4/8GB NAND 3.3V x8 MLC 2b/cell"},
+       { NAND_MFR_SAMSUNG,     0xD5, 8192, 2048, 0x100000, LP_OPTIONS, "K9GAG08 2GB NAND 3.3V x8 MLC 2b/cell"},
+       { NAND_MFR_SAMSUNG,     0xD7, 8192, 4096, 0x100000, LP_OPTIONS, "K9LBG08 4GB NAND 3.3V x8 MLC 2b/cell"},
 
        /* start "museum" IDs */
        { 0x0,                  0x6e, 256, 1, 0x1000, 0,                "NAND 1MiB 5V 8-bit"},
@@ -221,7 +221,7 @@ COMMAND_HELPER(nand_command_get_device, unsigned name_index,
        *nand = get_nand_device_by_num(num);
        if (!*nand) {
                command_print(CMD_CTX, "NAND flash device '%s' not found", str);
-               return ERROR_INVALID_ARGUMENTS;
+               return ERROR_COMMAND_SYNTAX_ERROR;
        }
        return ERROR_OK;
 }
@@ -542,7 +542,7 @@ int nand_erase(struct nand_device *nand, int first_block, int last_block)
                return ERROR_NAND_DEVICE_NOT_PROBED;
 
        if ((first_block < 0) || (last_block >= nand->num_blocks))
-               return ERROR_INVALID_ARGUMENTS;
+               return ERROR_COMMAND_SYNTAX_ERROR;
 
        /* make sure we know if a block is bad before erasing it */
        for (i = first_block; i <= last_block; i++)
@@ -598,7 +598,8 @@ int nand_erase(struct nand_device *nand, int first_block, int last_block)
                        return ERROR_NAND_OPERATION_TIMEOUT;
                }
 
-               if ((retval = nand_read_status(nand, &status)) != ERROR_OK)
+               retval = nand_read_status(nand, &status);
+               if (retval != ERROR_OK)
                {
                        LOG_ERROR("couldn't read status");
                        return ERROR_NAND_OPERATION_FAILED;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)