no change
[openocd.git] / src / flash / nand.h
index cb18b0c8c278d0bc81b4ae596eabdfff9bd79feb..bd9554c344c4e8ac027189858c9a08792866d588 100644 (file)
@@ -2,12 +2,10 @@
  *   Copyright (C) 2007 by Dominic Rath                                    *
  *   Dominic.Rath@gmx.de                                                   *
  *                                                                         *
- *   partially based on                                                    *
- *      linux/include/linux/mtd/nand.h                                        *
- *                                                                         *
- *   Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com>                   *
- *                      Steven J. Hill <sjhill@realitydiluted.com>         *
- *                      Thomas Gleixner <tglx@linutronix.de>               *
+ *   Partially based on linux/include/linux/mtd/nand.h                     *
+ *   Copyright (C) 2000 David Woodhouse <dwmw2@mvhi.com>                   *
+ *   Copyright (C) 2000 Steven J. Hill <sjhill@realitydiluted.com>         *
+ *   Copyright (C) 2000 Thomas Gleixner <tglx@linutronix.de>               *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -58,6 +56,18 @@ typedef struct nand_block_s
        int is_bad;
 } nand_block_t;
 
+struct nand_oobfree {
+       int offset;
+       int length;
+};
+
+typedef struct nand_ecclayout_s {
+       int eccbytes;
+       int eccpos[64];
+       int oobavail;
+       struct nand_oobfree oobfree[2];
+} nand_ecclayout_t;
+
 typedef struct nand_device_s
 {
        nand_flash_controller_t *controller;
@@ -199,6 +209,7 @@ extern nand_device_t *get_nand_device_by_num(int num);
 extern int nand_read_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 data_size, u8 *oob, u32 oob_size);
 extern int nand_write_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 data_size, u8 *oob, u32 oob_size);
 extern int nand_read_status(struct nand_device_s *device, u8 *status);
+extern int nand_calculate_ecc(struct nand_device_s *device, const u8 *dat, u8 *ecc_code);
 
 extern int nand_register_commands(struct command_context_s *cmd_ctx);
 extern int nand_init(struct command_context_s *cmd_ctx);

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)